I am new to gnuplot, and I couldn't find it in the docs in reasonable
time..
I need to plot a few rectangles using their vertex coordinates. The
rectangles may overlap.
For example (start denoted upper left corner, end - lower right
corner):
rect1: x_start=10 y_start=20 x_end=100 y_end=100
rect2: x_start=20 y_start=40 x_end=80 y_end=70
....
I can have file with these numbers in any needed format.
what is the simplest way to do it with gnuplot?
thanks,
Stas
On Wednesday 30 January 2008 16:07, sche...@gmail.com wrote:
> I need to plot a few rectangles using their vertex coordinates. The
> rectangles may overlap.
> For example (start denoted upper left corner, end - lower right
> corner):
> rect1: x_start=10 y_start=20 x_end=100 y_end=100
> rect2: x_start=20 y_start=40 x_end=80 y_end=70
> ....
> I can have file with these numbers in any needed format.
>
> what is the simplest way to do it with gnuplot?
set obj rect from 10,20 to 100,100 fc rgb 'red'
set obj rect from 20,40 to 80,70 fc rgb 'green'
Use "help set obj" for more info.
Cheers + HTH,
- Joerg
--
joerg dot hau at swissonline dot ch * Lausanne, Switzerland
http://homepage.sunrise.ch/mysunrise/joerg.hau/
"All standard disclaimers apply".
remove the obvious from my address to reply
help rectangle
see also:
http://gnuplot.sourceforge.net/demo_4.2/rectangle.html
--
Ethan A Merritt
thanks for your help!
On my system there was gnuplot 4.0 which didn't have such object...
thanks again,
Stas