Skip to content

New block type for 'surface' plots#57

Open
johnomotani wants to merge 5 commits into
t-makaro:masterfrom
johnomotani:surface
Open

New block type for 'surface' plots#57
johnomotani wants to merge 5 commits into
t-makaro:masterfrom
johnomotani:surface

Conversation

@johnomotani

@johnomotani johnomotani commented Apr 5, 2021

Copy link
Copy Markdown
Contributor

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
Copy Markdown
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
Copy Markdown
Contributor Author

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

@t-makaro t-makaro left a comment

Copy link
Copy Markdown
Owner

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