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

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

[Octave-bug-tracker] [bug #52799] listener on axes "colormap" property d


From: Rik
Subject: [Octave-bug-tracker] [bug #52799] listener on axes "colormap" property does not work
Date: Wed, 3 Jan 2018 14:32:53 -0500 (EST)
User-agent: Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:55.0) Gecko/20100101 Firefox/55.0

URL:
  <http://savannah.gnu.org/bugs/?52799>

                 Summary: listener on axes "colormap" property does not work
                 Project: GNU Octave
            Submitted by: rik5
            Submitted on: Wed 03 Jan 2018 11:32:52 AM PST
                Category: Plotting
                Severity: 3 - Normal
                Priority: 5 - Normal
              Item Group: Incorrect Result
                  Status: None
             Assigned to: None
         Originator Name: 
        Originator Email: 
             Open/Closed: Open
         Discussion Lock: Any
                 Release: dev
        Operating System: Any

    _______________________________________________________

Details:

While re-writing colorbar.m I came across the fact that listeners on the axes
property "colormap" are not executed.  This is probably because "colormap" for
axes is a complicated property implemented by a function rather than just a
regular property.

Sample code, which is also attached, is


close all;

function cb_fig_colormap (hf, ~)
  fprintf (stderr, "Figure callback executed\n");
  fflush (stderr);
endfunction

function cb_axes_colormap (hf, ~)
  fprintf (stderr, "Axes callback executed\n");
  fflush (stderr);
endfunction

hf = figure ();
hax = gca ();
addlistener (hf, "colormap", @cb_fig_colormap);
addlistener (hax, "colormap", @cb_axes_colormap);

fprintf (stderr, "changing Axes colormap\n");
set (hax, "colormap", jet (8));
assert (get (hax, "colormap"), jet(8));
fprintf (stderr, "changing Figure colormap\n");
set (hf, "colormap", jet (16));
assert (get (hf, "colormap"), jet(16));







    _______________________________________________________

File Attachments:


-------------------------------------------------------
Date: Wed 03 Jan 2018 11:32:52 AM PST  Name: tst_cb_colormap.m  Size: 609B  
By: rik5

<http://savannah.gnu.org/bugs/download.php?file_id=42811>

    _______________________________________________________

Reply to this item at:

  <http://savannah.gnu.org/bugs/?52799>

_______________________________________________
  Message sent via/by Savannah
  http://savannah.gnu.org/




reply via email to

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