-
Notifications
You must be signed in to change notification settings - Fork 279
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
annotate_clear is unclear #2564
Comments
I like this name change -- it seems more natural. |
I like this change! I issued a small PR to address this (#2569) |
What if: we also added an |
I think your suggestion would look amazing on a figure using the |
I agree that the new propropsed names would be clearer, but I do have a minor concern with it. |
Hm, that's a good point @neutrinoceros. I wonder if there's a way we could make them discoverable without having ambiguous names? In the original PR I pointed out that with |
I think namespacing them would help, but is perhaps a bit too far. For
instance, `p.annotate.vectors()` or something. But, I agree, this is a
good point.
…On Wed, Apr 29, 2020 at 3:47 PM Madicken Munk ***@***.***> wrote:
Hm, that's a good point @neutrinoceros <https://github.com/neutrinoceros>.
I wonder if there's a way we could make them discoverable without having
ambiguous names? In the original PR I pointed out that with annotate_list
the function really sounds like the user would be annotating a list to
their plot, not listing the annotations of the plot. I can easily see a
user make this mistake with the list function (though clear is a little
more nuanced).
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#2564 (comment)>, or
unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAAVXO22LS3ULP3HMEVVXNDRPCG6NANCNFSM4MSBY74A>
.
|
@matthewturk I think we should allow annotate_clearly to take a series of descriptive words so that the needed emphasis can be changed by the user. For example |
I was thinking the same thing. p.annotate.sphere(...)
sphere = p.annotate.list_annotations()[0]
p.annotate.clarify(sphere)
p.annotate.clear_annotations() |
I really like the namespacing idea and I think it would be more elegant to access the annotations. However, I'm concerned that namespacing all of our plot callbacks would be a major change for our users and would have to be included in a major release. Maybe we could set up the namespacing infrastructure just for operations on annotations (like clear and list). So annotations like |
I second @munkm 's suggestion. |
In this case |
Indeed. As I said I have no strong opinion of what's best :-) |
I think you bring up a good point @neutrinoceros and we need to think longer term about the namespace name! for now I propose that we allow both #2562 and #2569 to be merged with this new naming convention. Once we decide on a good namespace name (either |
As @neutrinoceros noted, when I created the |
quick note that there's an old issue related to this one : #547 |
This is an issue I'm raising from #2498 and #2562 . In that PR a new function is added that lists the existing annotations added to a plot object. Following the convention of
annotate_clear()
, which clears the annotations on the plot, the author created a method calledannotate_list()
. I think in the case of these functions, we should modify them so that the action is the first word in the method, e.g.clear_annotations()
andlist_annotations()
, since these are methods that operate on the plot annotations, rather than annotating a plot.annotate_list()
has been changed tolist_annotations()
by the author of that PR.annotate_clear()
should be updated to match it. In this case, I think we'll want to maintain backwards compatibility with the old method name with a deprecation warning onannotate_clear
, we'll want to update all uses of annotate_clear() in the docs to beclear_annotations()
, and we'll want to add a link in the api docs to the updated function.Does anybody have any issues with changing this?
The text was updated successfully, but these errors were encountered: