I realized the name rotated isn't appropriate: supporting multi-dimensional coordinates is more general, e.g. if you have a curvilinear grid (which is approximated by straight edges). I also ran into the trouble of finding out how the coordinates are called. In your example, they are called xc and yc, but in many other cases they will have different names.
This implementation currently assumes that the last two logical dimensions are always called ("y", "x"), but the multi-dimensional coordinates may be arbitrarily named. They could technically be identified by their attrs (if set), but this seems much simpler.
This doesn't specifiy the x and y coordinates, so it works as before: it looks at the x and y dimensions/coordinates. In this case, they are unlabeled, so they are just a range of 0...N.
To succesfully use the multi-dimensional coordinates, specify them explicitly:
@roeldegoede:
I realized the name
rotated
isn't appropriate: supporting multi-dimensional coordinates is more general, e.g. if you have a curvilinear grid (which is approximated by straight edges). I also ran into the trouble of finding out how the coordinates are called. In your example, they are calledxc
andyc
, but in many other cases they will have different names.This implementation currently assumes that the last two logical dimensions are always called ("y", "x"), but the multi-dimensional coordinates may be arbitrarily named. They could technically be identified by their attrs (if set), but this seems much simpler.
Taking your example in the issue:
This doesn't specifiy the x and y coordinates, so it works as before: it looks at the x and y dimensions/coordinates. In this case, they are unlabeled, so they are just a range of 0...N.
To succesfully use the multi-dimensional coordinates, specify them explicitly:
This seems to work, if we check with a plot of the original:
The
.ugrid.plot
seems a bit sharper, maybe due to how to matplotlib treats a PolyCollection (bit of a surprise to me).