Gnuplot: draw a filled rectangle in 3d plot (splot)
Is it possible to add a black rectangle (in the z = 0 plane) to a splot in gnuplot? I've tried splotting:
splot 0
which resulted in (with different parameters) different colors when setting the range and pm3d option. I found an option for plotting rectangles in 2d:
set object rectangle from 0,0,0 to my maximum
Does the 3d environment have a drawing tool?
Thanks in advance.
+3
Eljee
source
to share
1 answer
To add a rectangle you can add an object polygon
(object is rectangle
not supported in 3d):
max_x = 7
max_y = 4
set object 1 polygon from 0,0,0 to max_x,0,0 to max_x, max_y,0 to 0, max_y,0 fillstyle solid noborder fillcolor rgb 'dark-green'
set ticslevel 0
set xrange [0:10]
set yrange [0:10]
set xlabel 'xlabel'
set ylabel 'ylabel'
set view 40,30
splot x
splot x
is just an exam, you need a graph command to display the object anyway.
+4
Christoph
source
to share