[CHANGESET] Re: stange 'colorbar' command behavior
David Bateman
David.Bateman at motorola.com
Mon Apr 21 05:12:54 CDT 2008
ppiatrou at mtu.edu wrote:
> Hi,
>
> I have just installed Octave 3.0.0 from the source on Ubuntu Linux 7.10.
> One of my concerns from working with Octave 2.9 was that the colorbar
> command did not show numbers on the colour bar. To my delight, after
> making a sequence of commands
>
> imagesc(randn(200))
> axis square
> colorbar
>
> I discovered that imagesc works, axes tics are tight around the image and
> the colour bar shows the numbers on it. However, after installation of a
> few octave-forge packages including those for plotting: image, plot,
> zenity, to my surprise, the second try of the commands above resulted in
> colour bar without numbers! I have no idea what exactly happened and how
> to return the things to initial state. Uninstallation of octave-forge
> packages does not work. Is this a bug?
>
This is strange and I see no relationship between the octave-forge
packages and the fail of these commands.. Imagesc was rewritten after
the release of 3.0.0 to use the "cdatamapping" property of the handle
instead to do the scaling. Maybe that is the reason for your issues.. If
so I expect it to be fixed in 3.0.1.
> Other problems with colorbar persisting from the 2.9 are that the colour
> bar does not scale to the size of image after a sequence of commands like
>
> subplot(1,2,1)
> imagesc(randn(200))
> axis square
> colorbar
>
Hum, yes that is a bug, but I don't see an easy way of handling it as
there is no means to get gnuplot to scale the colorbar itself and still
have control of its location, where as gnuplot itself controls the size
of the subplot.. All we can do is have some sort of empirically derived
formula to do the scaling.. Try the attached patch that also tries to do
the right thing if the aspect ratio is not automatic.
> or the command
>
> colorbar('east')
>
> produces colour bar overlapped with the image and behind it.
>
That is what is supposed to happen for 'east'. Try instead
colorbar('eastoutside')
> Does someone knows the ways to fix (circumvent) the aforementioned problems?
> And, more generally, is there a way to produce publication quality
> graphics from Octave?
>
I'd hope that gnuplot's quality is at a level for publication.. You can
always use something like
drawnow ("x11", "/dev/null", false,"output.gp")
then use the file "output.gp" with gnuplot directly to get the final
manipulation of the figure in exactly the manner you want it...
D.
--
David Bateman David.Bateman at motorola.com
Motorola Labs - Paris +33 1 69 35 48 04 (Ph)
Parc Les Algorithmes, Commune de St Aubin +33 6 72 01 06 33 (Mob)
91193 Gif-Sur-Yvette FRANCE +33 1 69 35 77 01 (Fax)
The information contained in this communication has been classified as:
[x] General Business Information
[ ] Motorola Internal Use Only
[ ] Motorola Confidential Proprietary
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: patch7974
Url: https://www.cae.wisc.edu/pipermail/help-octave/attachments/20080421/19438396/attachment.ksh
More information about the Help-octave
mailing list