Skip to content
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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Gallery: simplify quiver example #4120

Merged
merged 4 commits into from Sep 15, 2021

Conversation

rcomer
Copy link
Member

@rcomer rcomer commented May 6, 2021

馃殌 Pull Request

Description

  • This example predates iris.plot.quiver but, now we have iris.plot.quiver we really should advertise it here!
  • I'm not sure why the 360 degree adjustment to the longitudes was required, but the plots work fine without it now.
  • Removed some minor redundancies:
    • Unused coord_categorisation import
    • First explicit call to plt.figure() (I initially also removed the second call to plt.figure() which was fine for interactive plotting and the gallery test, but Sphinx only produced one image containing the second contour and two colorbars).
    • Triple calculation of windspeed.

Consult Iris pull request check list

@bjlittle bjlittle self-assigned this Sep 15, 2021
Copy link
Member

@bjlittle bjlittle left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@rcomer Awesome, the example is a lot clearer now, thanks 馃憤

@trexfeathers
Copy link
Contributor

I admit I haven't looked, but do any of the changes here also apply to the recently added barbs plot example too?

@bjlittle bjlittle merged commit 5d44601 into SciTools:main Sep 15, 2021
@rcomer
Copy link
Member Author

rcomer commented Sep 15, 2021

@trexfeathers if I was going to be really picky, I would say that

  • magnitude and windspeed appear to be the same thing
  • I think both of the above should automatically be in knots because uwind and vwind are, so some of the convert_units calls are unnecessary
  • The call to plt.figure would happen "behind the scenes" anyway if not done explicitly

@rcomer
Copy link
Member Author

rcomer commented Sep 15, 2021

Thanks @bjlittle!

@rcomer rcomer deleted the simplify-quiver-example branch September 15, 2021 14:51
tkknight added a commit to tkknight/iris that referenced this pull request Sep 19, 2021
* main: (71 commits)
  Skip TestConstrainedLoad if data missing (SciTools#4319)
  Add 'Good First Issue' label to reasons an issue doesn't go stale (SciTools#4317)
  Gallery: simplify quiver example (SciTools#4120)
  Improve styling in a minor way in docs (SciTools#4314)
  bump version (SciTools#4310)
  Made clear we only test on Linux. (SciTools#4309)
  Updated environment lockfiles (SciTools#4308)
  Include Discussions in Getting Involved. (SciTools#4307)
  Fixed text to show as link. (SciTools#4305)
  [pre-commit.ci] pre-commit autoupdate (SciTools#4299)
  Updated environment lockfiles (SciTools#4298)
  cartopy feature download (SciTools#4304)
  Mesh Loading (AVD-1813) (SciTools#4262)
  reset whatsnew latest (SciTools#4288)
  Updated environment lockfiles (SciTools#4289)
  Update cube.py (SciTools#4287)
  Integrated whatsnew for v3.1 release (rc0) (SciTools#4285)
  Version changes and final whatsnew tweaks for 3v1rc0. (SciTools#4284)
  Missing whatsnew entries for 3.1 release. (SciTools#4283)
  Update CF standard name table to v77 (SciTools#4282)
  ...
tkknight added a commit to tkknight/iris that referenced this pull request Sep 22, 2021
* main: (94 commits)
  added support for make html-noapi and html-quick for the docs build (SciTools#4333)
  Refactor some netcdf save code (SciTools#4301)
  [pre-commit.ci] pre-commit autoupdate (SciTools#4329)
  Update to loading docs to cover absence of 'or' for constraints (SciTools#4321)
  update latest.rst.template (SciTools#4323)
  stable cartopy feature download (SciTools#4328)
  Skip TestConstrainedLoad if data missing (SciTools#4319)
  Add 'Good First Issue' label to reasons an issue doesn't go stale (SciTools#4317)
  Gallery: simplify quiver example (SciTools#4120)
  Improve styling in a minor way in docs (SciTools#4314)
  bump version (SciTools#4310)
  Made clear we only test on Linux. (SciTools#4309)
  Updated environment lockfiles (SciTools#4308)
  Include Discussions in Getting Involved. (SciTools#4307)
  Fixed text to show as link. (SciTools#4305)
  [pre-commit.ci] pre-commit autoupdate (SciTools#4299)
  Updated environment lockfiles (SciTools#4298)
  cartopy feature download (SciTools#4304)
  Mesh Loading (AVD-1813) (SciTools#4262)
  reset whatsnew latest (SciTools#4288)
  ...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants