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

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

[Octave-bug-tracker] [bug #65384] image 'cdata' property fails to update


From: Rik
Subject: [Octave-bug-tracker] [bug #65384] image 'cdata' property fails to update class-dependent color behavior
Date: Thu, 29 Feb 2024 00:55:21 -0500 (EST)

Follow-up Comment #2, bug#65384 (group octave):

You can reproduce the Matlab output by running the commands as before and then
adding one more


caxis ('auto');


If you check 'clim' and 'climmode' immediately after the call to imagesc you
will find that they are [0, 255] and 'manual' respectively.  When you change
the data to be of type double, the 'clim' value does not update because it is
set to 'manual'.

See image.m and this block


  if (do_new && ! ishold (hax))
    ## Set axis properties for new images
    ## NOTE: Do this before calling __go_image__ so that image is not drawn
    ##       once with default auto-scale axis limits and then a second time
    ##       with tight axis limits.
    if (! isempty (img))
      if (isempty (get (hax, "children")))
        axis (hax, "tight");
      endif

      if (ndims (img) == 3)
        if (isinteger (img))
          mn = intmin (img);
          mx = intmax (img);
          set (hax, "clim", double ([mn, mx]));
        endif
      endif

    endif  # ! isempty (img)


Maybe we need to recode the bit starting with "isinteger"


    _______________________________________________________

Reply to this item at:

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

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




reply via email to

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