Is it possible to set x & y limits in world coordinates?
tomr-stargazer opened this issue · 3 comments
Hi all,
I can't seem to find anything in the documentation/API explaining how to set the x & y limits of a plot in the data/world coordinates, e.g. like this:
ax.set_xlim(0, 100, transform=ax.get_transform('world')
and when I call ax.set_xlim()
, I seem to only be able to change the scaling in pixel coordinates. Is such functionality present, such that I've missed it?
My apologies if this isn't the appropriate place for a question like this.
Not currently. One complication is that it's not clear what 'x' and 'y' mean in that context when the world coordinates are not aligned with the pixel axes. I'll need to think about how we can best address this in a generic way.
@astrofrog
That makes sense, Tom. Would it be too crufty to tack-on a method that checks whether the coordinates are aligned with the pixel axes, and does the transformation accordingly, but otherwise returns a NotImplementedError
or something analogous to that?
I don't know what the distribution of use-cases for wcsaxes
is, but I imagine it's plausible that enough folks use image-aligned axes such that the above methods might be helpful - at least, it would in my case, for almost every use of wcsaxes I've had so far. (perhaps selfish thinking on my part!)