[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Octave-bug-tracker] [bug #48664] imshow for binary data: colormap not h
From: |
Dan Sebald |
Subject: |
[Octave-bug-tracker] [bug #48664] imshow for binary data: colormap not handled correctly for gnuplot |
Date: |
Sat, 6 Aug 2016 07:31:31 +0000 (UTC) |
User-agent: |
Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:42.0) Gecko/20100101 Firefox/42.0 |
Follow-up Comment #6, bug #48664 (project octave):
OK, here's a new version of the patch, after having had some discussion on
color mapping:
https://savannah.gnu.org/bugs/?48666
I did significant rework of the way scaling is done. The code currently has
gnuplot cbrange as [clim(1):clim(2)], but that actually makes things more
difficult. Instead, I set up the cbrange to [1:cmap_sz] which means that the
linear mapping is pretty much as defined in terms of index value.
So, this new patch should fix the special logical-value images, and it should
also make the examples at the above link consistent with Qt toolkit. Try the
examples below.
a = rand(10,10);
imshow((a > 0.5));
imshow((a > 0.5), [1,0,0;0,1,0]);
set(gca,'climmode','manual');
set(gca,'clim',[3 5]);
clf
demo('surf', 1)
kids = get(gca,'Children');
set(kids(1),'cdatamapping','scaled')
set(gca,'climmode','manual')
set(gca,'clim',[0 1]);
set(kids(1),'cdatamapping','direct');
(file #38124)
_______________________________________________________
Additional Item Attachment:
File name: octave-gnuplot_bug48664_cdatamapping-djs2016aug06.patch Size:9 KB
_______________________________________________________
Reply to this item at:
<http://savannah.gnu.org/bugs/?48664>
_______________________________________________
Message sent via/by Savannah
http://savannah.gnu.org/