Is there an easy way to get pyplot to treat calls to text() or
annotate() as if they were "data", so that it automatically expanded
the axis limits to include the text within the plot boundaries (i.e.,
not in the margin)?  My current workaround involves creating the text,
calling draw(), getting the text's bbox patch extents, transforming
those extents to data coordinates, and manually changing the ylim of
the axes object to something bigger than the transformed upper extent.
This seems rather roundabout to me, and I'm wondering if there's an
easier way.  Here is a link to a github gist of an MWE illustrating
the problem, and my current workaround:

https://gist.github.com/drammock/8570568

thanks
-- dan

Daniel McCloy
http://dan.mccloy.info/
Postdoctoral Research Fellow
Institute for Learning and Brain Sciences
University of Washington

------------------------------------------------------------------------------
CenturyLink Cloud: The Leader in Enterprise Cloud Services.
Learn Why More Businesses Are Choosing CenturyLink Cloud For
Critical Workloads, Development Environments & Everything In Between.
Get a Quote or Start a Free Trial Today. 
http://pubads.g.doubleclick.net/gampad/clk?id=119420431&iu=/4140/ostg.clktrk
_______________________________________________
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users

Reply via email to