help-octave
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: colorbars


From: Daniel Oberhoff
Subject: Re: colorbars
Date: Fri, 10 Aug 2007 09:45:04 +0200

Ah, ok. Got it. And I see the problem now: Imagesc just rescales the data to [0:255] and hands it to image, so the colorbar will be in the scaled coordinates of course. Same goes for pcolor from octave-forge, which seems to just use image. This is different from matlab. I suppose it would need a different kind of object for (nonrgb) image data in a different range? As for the colorbar: since graphics are object oriented I suppose there would need to be a state flag for the colorbar in the object tree?

Ok, looking at how Matlab does it. It seems to be clever about the data type first up (i.e. range [0 1] for real data and [0 255] for integer data). Hmm, actually looking at the object inside Matlab reveals that the actual data stored with the object is unscaled using imagesc. Also the colorbar is a separate object. But that souldnt be very important.

Hmm, interesting, it just works by handing the data to image instead of imagesc :). That's probably the best solution. Since fully implementing imagesc the matlab way would require settable color range to image. Remains the colorbar issue...additional flag to the object tree?

Daniel

Am 09.08.2007 um 21:42 schrieb John W. Eaton:

On  9-Aug-2007, Daniel Oberhoff wrote:

| Regarding the colorbars in gnuplot: I have figured out the commands
| to do image plots in gnuplot with properly scaled colorbar (or
| without one). How would I go about hacking octave to use them? All I
| could find regarding gnuplot was __gnuplot_raw__.cc, and that seems
| to be flex generated. Would I need to learn flex first?

The current graphics code for handling properties is in
graphics.{h,cc} and the .m files in the scripts/plot subdirectory of
the sources.

jwe



reply via email to

[Prev in Thread] Current Thread [Next in Thread]