Sterling, Thanks for the pointer. I've already used a workaround where I used "data" coordinates and put it at: 0.9 * (xmax - xmin) + xmin, and similar for y.
I'm really only reporting this so that it can be fixed if there is someone who does need to annotate something in a grid. Sean > On May 26, 2015, at 11:54, Sterling Smith <smit...@fusion.gat.com> wrote: > > Sean, > > Do you need an `annotate`, or just a `text`? `text` has the `transform` > keyword, to which you can pass `ax.transAxes`. > > ax.text(.9,.9, r"$\mathbf{" + lab + > ")}$”,transform=ax.transAxes,ha=‘right’,va=‘center’) > > -Sterling > > On May 26, 2015, at 10:06AM, Sean Lake <odysseus9...@gmail.com> wrote: > >> Hello all, >> >> I'm using matplotlib 1.4.3 installed using fink with python 2.7. >> >> I'm trying to produce a grid of plots using gridspec that has annotations to >> label each plot. >> >> Here is the call to annotate the current axes: >> ax.annotate( r"$\mathbf{" + lab + ")}$", >> xy=(0.5*(xmin+xmax), 0.5*(ymin+ymax)), >> xytext=(0.9, 0.9), >> textcoords="axes fraction", fontsize=14 ) >> >> Where ax is initialized by: >> ax = plt.subplot(gs[ coords[0], coords[1] ]) >> >> and gs by: >> gs = mpgs.GridSpec( 3, 2, wspace=0.0, hspace=0.0 ) >> >> The trouble comes in when abs(ymax) < abs(ymin). When that is true, the >> labels are offset upward by one row, for some reason. >> >> I've attached a script that demonstrates the problem, and an example of the >> output. I can work around this problem by using "data" coordinates, but even >> so this reveals a bug somewhere. >> >> Thanks, >> Sean Lake >> >> <BugDemo.py><BugDemo.pdf>------------------------------------------------------------------------------ >> One dashboard for servers and applications across Physical-Virtual-Cloud >> Widest out-of-the-box monitoring support with 50+ applications >> Performance metrics, stats and reports that give you Actionable Insights >> Deep dive visibility with transaction tracing using APM Insight. >> http://ad.doubleclick.net/ddm/clk/290420510;117567292;y_______________________________________________ >> Matplotlib-users mailing list >> Matplotlib-users@lists.sourceforge.net >> https://lists.sourceforge.net/lists/listinfo/matplotlib-users > ------------------------------------------------------------------------------ _______________________________________________ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users