|
From: Ethan M. <merritt@u.washington.edu> - 2010-03-13 00:46:08
|
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 |