-
Notifications
You must be signed in to change notification settings - Fork 300
Iris animate docs #2731
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
Iris animate docs #2731
Conversation
lib/iris/experimental/animate.py
Outdated
| * plot_func (:mod:`~iris.plot` or :mod:`~iris.quickplot` plot): | ||
| Plotting function used to animate. | ||
| Plotting function used to animate. Must accept the signature | ||
| ``plot_func(cube, vmin, vmax, coords)``. contourf, contour, pcolor and |
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.
It needs to be clear that the vmin, vmax and coords arguments are all supplied as keyword arguments (and thus can be in any order). It may also be wise to link to the functions in question as in
:func:`~iris.plot.contourf`
I can't remember if this works well for iris.quickplot as well as iris.plot, perhaps that can be included too?
pp-mo
left a comment
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.
Looks like a useful enhancement.
Don't forget though, you will need to update the year date in the file header comments.
Iris actually has a test to check these : TestLicenceHeaders in iris/tests/test_coding_standards.py.
lib/iris/experimental/animate.py
Outdated
| * plot_func (:mod:`~iris.plot` or :mod:`~iris.quickplot` plot): | ||
| Plotting function used to animate. | ||
| Plotting function used to animate. Must accept the signature |
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.
Not your fault, but I think the line above is nonsensical,
renders as "plot_func (plot or quickplot plot):".
I'd guess that should really be ""plot or quickplot function" ?
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.
Remove the ~ from the front so that they render with full names, perhaps like this:
* plot_func (:mod:`iris.plot` or :mod:`iris.quickplot` plotting function)
lib/iris/experimental/animate.py
Outdated
| ``plot_func(cube, vmin=vmin, vmax=vmax, coords=coords)``. | ||
| :func:`~iris.plot.contourf`, :func:`~iris.plot.contour`, | ||
| :func:`~iris.plot.pcolor` and :func:`~iris.plot.pcolormesh` | ||
| all accept this signature by default. |
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.
Not sure about the last bit :
I don't think "by default" means anything in this case -- surely nothing can affect the valid function syntax ?
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.
Agreed, perhaps we should say
... all conform to this signature
or
... all have this signature
f129a07 to
d538fe9
Compare
d538fe9 to
1dc84f3
Compare
|
LGTM. Thanks @LukeC92. |
I have amended the documentation for the iris animate tool to make it explicitly clear which functions it will accept.