|
From: Ethan M. <merritt@u.washington.edu> - 2009-11-22 06:48:14
|
On Saturday 21 November 2009, Philipp K. Janert wrote: > On Saturday 21 November 2009 07:54:55 pm you wrote: > > > > > > For plot (not splot), I am completely confused. Does > > > it even make sense to have the notion of a "matrix" > > > format for plot? The "matrix" keyword seems to suggest > > > that the data is on a regular, 2-dim grid. This notion > > > does not seem to have any meaning for plot. > > > > It is clearly useful to have such a capability. > > I use it to make heat maps, for instance. > > See heatmaps.dem > > But that just goes to my point: the examples in > heatmaps.dem all use splot (not plot), except > for one that uses "with image", which I think is > for a binary file (not ascii). The one in the demo is in-line ascii data. But hmm, you're right that it doesn't include the 'matrix' keyword. Oh... I see. That's the wrong demo. I was thinking of the heatmaps in imageNaN.dem, which are drawn like this: plot '-' matrix with image failsafe 0 5 4 3 1 0 ? 2 2 0 0 1 Junk 1 2 3 4 5 NaN 0 0 3 1 0 Inf 3 2 0 2 3 -Inf 0 1 2 4 3 e e > I still can't see any "proper" use for an ASCII > matrix with plot (not splot). The end result I was aiming for when last I looked at this was to generate heatmaps directly from a csv file (e.g. from excel), where the row and column categories had headers. I'll draw this here as in-line data with whitespace. The command below doesn't work, of course, but I was trying to understand the whole matrix mechanism well enough to see if I could tweak things to make it work: plot "-" matrix using xticlabels(0):yticlabels(0) with image xx A B C X 0 2 1 Y 2 0 1 Z 1 1 2 I forget now why I wanted it to be a 'plot' command rather than 'splot'. Maybe because of the limited control over tic label placement in 3D. Or maybe because the code at first looked slightly less confusing. EAM |