I do not like this at all, but the following works; I was upset until I found this code for a similar problem, which suggested a way to get the rendering.
import matplotlib.pyplot as plt xx=[1,2,3] yy=[2,3,4] dy=[0.1,0.2,0.05] fig=plt.figure() figname = "out.png" ax=fig.add_subplot(111) ax.errorbar(xx,yy,dy,fmt='ro-',ms=6,elinewidth=4)
OTOH, while this may infer a text field from the actual data point, this does not necessarily result in the field not being marked with a marker or error bar. Therefore, I do not know how useful this is in practice, but I think it would be difficult to iterate over all the drawn objects and move the text until it is on the sidelines. I think the linked code is trying something like this.
Edit: Please note that this was clearly taken with courtesy; I would use Joe Kington's solution if I really wanted to do this, and everyone else.: ^)
source share