-
-
Notifications
You must be signed in to change notification settings - Fork 7.9k
Tweak streamplot plot_types example. #21124
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
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is the only example that uses a secondary color. What is the purpose of the contour here anyway? I think we can just remove it.
While at it, you could add ax.grid(False)
after the subplots commands. I think we should leave out the grid for all surface like plots (i.e. where x and y are the dependend variables).
Removed the grid. I think showing some contours is nice (to hint that the streamlines are indeed following the contour lines), but I can remove them if you feel strongly about it. |
- remove contour plot for simplicity. - don't set zorder. - Z doesn't need to be made positive.
removed the contour, then. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Anybody can merge after CI pass.
The point of plotting the streamplot over the underlying stream function is that a) it is the same data as the other contour plots, and b) that the two ways of looking at the data are intimately related. Of course the two aren't the same at finite resolution, but as dx/dy->0 they converge. |
I would support putting it back, but I don't feel overly strongly about it either. |
The primary goal is an example visual representation of the plot type. a) The data is not particularly important. Data should primarily be chosen to give a good repesentation of the plot type. This may or may not be the same data as for other plots. |
In general, when trying to teach something, the more you can reuse the same example in different ways, the better. Of course you should not sacrifice clarity to do so, but when possible it really helps get concepts across for readers to not have to change contexts a lot. |
Tweak streamplot plot_types example.
Tweak streamplot plot_types example.
the streamplot.
better?
before:


after:
PR Summary
PR Checklist
pytest
passes).flake8
on changed files to check).flake8-docstrings
and runflake8 --docstring-convention=all
).doc/users/next_whats_new/
(follow instructions in README.rst there).doc/api/next_api_changes/
(follow instructions in README.rst there).