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

New block type for 'surface' plots #57

Open
wants to merge 5 commits into
base: master
Choose a base branch
from

Conversation

johnomotani
Copy link
Contributor

@johnomotani johnomotani commented Apr 5, 2021

Adds a new Block subclass Surface to make surface plots using matplotlib's plot_surface() method.

Makes animation by clearing plot and re-drawing. It was suggested that this is the best solution as majority of time is drawing rather than updating the array anyway, see https://stackoverflow.com/a/45713451/13577592.

Making the vertical axis scale fixed doesn't work at the moment. Seems to be a bug with matplotlib's vmin and vmax arguments, see matplotlib/matplotlib#19870.

Still needs tests and documentation.

Makes animation by clearing plot and re-drawing. It was suggested that
this is the best solution as majority of time is drawing rather than
updating the array anyway, see
https://stackoverflow.com/a/45713451/13577592
@johnomotani
Copy link
Contributor Author

Setting the z-axis limits needed to use ax.set_zlim(), not vmin and vmax arguments (which only affect the color scale). Fixed now.

@johnomotani
Copy link
Contributor Author

Tests and documentation added. I think this is ready for review/merge now.

Copy link
Owner

@t-makaro t-makaro left a comment

Choose a reason for hiding this comment

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

Looks fantastic to me. Only thing that I notice is that docs/source/tutorial/surface.ipynb and the gif, should probably be under docs/source/gallery/.

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.

2 participants