Skip to content

Added the ability for plot to put the cube data on the x axis if plotting just a cube against a vertical or y coordinate. - #2901

Closed
pelson wants to merge 1 commit into
SciTools:masterfrom
pelson:1d_plot_against_yz
Closed

Added the ability for plot to put the cube data on the x axis if plotting just a cube against a vertical or y coordinate.#2901
pelson wants to merge 1 commit into
SciTools:masterfrom
pelson:1d_plot_against_yz

Conversation

@pelson

Copy link
Copy Markdown
Member

Closes#612.

Would need a what's new.

@pelson

Copy link
Copy Markdown
MemberAuthor

Looks like a genuine failure. Old test: https://scitools.github.io/test-iris-imagehash/images/f15f832a5ee0492a36e8b9ed8fa4f2b629dace4921681e17a9807e7c89835ef0.png

New test:

result-iris tests test_plot test1dplotmultiargs test_cube 0

@ajdawson

Copy link
Copy Markdown
Member

That is an altltude vs temperature plot, the new one is correct for the change you made.

@ajdawson

Copy link
Copy Markdown
Member

Others are either altitude vs temperature or latitude vs temperature, both of which should be affected by this PR, so all looks good to me.

Comment threadlib/iris/plot.py Outdated
# is vertical-like, put the coordinate on the y axis, and the data o
# the x.
if (isinstance(v_object, iris.cube.Cube)
and iris.util.guess_coord_axis(u_object) in ['Y', 'Z']):

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

This is your coding standards error, the and should be on the previous line.

Comment threadlib/iris/quickplot.py Outdated
def _label_1d_plot(*args):
if len(args) > 1 and isinstance(args[1],
u_obj, v_obj, _, _, _ = iplt._get_plot_objects(args)
if len(args) > 1 and isinstance(u_obj,

Copy link
Copy Markdown
MemberAuthor

Choose a reason for hiding this comment

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

If statement is now not needed.

@ajdawson

Copy link
Copy Markdown
Member

Probably a small amount of effort needed to bring this up to speed.

…otting just a cube against a vertical or y coordinate.
@pelson

Copy link
Copy Markdown
MemberAuthor

I've rebased and fixed the pep8 issue. I'm unlikely to get the time to do the image hashes soon unfortunately.

@pelson

Copy link
Copy Markdown
MemberAuthor

Closing as this has gone stale. Implementation is solid if somebody want to take it on and get it over the finishing line.

Sign up for freeto 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.

2 participants

@pelson@ajdawson