[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Octave-bug-tracker] [bug #42311] colorbar incorrect after setting log s
From: |
Pantxo Diribarne |
Subject: |
[Octave-bug-tracker] [bug #42311] colorbar incorrect after setting log scale |
Date: |
Wed, 07 May 2014 10:53:48 +0000 |
User-agent: |
Mozilla/5.0 (Macintosh; Intel Mac OS X 10.9; rv:28.0) Gecko/20100101 Firefox/28.0 |
Follow-up Comment #1, bug #42311 (project octave):
AFAIK colorbars are built with an image. Non linearly spaced image pixels are
not supported neither in octave nor in matlab.
A workaround may be to use a flat surface as proposed here [1], to build a
custom colorbar. E.g:
imagesc (eye (100) + 1)
h = colorbar ();
hi = get (h, "children");
dat = get (hi, {"xdata", "ydata", "cdata"});
z = [dat{3} dat{3}];
x = dat{1};
y = linspace (dat{2}(1), dat{2}(2), rows (z));
delete (hi)
surface (h, x, y, z, "edgecolor", "none");
axis (h, 'tight')
set (h, 'yscale', 'log')
[1] http://www.mathworks.com/matlabcentral/newsreader/view_thread/321116
_______________________________________________________
Reply to this item at:
<http://savannah.gnu.org/bugs/?42311>
_______________________________________________
Message posté via/par Savannah
http://savannah.gnu.org/