Learn how easy it is to sync an existing GitHub or Google Code repo to a SourceForge project! See Demo

Close

#1165 Wrong colors being plotted by polor plot

closed-out-of-date
nobody
2D plot (258)
5
2012-10-02
2012-09-10
Judd Taylor
No

The following script is generating a plot with the wrong colors. The input data col is 0-5, and so is the palette, yet as you can see from the data below, it's not plotting the correct colors.

set term png truecolor size 1024,768
set datafile separator ','
set clip points
unset border
set dummy t,y
set angles degrees
set grid polar 15.0000
set grid noxtics nomxtics noytics nomytics noztics nomztics nox2tics nomx2tics noy2tics nomy2tics nocbtics nomcbtics
set grid layerdefault linetype 0 linewidth 1.000, linetype 0 linewidth 1.000
set xtics axis nomirror 15
set ytics axis nomirror 15
set format x ''
set format y ''
set xtics scale 0
set ytics scale 0
unset key
set polar
set size ratio 1 1, 1
set yrange [ -100 : 100 ]
set xrange [ -100 : 100 ]
set trange [ 0.0000 : 359.9999 ] noreverse nowriteback
set rrange [ 0.0000 : 90.0000 ] noreverse nowriteback
set cbtics 1
set colorb vert user size 0.02, 0.75
#set palette model RGB maxcolors 6
set palette defined( \ 0.000 "dark-blue", 0.999 "dark-blue", \ 1.000 "#00d800", 1.999 "#00d800", \ 2.000 "orange", 2.999 "orange", \ 3.000 "cyan", 3.999 "cyan", \ 4.000 "yellow", 4.999 "yellow", \ 5.000 "red" , 5.999 "red" )
#set palette defined( \ # -0.500 "dark-blue", 0.500 "dark-blue", \ # 0.501 "#00d800", 1.500 "#00d800", \ # 1.501 "orange", 2.500 "orange", \ # 2.501 "cyan", 3.500 "cyan", \ # 3.501 "yellow", 4.500 "yellow", \ # 4.501 "red" , 5.500 "red" )
set_label(x, text) = sprintf("set label '%s' at (97*cos(450-%f)), (97*sin(450-%f)) center", text, x, x)
eval set_label( 0, "0")
eval set_label( 30, "30")
eval set_label( 60, "60")
eval set_label( 90, "90")
eval set_label(120, "120")
eval set_label(150, "150")
eval set_label(180, "180")
eval set_label(210, "210")
eval set_label(240, "240")
eval set_label(270, "270")
eval set_label(300, "300")
eval set_label(330, "330")
plot \ 'test.deg5.csv' using (450-$2):(90-$3):4 notitle with lines lc pal lw 2

The data file is this:
Date,Azimuth,Elevation,Degradation
24-Aug-2012 18:07:25,143.6,5.43,0
24-Aug-2012 18:11:59,111.48,36.23,0
24-Aug-2012 18:12:01,110.62,36.66,2
24-Aug-2012 18:12:29,100.67,40.86,2
24-Aug-2012 18:12:32,99.33,41.31,3
24-Aug-2012 18:12:58,87.08,44.37,3
24-Aug-2012 18:13:01,85.55,44.65,5
24-Aug-2012 18:13:57,54.98,44.97,5
24-Aug-2012 18:14:01,52.7,44.63,0
24-Aug-2012 18:15:29,20.07,32.19,0
24-Aug-2012 18:15:32,19.41,31.77,2
24-Aug-2012 18:15:58,14.07,27.82,2
24-Aug-2012 18:16:01,13.47,27.33,0
24-Aug-2012 18:19:45,354.94,5.03,0

I'm using gnuplot 4.4 from the linux mint 13 release.

This errors seems to happen across output terminals, also.

Discussion

  • Ethan Merritt
    Ethan Merritt
    2012-09-10

    Your example plot produces different output in the current version of gnuplot (4.6). A copy is attached. If this output matches what you expected, then I think we can conclude that whatever bug was present in 4.4 was fixed before the release of 4.6. If the current output is still wrong (or at least different from what you expected), then please point out in more detail which portion of the plot is wrong.

     
  • Ethan Merritt
    Ethan Merritt
    2012-09-10

    output from gnuplot version 4.6.0

     
    Attachments
  • Judd Taylor
    Judd Taylor
    2012-09-10

    Thanks, I searched for fixed bugs, but didn't find any. I will attempt the update now. Thanks!

     
  • Ethan Merritt
    Ethan Merritt
    2012-10-02

    No further response, so I take it that the problem is indeed gone in 4.6. If not, please file another report. Closing

     
  • Ethan Merritt
    Ethan Merritt
    2012-10-02

    • status: open --> closed-out-of-date