Skip to content

Conversation

hohlraum
Copy link

Particles can be automatically laballed by plot.annotate(). Also includes a style dictionary similar to that for the markers and background image.

@danielballan
Copy link
Member

Nice!

I notice this could be made more flexible by accepting a string argument for label. So, for example, if I wanted to label particles by their mass, I would pass label='mass'. But if you don't feel inspired to add that to this PR, we can consider this enhancement separately in a backward-compatible way.


@make_axes
def annotate(centroids, image, circle_size=None, color=None,
def annotate(centroids, image, circle_size=None, label=False, color=None,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

please put new kwargs at the end of the list (think of the case where someone is using annotate(cent, img, 5, 'b') this is now silently (as in the code runs) but does something different).

@caspervdw
Copy link
Member

@hohlraum Are you planning to update the PR? It would be nice to have this addition in the next release.

@danielballan
Copy link
Member

@hohlraum Any chance you'll be able to revisit this?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants