[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Octave-bug-tracker] [bug #52053] clim values should be cast to double b
From: |
Rik |
Subject: |
[Octave-bug-tracker] [bug #52053] clim values should be cast to double before applying |
Date: |
Mon, 18 Sep 2017 16:13:57 -0400 (EDT) |
User-agent: |
Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:55.0) Gecko/20100101 Firefox/55.0 |
Update of bug #52053 (project octave):
Status: Need Info => Confirmed
Summary: GUI becomes unresponsive when using slice() with
logical array => clim values should be cast to double before applying
_______________________________________________________
Follow-up Comment #7:
I can't reproduce the GUI hang on either Linux, or on a Windows XP VM.
However the error message is definitely reproducible.
>> [x,y,z]=meshgrid([1:5],[1:5],[1:5]);
>> vox = true(5,5,5);
>> vox(3,3,3)=false;
>> slice(x,y,z,vox,2,3,3)
error: invalid value for array property "clim"
error: called from
slice at line 146 column 5
Given the testing, it does seem like trying to set clim to a logical value
should fail. That part is okay. Maybe we just need to cast the clim values
to double in slice before applying them as Pantxo suggests?
I used grep to find similar instances of setting clim in the m-files included
in Octave's distribution.
image/image.m:188: set (hax, "clim", double ([mn, mx]));
image/imagesc.m:106: set (hax, "clim", climits);
image/imshow.m:207: set (get (htmp, "parent"), "clim", display_range);
plot/appearance/caxis.m:92: set (ca, "clim", [ax(1), ax(2)]);
plot/draw/private/__contour__.m:329: set (ca, "clim", [min(lev)-1,
max(lev)+1], "layer", "top");
plot/draw/private/__contour__.m:331: set (ca, "clim", [min(lev),
max(lev)], "layer", "top");
plot/draw/private/__scatter__.m:259: set (ax, "clim", clim);
plot/draw/private/__scatter__.m:262: set (ax, "clim", [clim(1),
max(c(:))]);
plot/draw/slice.m:146: set (hax, "clim", [minv, maxv]);
Interestingly, image.m already casts the values into double. That was
probably intentional.
Besides slice(), there are a few other instances that need to be reviewed.
_______________________________________________________
Reply to this item at:
<http://savannah.gnu.org/bugs/?52053>
_______________________________________________
Message sent via/by Savannah
http://savannah.gnu.org/
- [Octave-bug-tracker] [bug #52053] GUI becomes unresponsive when using slice() with logical array, Georg Wiora, 2017/09/18
- [Octave-bug-tracker] [bug #52053] GUI becomes unresponsive when using slice() with logical array, Georg Wiora, 2017/09/18
- [Octave-bug-tracker] [bug #52053] GUI becomes unresponsive when using slice() with logical array, Georg Wiora, 2017/09/18
- [Octave-bug-tracker] [bug #52053] GUI becomes unresponsive when using slice() with logical array, Pantxo Diribarne, 2017/09/18
- [Octave-bug-tracker] [bug #52053] GUI becomes unresponsive when using slice() with logical array, Georg Wiora, 2017/09/18
- [Octave-bug-tracker] [bug #52053] GUI becomes unresponsive when using slice() with logical array, Georg Wiora, 2017/09/18
- [Octave-bug-tracker] [bug #52053] GUI becomes unresponsive when using slice() with logical array, Pantxo Diribarne, 2017/09/18
- [Octave-bug-tracker] [bug #52053] clim values should be cast to double before applying,
Rik <=
- [Octave-bug-tracker] [bug #52053] clim values should be cast to double before applying, Pantxo Diribarne, 2017/09/19
- [Octave-bug-tracker] [bug #52053] clim values should be cast to double before applying, Georg Wiora, 2017/09/19
- [Octave-bug-tracker] [bug #52053] clim values should be cast to double before applying, Pantxo Diribarne, 2017/09/19
- [Octave-bug-tracker] [bug #52053] clim values should be cast to double before applying, Rik, 2017/09/20