Improve docstring of Axes.spy#11366
Conversation
| axes. | ||
| - 'equal': Ensures an aspect ratio of 1. Pixels will be square | ||
| (unless pixel sizes are explicitly made non-square in data | ||
| coordinates using *extent*). |
There was a problem hiding this comment.
You cannot use extent on spy (not sure if you should, though).
|
|
||
| If *marker* and *markersize* are *None*, useful kwargs include: | ||
| For the image style, you can pass any parameters supported by | ||
| `~.Axes.imshow`. Commonly used parameters include *cmap* and |
There was a problem hiding this comment.
Not true, you cannot pass extent. You can also not pass interpolation.
There was a problem hiding this comment.
I've changed this to a whitelist of just a very few parameters. Note that #11367 will raise a TypeError for the above mentioned cases. Other imshow() parameters are technically allowed, but don't make sense for plotting a sparsity pattern. They are just not mentioned. I'm unsure if one should pohibit them explicitly by raising a TypeError as well. For now, I don't see the neccessity and that would be beyond this PR anyway, which is strictly docstring-only.
| * *alpha* | ||
| For the marker style, you can pass any parameters | ||
| supported by `~.Axes.plot. Commonly used parameters include | ||
| *color*, *marker* and *markersize*. |
There was a problem hiding this comment.
You cannot pass linestyle.
Also marker and markersize are already arguments of spy, so one wouldn't list them as "Additional Parameters" as well,right?
|
@meeseeksdev backport to v2.2.x |
|
There seem to be a conflict, please backport manually |
|
It looks like the docs for |
|
Correct. But you can already view the improved version here. |
PR Summary
As part of #10148: Docstring update for
Axes.spy.