|
From: Dima K. <gn...@di...> - 2017-07-27 00:26:15
|
sfeam <sf...@us...> writes:
> On Wednesday, 26 July 2017 14:49:07 Dima Kogan wrote:
>>
>> 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.
Hmmm. I can replace the 1,2,3 thing with aaa,bbb,ccc, and it still
prints the last one. And this works ok for non-matrix plots, so it
sounds like a misbehavior to me. I'll try to find the time to look
through the sources and fix it; hopefully.
|