Apply colorbar formatter to cursor Z data#5425
Apply colorbar formatter to cursor Z data#5425JGoutin wants to merge 1 commit intomatplotlib:masterfrom JGoutin:ZdataCursorWithColorbarFormatter
Conversation
|
This logic should be in the artist, not in backbend bases. |
|
Just had a realization as I am heading out the door... we are going to have On Fri, Nov 6, 2015 at 5:04 PM, Thomas A Caswell notifications@github.com
|
|
On 2015/11/06 12:04 PM, Thomas A Caswell wrote:
It looks like the override of Artist.format_cursor_data() should go in |
|
@efiring Then we get into MI territory as |
|
Yes, I know, I'm concerned about that also. An alternative would be to duplicate the format_cursor_data override in each individual mappable class, and I don't see that as an acceptable option. Another alternative is to put the full logic into Artist.format_cursor_data, but I doubt you like that idea any more than I do. ScalarMappable is the logical place for it; I presume there is a way to do it, but I haven't looked to see whether any special tricks or larger changes would be required. |
|
Maybe class Artist:
def get_cursor_data(self, event):
"""
Get the cursor data for a given event.
"""
try:
return self._get_cursor_data(event)
except AttributeError:
return Noneand then have sub-classes provide Another option is to not provide a default |
|
@tacaswell, good idea, but we are mixing up two attributes here because of my error in an earlier comment. The present issue is entirely about |
|
Superseeded by #12459, I think. |
See Issue #5409.