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

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

[Octave-bug-tracker] [bug #65632] legend produces patch error due to cda


From: Nicholas Jankowski
Subject: [Octave-bug-tracker] [bug #65632] legend produces patch error due to cdata size mismatch
Date: Fri, 10 May 2024 13:06:45 -0400 (EDT)

Follow-up Comment #9, bug #65632 (group octave):

trying different combinations of legend calls and set() changes to color data,
this seems to solve the problem for any patch or surf objects. 

previously it would pass whatever color data the patch/surf had to 
__go_patch__ which creates a dummy 3-point patch object (the same as running
h=patch()).  That geometry would rarely match the shape of the main figure's
cdata, which now triggers an error.  the patch reduces this to a single cdata
color value, which is all that the legend 'icon' should display anyway. 
running a 2-d median should either pull a single median colormap value or
dim-3 RGB value, which should cover all valid cdata shapes. 

I don't know how matlab selects a legend color for multi-color patches, but
this seems as valid as any. can always tweak that determination later if it
needs to be adjusted. 


    _______________________________________________________

Reply to this item at:

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

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




reply via email to

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