Open beckermr opened 8 months ago
Oh this is a fun one. The problem isn't that transAxes
is wrong. It's that I have an automatic override to always use the data transformation. This needs to be made more sophisticated.
Oh it's actually easier than that. For the call to sp.ax.text
it defaults to lonlat=True
which says you want to specify positions as longitude/latitude. If you add lonlat=False
to the last call then it'll work as expected. (Though you'll want to change 170, 90 or the text will go off into outer space).
Ah ok. So this is where some of stuff we talked about on slack comes in. The mix of APIs here is confusing maybe or is that a known thing? That might just be me ofc. It's the counter intuitive patterns that don't match the MPL docs that make this tough.
You can't use transData
in one of these projections. You have to use sp.ax.projection
as the transform. There's another layer of translation here, and that's the only way this works that I could figure out.
🤯 this is so confusing. Why isn't transData mapped to projection?
It appears that transAxes is actually the data coordinate system when it should be [0, 1] for the overall plot: