-
-
Notifications
You must be signed in to change notification settings - Fork 7.9k
Apply colorbar formatter to cursor Z data #5425
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Apply colorbar formatter to cursor Z data #5425
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 None and 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.