Repository navigation
Tweak streamplot plot_types example. - #21124
Conversation
There was a problem hiding this comment.
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. |
timhoffm
left a comment
There was a problem hiding this comment.
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
pytestpasses).flake8on changed files to check).flake8-docstringsand 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).