[edited as per comments 05-mar-22]
- I found the problem: the marker point was not scaled to the same units as the x-axis data. I was over thinking it. Thanks for suggesting I try a simple example to recreate. I shouldn't have gotten overwhelmed by the matplotlib man pages. Sorry everyone!
I'm relatively new to Pyplt. I'm having trouble plotting a marker in absolute data coordinates, because at times Pyplt puts the x-axis into relative coordinates about a center value.
In other words, when the x-data min and max are numerically far apart, everything plots as expected. If x-axis min and max are very close together, Pyplot switches to a relative axis mode.
For example, 1.59e3 to 1.61e3 plots as expected. But when the data is from 1.599e3 to 1.601e3 (example), the axis switches from absolute numbers to a relative axis with 0 in the middle, and a label underneath saying 1.60000000e3.
This is fine, and looks great too. But when I try to add a marker in absolute data coordinates, i.e. centred on a data point, the axis goes haywire and goes from 0 to 1.6e9, with the data plotted itself at around 0. The marker ends up in the right place, though.
I see documentation for matplotlib transforms, but it seems to apply only to matlab? Or I'm confused (the most likely issue). Maybe my search-fu is out of whack. How can I deal with the switch to relative axes?
[Example relative axes][1]