octave-bug-tracker
[Top][All Lists]
Advanced

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

[Octave-bug-tracker] [bug #64287] Calling colormap after colorbar causes


From: Arun Giridhar
Subject: [Octave-bug-tracker] [bug #64287] Calling colormap after colorbar causes error
Date: Sat, 10 Jun 2023 09:28:35 -0400 (EDT)

Follow-up Comment #4, bug #64287 (project octave):

This works properly, but it looks complicated. Is there a simpler way?


%!test
%! lasterror ("reset");
%! unwind_protect
%!   hf = figure ("visible", "off");
%!   imagesc (reshape (1:100, 10, 10));
%!   colorbar;
%!   colormap (flip (gray (32)));
%!   colorbar;
%! unwind_protect_cleanup
%!   close (hf);
%! end_unwind_protect
%! assert (isempty (lasterr))


Gives:


octave:1> test colorbar
error: 'd' undefined near line 491, column 21
error: called from
    colorbar>cb_colormap at line 491 column 7
    colormap at line 133 column 10
    __test__ at line 8 column 4
    test at line 682 column 11
***** test
 lasterror ("reset");
 unwind_protect
   hf = figure ("visible", "off");
   imagesc (reshape (1:100, 10, 10));
   colorbar;
   colormap (flip (gray (32)));
   colorbar;
 unwind_protect_cleanup
   close (hf);
 end_unwind_protect
 assert (isempty (lasterr))
!!!!! test failed
assert (isempty (lasterr)) failed




    _______________________________________________________

Reply to this item at:

  <https://savannah.gnu.org/bugs/?64287>

_______________________________________________
Message sent via Savannah
https://savannah.gnu.org/




reply via email to

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