This script used to give me the correct plot, now it does not... If I run this script:
$DATA<<EOD
0.00,0.00,0.7000,90.0000,114.0000
0.00,0.00,1.0000,114.0000,162.0000
0.00,0.00,1.0000,162.0000,234.0000
0.00,0.00,1.0000,234.0000,330.0000
0.00,0.00,1.0000,330.0000,450.0000
EOD
set datafile separator comma
set style data circles
set term windows
unset xtics; unset ytics; unset x2tics; unset y2tics
set grid noxtics
set grid noytics
set xrange [-1.5:1.5]
set yrange [-1.5:1.5]
set border 0
set colorsequence classic
set title "{/Tahoma=22 Plotting with Pies}" textcolor rgb "0xE25822" rotate by 0
set key inside top right opaque fc rgb "0xFFFFFF"
set label 1 "Alpha\n1" at -0.27,1.27 center font "Tahoma:Bold,12" front
set label 2 "Bravo\n2" at -0.97,0.87 center font "Tahoma:Bold,12" front
set label 3 "Charlie\n3" at -1.24,-0.40 center font "Tahoma:Bold,12" front
set label 4 "Delta\n4" at 0.27,-1.27 center font "Tahoma:Bold,12" front
set label 5 "Echo\n5" at 1.13,0.65 center font "Tahoma:Bold,12" front
plot $DATA every ::0::0 using 1:2:3:4:5 with circles fillstyle solid fc rgb "0x007FFF" title "Alpha (6.67%)",\
$DATA every ::1::1 using 1:2:3:4:5 with circles fillstyle solid fc rgb "0x3CD070" title "Bravo (13.33%)",\
$DATA every ::2::2 using 1:2:3:4:5 with circles fillstyle solid fc rgb "0x738678" title "Charlie (20.00%)",\
$DATA every ::3::3 using 1:2:3:4:5 with circles fillstyle solid fc rgb "0xE25822" title "Delta (26.67%)",\
$DATA every ::4::4 using 1:2:3:4:5 with circles fillstyle pattern 4 title "Echo (33.33%)"
Notice in the plot that I have the crosshair on the top of the piece for "Alpha" and I get a reading of 0.0024,1.011 (give or take)
My question is: Why do I get a radius in my plot of 1 (for Alpha) and 1.4 (for the rest of the pieces) if my data says 0.7 for Alpha and 1.0 for the rest of the pieces.
PS: The position of the labels seem erratic as well, but I would like to solve one problem at a time.
Thank you, Roberto
The radius of a circle in gnuplot is always specified in terms of its x-axis coordinate range. If the x and y axes have different scales, then the vertical extent of that circle will be something else. From the documentation:
gnuplot> help circle
Syntax:
set object <index> circle {at|center} <position> size <radius>
{arc [<begin>:<end>]} {no{wedge}}
{<other-object-properties>}
The position of the circle is specified by giving the position of the center
center followed by the radius. The keywords `at` and `center` are synonyms.
In 2D plots the position and radius may be given in any coordinate system.
See `coordinates`. Circles in 3D plots cannot use graph coordinates.
In all cases the radius is calculated relative to the horizontal scale of the axis, graph, or canvas. Any disparity between the horizontal and vertical scaling will be corrected for so that the result is always a circle.
If you want to draw a circle in plot coordinates (such that it will appear as
an ellipse if the horizontal and vertical scales are different), use
`set object ellipse` instead.