Shouldn't the 3.1 change to line plot defaults to plot the independent variable vertically if it's vertical or "y" have been only for vertical ones? #4493
Labels
Good First Issue
A good issue to take on if you're just getting started with Iris development
Peloton 🚴♂️
Target a breakaway issue to be caught and closed by the peloton
#3906
seems overdone to me.
https://scitools-iris.readthedocs.io/en/stable/whatsnew/3.1.html?highlight=vertical%20axis#features
says it was "to automatically place the cube on the x axis if the primary coordinate being plotted against is a vertical coordinate" for line plots. That is such standard practice in Earth science that I am confident it would have been coded from the start in a package created by scientists from the field, so I'm totally in favour.
But what was actually implemented is, as stated at
#3906
to "Put cube data on the x axis if plotting just a cube against a vertical or y coordinate", & the addition of "y coordinate" is wrong in my opinion.
I can see how programmers could assume that a dimension that is called "y" by iris would be thought of as "y-axis-like" by scientists, but this is not true. Graphs plotted against latitude conventionally have latitude as the x-axis, the conventional place for the independent variable. (There is one important exception: when the graph against latitude is lined up beside a map, to show e.g. the zonal mean, when of course the map normally has latitude running vertically on the page - but this is a fairly small fraction of cases. I can't remember ever doing it in my career.)
I think any look at the literature will confirm this. Basically I suppose we see the "y axis" of line plots as a vertical, while python's "Y" is horizontal (in all my experience). Where a 2D field is being plotted & one non-vertical dimension has to be vertical on paper, yes, latitude is normally the one, following the general convention for maps, but that's another issue.
So I reckon the "y" part should be reverted - preferably soon, not waiting till lots of people are using a version with the change, disliking it & saying so! (I don't suggest testing for the exceptional case I mentioned as I doubt iris can access the details of a previous plot, let alone a following one, & it needs the zonal-mean plot much narrower than the map so the user will need to get into matplotlib.gridspec anyway, & the change to the call to iris plot to flip from the default is comparatively simple.)
The text was updated successfully, but these errors were encountered: