Skip to content
Advertisement

Tag: annotate

Difference between ‘data’ and ‘axes fraction’ in matplotlib?

What does xycoords=(‘data’,’axes fraction’) mean? I have read https://matplotlib.org/stable/tutorials/text/annotations.html and it says that ‘data’ uses the axes data coordinate system, what does this mean? According to https://matplotlib.org/stable/tutorials/advanced/transforms_tutorial.html ‘data’ is the coordinate system of the data in the Axes; (0, 0) is bottom left of the axes, and (1, 1) is top right of the axes. https://matplotlib.org/stable/tutorials/text/annotations.html says ‘axes fraction’ is

Avoid annotations and tick y_tick labels overlapping

I went through several questions but none seem to address the problem of annotations overlapping with y tick labels. I found a nice code that prevents annotations overlapping among themselves, but nothing with tick labels. My problem is quite simple actually. I use the following lines to create the graph I paste just below them. I use annotate to show

Advertisement