|
From: sfeam <sf...@us...> - 2017-07-27 00:01:39
|
On Wednesday, 26 July 2017 14:49:07 Dima Kogan wrote: > Hi. > > I think the following is a bug? Maybe? > > I'm using a bleeding edge build of gnuplot from > > https://github.com/gnuplot/gnuplot/commit/ca59a14e94df23008200f34cdb7ea8bc017ad946 > > Plotting a matrix of numbers as points with varying colors works ok: > > plot '-' matrix using 1:2:3 notitle with points pt 7 ps 2 palette > 1 2 3 > 4 5 6 > e > > I get 6 points in a grid, with different colors. I would expect that > plotting the same thing 'with labels' should work too, but with printed > text instead of points > > plot '-' matrix using 1:2:3 notitle with labels > 1 2 3 > 4 5 6 > e > > I get the grid of printed text, but each "point" is "6" and not "1", > "2", ... > > Bug? "with labels" wants a string, not a number. This should work: plot '-' matrix using 1:2:(sprintf("%d",column(3))) with labels I have no idea why it prints "6" though. That's a mystery. Ethan |