|
From: hon f. l. <ho...@gm...> - 2010-03-15 02:22:37
|
Tried your suggestion. The "lc palette Z" introduces error like " line XX: ';' expected". "lc Z" is OK but not as palette, discrete color instead. Same as "lc variable" Eg. of my Z value ranges from 0.105 to 0.331. Let me give you a better example. A study on a group of university student on their age and performance. Student A: Age 21 Hour attending class subject 1= 10 hours : Score=70 Hour attending class subject 2= 12 hours : Score=80 . . . . Student B: Age 25 Hour attending class subject 1= 10 hours : Score 55 Hour attending class subject 2= 20 hours : Score 60 . . . . Let plot hour attending class subject (x) vs score (y). Each curve is colored according to the age to see any trend. In my earliest post, notice linespoints give correct color and symbol according to the plot/key, just like the curve itself. Only the line color is wrong. If the plot can do color palette/gradient on the curve correctly(or may be incorrectly) why not the key? Thanks. On Thursday 11 March 2010 23:30:28 hon fui lee wrote: > I'm trying to do a 2D lines/linespoint plot with linecolor from 3rd > column as color palette. > All are OK except the key does not proper linecolor. See sample > command file and sample output (pdf). > I'm using gnuplot version 4.5 (development) on Windows. > > Is that a bug or feature? Thanks. I think it is a mis-expectation. Your lines happen to each have a constant Z value, which you can think of as a color value, so for your particular plot each entire line is a single color and it would make sense for the sample line segment in the key to be that same color. But how is gnuplot supposed to know this? In general each point could have a different Z value and each line would have many segments with various colors. Which of these colors would you put in the key? If you know in advance that each line has a constant Z value, maybe you can revise the plot command so that instead of plot 'foo' using 1:2:3 lc palette you use Z = constant_z_for_this_line plot 'foo' using 1:2 lc palette Z For this you would have to read in the Z values before issuing the plot command. That may or may not be possible in your particular plotting scenario. Ethan ------------------------------------------------------------------------------ Download Intel® Parallel Studio Eval Try the new software tools for yourself. Speed compiling, find bugs proactively, and fine-tune applications for parallel performance. See why Intel Parallel Studio got high marks during beta. http://p.sf.net/sfu/intel-sw-dev _______________________________________________ gnuplot-beta mailing list gnu...@li... https://lists.sourceforge.net/lists/listinfo/gnuplot-beta -- hon_fui |