Remove quickplot unit label for time reference coordinates. Closes #615.#616
Merged
esc24 merged 1 commit intoSciTools:masterfrom Jul 17, 2013
Merged
Conversation
lib/iris/quickplot.py
Outdated
Member
There was a problem hiding this comment.
This try except confused me at first. I now realise it's because u_object can still be None despite line 102. Perhaps
xunits = u_object is not None and not u_object.units.is_time_reference()is a little clearer, or just add a comment.
Member
|
Really nicely put together PR with a comprehensive test to boot. Nice job @ajdawson. 👍 |
…iTools#615. 1D plots in quickplot omit the units part of the axis label when the coordinate it represents is given as a time reference, and hence will have been converted to an absolute date/time.
Member
Author
|
@esc24 I used your suggestion to clarify the part where I determine if the x-axis should print a unit. |
esc24
added a commit
that referenced
this pull request
Jul 17, 2013
Remove quickplot unit label for time reference coordinates. Closes #615.
rcomer
added a commit
to rcomer/iris
that referenced
this pull request
Oct 31, 2023
trexfeathers
pushed a commit
that referenced
this pull request
Nov 3, 2023
* Don't used mpl date2num * removed units for time coords due to not matching autoticks * update imagerepo.json * Revert change from #616, as this is now handled within _title * whatsnew * update test data version --------- Co-authored-by: alex chamberlain-clay <a.chamberlain-clay@metoffice.gov.uk>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR allows 1D plots in quickplot to omit the units part of the axis label when the coordinate it represents is given as a time reference, and hence will have been converted to an absolute date/time.
This change applies only to 1D plots because handling of time coordinates in 2D plots is not yet implemented, so the unit is still relevant there. This is the reason the implementation modifies
_get_titlesrather than_title.