Skip to content
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

More blocks #5

Open
3 of 7 tasks
t-makaro opened this issue Aug 9, 2018 · 6 comments
Open
3 of 7 tasks

More blocks #5

t-makaro opened this issue Aug 9, 2018 · 6 comments
Labels
Milestone

Comments

@t-makaro
Copy link
Owner

t-makaro commented Aug 9, 2018

I'm opening a bunch of issues just to track progress.

This one is for new blocks!

The following have methods to update data which makes them prime candidates for blocks.

  • Scatter plots
  • Annotations

More blocks

  • A block to shift the x/y-limits of an axis would be nice.
  • A title block
  • Update block (similar to the Nuke block but it doesn't clear the axes which allows for people to write a larger variety of custom updating blocks.)

The following blocks would be nice, but matplotlib doesn't have update methods for them.

  • histograms
  • pie charts
@t-makaro t-makaro added this to the 0.3 milestone Sep 9, 2018
@Atticuss
Copy link

Any update on this by chance? Came back to this hoping to animate some scatter plot data.

@t-makaro
Copy link
Owner Author

I actually have most of the scatter plot block written. It can animate the points' location and size, but not the color. I've been considering cutting a release with all my improvements up to this point (maybe next weekend? I've been busy).

@t-makaro t-makaro modified the milestones: 0.3, 0.4 Oct 29, 2018
@TomNicholas
Copy link
Contributor

Animating contour plots would also be nice, this stackoverflow post seems to show that it is possible.

(Also title block is done)

@t-makaro
Copy link
Owner Author

t-makaro commented Feb 2, 2019

The trick in that stack overflow post of creating and deleting artists is intriguing. Great care would need to be taken to not have a memory leak.

@t-makaro t-makaro modified the milestones: 0.4, 0.5.0 Feb 22, 2019
@TomNicholas
Copy link
Contributor

How about a colorbar block? At the moment the colorbar must be static, but at some point someone might want to use a colorbar whose limits evolve with the data?

@ianhi
Copy link
Contributor

ianhi commented Oct 2, 2020

Hey @t-makaro great library! The usage of FuncAnimation to implement a play button is super clever.

I've been building a similar library mpl-interactions and also have a list like yours (mpl-extensions/mpl-interactions#59). I'm hoping we can share some of the figuring out of how to update various matplotlib elements. For example:

implementing hist:
I ended up implementing my own using a PatchCollection and I'd be happy to have it included in animatplot (see: https://github.com/ianhi/mpl-interactions/blob/0c6508cafee0c7e709d1d8ef9f12a3dadef70558/mpl_interactions/pyplot.py#L400-L419)

Also, in matplotlib 3.4 there will be a stairs method https://matplotlib.org/devdocs/api/_as_gen/matplotlib.axes.Axes.stairs.html?highlight=stairs#matplotlib.axes.Axes.stairs which can create generic histogram like objects that have a set_data method (implemented in matplotlib/matplotlib#18275)


re library similarity:

Our libraries accomplish similar goals but definitely have substantive differences such that I think we don't really infringe on eachother and can coexist happily :)

animatplot is much easier to save a gif from and works natively with arrays. Whereas mpl_interactions considers functions to be fundamental object that gets plotted and puts half of the focus onto ipywidgets.

Given my reliance on ipywidgets I probably would have made my library even if I'd been aware of animatplot earlier but back this summer when I started work I actually thought animatlplot was only for animations, I didn't realize it could be used interactively. I think that I was fooled by animatplot only being placed under the Animations section of the matplotlib 3rd party packages list. I think you have a real claim to also be listed under the Interactions heading. If you open a PR there adding a link to the interactions section as well I'd show up an argue for it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants