Reputation: 225
I have a 2d graph with the following x and y ranges
set xrange [ 460.000 : 600.000 ] noreverse nowriteback
set yrange [ -10.0000 : 55.0000 ] noreverse nowriteback
I want to add the following rectangle:
set object 1 rectangle from 460,-5 to 600,5 fillcolor rgb "goldenrod" fillstyle solid 0.25 noborder
but I'm using the following command:
set object 1 rectangle from graph 0, -5 to graph 1, 5 fillcolor rgb "goldenrod" fillstyle solid 0.25 noborder
The problem is that the entire canvas become filled when I use this last command... What is wrong with it?
I'm using the following version
G N U P L O T
Version 4.6 patchlevel 5 last modified February 2014
Build System: Linux x86_64
Upvotes: 2
Views: 96
Reputation: 48430
Using a unit prefix like graph
affects both x and y-value. You must explicitely use first
for the y-value to fix that:
set object 1 rectangle from graph 0, first -5 to graph 1, first 5 \
fillcolor rgb "goldenrod" fillstyle solid 0.25 noborder
Upvotes: 1