[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Octave-bug-tracker] [bug #60897] caxis affected by rectangle and patch
From: |
Ryan Gray |
Subject: |
[Octave-bug-tracker] [bug #60897] caxis affected by rectangle and patch graphic without scaled color |
Date: |
Wed, 1 Sep 2021 22:08:15 -0400 (EDT) |
User-agent: |
Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/92.0.4515.159 Safari/537.36 |
Follow-up Comment #4, bug #60897 (project octave):
Rooting around the source code the best I can (not looked at it before), it
seems that the set method for the patch cdata property calls (I think)
patch::properties::set_cdata which calls update_cdata and that function has
the code that seems to do the clim setting. From graphics.in.h:5131:
void update_cdata (void)
{
update_fvc ();
update_normals (false);
if (cdatamapping_is ("scaled"))
set_clim (m_cdata.get_limits ());
else
m_clim = m_cdata.get_limits ();
}
However, when the patch is created as in the example, the cdata property winds
up empty down in __patch__.m when it calls __go_patch__ (which I can't
find yet), which is the default value, and so I think it may not call
set_cdata in that case when creating the patch, and it doesn't seem to be
called indirectly either when the facecolor property is set, which maybe it
should or at least have the relevant part from update_cdata. In other words,
it seems you could add an update_facecolor method to patch::properties that
sets the clim whenever facecolor is set:
void update_facecolor (void)
{
if (cdatamapping_is ("scaled"))
set_clim (m_cdata.get_limits ());
else
m_clim = m_cdata.get_limits ();
}
And add a "u" to the facecolor property definition in graphics.in.h(4984) to
include a call to it when generating graphics.h:
color_property facecolor u , color_property (color_values (0, 0, 0),
radio_values ("none|flat|interp"))
I've not yet tried to go look at older code to see if I can figure out why it
worked back in Octave 5.2.
_______________________________________________________
Reply to this item at:
<https://savannah.gnu.org/bugs/?60897>
_______________________________________________
Message sent via Savannah
https://savannah.gnu.org/
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Octave-bug-tracker] [bug #60897] caxis affected by rectangle and patch graphic without scaled color,
Ryan Gray <=