Hello,
The first plot of the following code works in 5.0.1 and 5.0.4
The second plot works fine in 5.0.1 but not in 5.0.4
In 5.0.4 i see a scewed colored bloc (see the appended picture)
instead of a 3x2 matrix
This happens for x11,qt terminal.
It seems that with image works, every is also o.k. but the combination not.
# show a 2 x 5 matrix as colored heat map
plot '-' matrix with image
1 2 3 4 5
6 7 8 9 10
e
e
pause -1 "RETURN"
# show only column 2 - 4
plot '-' matrix every ::2::4 with image
1 2 3 4 5
6 7 8 9 10
e
e
I do not immediately recall if "every" is supposed to work with "matrix".
Regardless of whether it should work, note that for me your test commands do not work in either 5.0.1 or 5.0.4 (or older versions like 4.6.6 for that matter).
In 5.0.4 I get different output than you show (same shape, very different colors)
In 5.0.1 I also get incorrect output. It shows the intended number of rows and columns but the actual color values are wrong. Note that an additional command "set cbrange [1:10]" is needed to see this easily. That is, if the color range is fixed at [1:10] for both the full plot and the extracted plot you can see that the colors are not maintained in the latter.
The documentation for "every" is in terms of selecting individual line from within a block of data, and individual blocks within a file of many blocks. You are trying to use it to select fields within a single line, which may never have been considered when the code was written. I don't know without digging into the code whether this is even possible.
Hi Ethan,
i used this feature for some time in 4.6.4 and there it worked fine.
Now i tried with all the versions i still have installed.
4.4.2 o.k.
4.6.4 o.k.
5.0.1 not o.k.
5.0.2 o.k.
5.0.4. not o.k.
(sorry, I mixed up 5.0.1 and 5.0.2 in my last post.)
So it's an undocumented feature which might or might not work.
But in the plot you post that was generated by 4.6.4, do you agree that the colors are wrong?
You can see that the colors correspond to values 3/4/5 in the bottom row and
8/9/10 in the top row, whereas the requested matrix subset should contain 2/3/4 and 7/8/9 respectively.
So I think this was never working.
Correction: Or maybe it was. I forgot that the indexing starts at 0 rather than at 1. So maybe the colors are correct, but the "every" clause doesn't describe what I thought it did.
Last edit: Ethan Merritt 2016-08-03
I found the point of regression. Fixed now in CVS for 5.0 and 5.1
great,
Thanks