|
From: | Søren Hauberg |
Subject: | Re: 2.9.10, finally? |
Date: | Thu, 08 Feb 2007 23:56:26 +0100 |
User-agent: | Thunderbird 1.5.0.9 (X11/20070103) |
John W. Eaton skrev:
Yeah, the 2D plotting on top of the images works like a charm. I can set line styles and everything :-)On 8-Feb-2007, Søren Hauberg wrote: | John W. Eaton skrev: | > + With gnuplot 4.2, image data is plotted with gnuplot and may be | > combined with other 2-d plot data. | Does this actually work? OK, so the colors are "wrong" but it does display images with gnuplot and allows plotting 2-d data over the images, doesn't it?
| With a recent CVS checkout I get the following | behaviour: | | * "imshow(rand(100))" shows a color image, while it should be a | gray-scale image (rand(100) is 2D and hence gray-scale). | | * "I(:,:,3) = rand(100); imshow(I)" shows a horizontal gradient image | where the left-most color is black, going through, purple to red, ending | in the right-most color being yellow. The shown image should have been a | blue image containing random values.I'll be honest and say I don't quite understand the question as I don't really know the graphics handle properties (I've never used it in matlab, and the software of my choice (octave) haven't had it before).I think the problem is that we are always applying a colormap but we shouldn't. The other day, I asked: Is there some information that shows up in the graphics handle properties, or is this choice made when the data is displayed?
I think the behavior should be something like:* If the user shows a MxN matrix it should be shown as a gray-scale image, and if the user shows a MxNx3 it should be shown as an RGB image. * If the user sets the colormap *after* the image is shown the colormap should be applied.
So thinking in terms of graphics properties I would guess that we, for image data, should have a colormap property. This property should default to an empty property in which case the "raw" data should be shown, i.e. gray-scale images for 2D matrices, and RGB for 3D matrices. If the user calls the colormap function the property should be set, the colormap applied, and the figure should be updated.
Was that the question you were asking? Søren
[Prev in Thread] | Current Thread | [Next in Thread] |