Re: [Matplotlib-users] Getting axis limits through ax.axis() turns off autoscaling. Confusing behavior?
Thanks! -Joe On Sun, May 15, 2011 at 12:50 AM, Eric Firing wrote: > On 05/14/2011 12:22 PM, Joe Kington wrote: > > Hi, > > > > When getting an axis's extents through "axis", the autoscaling state of > > the axis is turned off, regardless of the state it was in before calling > > "ax.axis()" > > > > E.g. > > import matplotlib.pyplot as plt > > fig = plt.figure() > > ax = fig.add_subplot(111) > > print ax.get_autoscale_on() > > limits = ax.axis() > > print ax.get_autoscale_on() > > > > It makes sense that it would be turned off if the axis's limits are > > manually set, but calling ax.get_xlim() or ax.get_ylim() doesn't change > > the autoscaling state, so why should getting the extents by calling > > ax.axis()? > > It is now fixed in v1.0.x and master on github. > > Eric > > > > This seems like confusing and/or inconsistent behavior to me. Would this > > be considered a bug? If not, is it worth clarifying in the docstring to > > axis? > > > > Thanks, > > -Joe > > > > > > > > > > > -- > > Achieve unprecedented app performance and reliability > > What every C/C++ and Fortran developer should know. > > Learn how Intel has extended the reach of its next-generation tools > > to help boost performance applications - inlcuding clusters. > > http://p.sf.net/sfu/intel-dev2devmay > > > > > > > > ___ > > Matplotlib-users mailing list > > Matplotlib-users@lists.sourceforge.net > > https://lists.sourceforge.net/lists/listinfo/matplotlib-users > > > > -- > Achieve unprecedented app performance and reliability > What every C/C++ and Fortran developer should know. > Learn how Intel has extended the reach of its next-generation tools > to help boost performance applications - inlcuding clusters. > http://p.sf.net/sfu/intel-dev2devmay > ___ > Matplotlib-users mailing list > Matplotlib-users@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/matplotlib-users > -- Achieve unprecedented app performance and reliability What every C/C++ and Fortran developer should know. Learn how Intel has extended the reach of its next-generation tools to help boost performance applications - inlcuding clusters. http://p.sf.net/sfu/intel-dev2devmay___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Re: [Matplotlib-users] Text outside the graphs "box"
How is the space between the axis and the outer margins of a figure defined? How much space is between the upper most plot and the upper end of the figure? This is the space e.g for the titles etc. but can this be space be increased? Or how can a some text be placed above the axis but with a lot of space? I hope it is now clearer... /johannes Am 13.05.2011 um 16:59 schrieb Michael Droettboom: > I think there's a confusion of definition here: > > figure: The entire image > > axes: A box within the figure containing a plot > > Mike > > On 05/13/2011 10:20 AM, Johannes Radinger wrote: >> That is not what I want, to put the text inside the figure. >> >> I want the text above the figure with some space (e.g 2 cm) to the figure >> thats why I tried 0, 1.2 but then the text is outside the margins >> >> /j >> Original-Nachricht >> >>> Datum: Fri, 13 May 2011 14:03:16 + (UTC) >>> Von: Pauli Virtanen >>> An: matplotlib-users@lists.sourceforge.net >>> Betreff: Re: [Matplotlib-users] Text outside the graphs "box" >>> >> >>> Fri, 13 May 2011 15:58:37 +0200, Johannes Radinger wrote: >>> Hello again I tried: plt.figtext(0, 1.2, r'$F(x)=p*\frac{1}{s1\sqrt{2\pi}}$', fontsize=20) but then the text is outside the printed area and therefore not displayed. Does that mean that the printed area has to be changed as well? >>> The first two parameters are the x and y coordinates of the text, >>> in range [0, 1]. Adjust them to put the text inside the figure. >>> >>> >>> -- >>> Achieve unprecedented app performance and reliability >>> What every C/C++ and Fortran developer should know. >>> Learn how Intel has extended the reach of its next-generation tools >>> to help boost performance applications - inlcuding clusters. >>> http://p.sf.net/sfu/intel-dev2devmay >>> ___ >>> Matplotlib-users mailing list >>> Matplotlib-users@lists.sourceforge.net >>> https://lists.sourceforge.net/lists/listinfo/matplotlib-users >>> >> > > > -- > Michael Droettboom > Science Software Branch > Space Telescope Science Institute > Baltimore, Maryland, USA > > > -- > Achieve unprecedented app performance and reliability > What every C/C++ and Fortran developer should know. > Learn how Intel has extended the reach of its next-generation tools > to help boost performance applications - inlcuding clusters. > http://p.sf.net/sfu/intel-dev2devmay > ___ > Matplotlib-users mailing list > Matplotlib-users@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/matplotlib-users -- Achieve unprecedented app performance and reliability What every C/C++ and Fortran developer should know. Learn how Intel has extended the reach of its next-generation tools to help boost performance applications - inlcuding clusters. http://p.sf.net/sfu/intel-dev2devmay ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
[Matplotlib-users] Cannot obtain dvipng version
I am trying use matplotlib on CentOS through a PHP script. If I run it on the command line it works fine and generates a PNG figure. If I run with another user, sudo -u apache python filename.py it gives error: Cannot obtain dvipng version. Any ideas? I search the net but no answers. It looks like a bug? In the script I am using TeX. rc('text', usetex=True) Texlive and dvipng are installed and paths are set correctly. -- Achieve unprecedented app performance and reliability What every C/C++ and Fortran developer should know. Learn how Intel has extended the reach of its next-generation tools to help boost performance applications - inlcuding clusters. http://p.sf.net/sfu/intel-dev2devmay___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Re: [Matplotlib-users] Cannot obtain dvipng version
On Sunday, May 15, 2011, Alice Marcot wrote: > I am trying use matplotlib on CentOS through a PHP script. If I run it on the > command line it works fine and generates a PNG figure. If I run with another > user, > > sudo -u apache python filename.py > > it gives error: Cannot obtain dvipng version. > > Any ideas? I search the net but no answers. It looks like a bug? In the > script I am using TeX. > > rc('text', usetex=True) > > Texlive and dvipng are installed and paths are set correctly. > > It is a security feature. The apache user is limited by selinux. I don't know how to address this, but selinux is where you should look. Ben Root PS - Don't succum to the temptation to simply turn off selinux. There are easy ways to create exception modules using sealert and other tools. Selinux is a very important part of the security mechanisms for Linux. -- Achieve unprecedented app performance and reliability What every C/C++ and Fortran developer should know. Learn how Intel has extended the reach of its next-generation tools to help boost performance applications - inlcuding clusters. http://p.sf.net/sfu/intel-dev2devmay ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
[Matplotlib-users] set_xscale: insufficient logarithmically spaced minor ticks
> > import matplotlib.pyplot as plt > > import numpy as np > > y = range(1, 4) > x = np.power(10, y) > > plt.gca().set_xscale('log', basex=10, subsx=[0, 1, 2, 3, 4, 5, 6, 7, 8, 9]) > > plt.gca().plot(x, y) > > plt.show() > >From running the code above, I see only 8 subticks between the major ticks. But the documentation says the following. < http://matplotlib.sourceforge.net/api/axes_api.html#matplotlib.axes.Axes.set_xscale > > subsx/subsy: > > Where to place the subticks between each major tick. Should be a > sequence of integers. For example, in a log10 scale: [0, 1, 2, 3, 4, 5, 6, > 7, 8, 9] > > will place 10 logarithmically spaced minor ticks between each major > tick. > Even if 10 are being drawn, I think there would only be 9 subticks *between*the major ticks because the first subtick is on a major tick. Am I wrong? I'm using matplotlib version 0.99.3. Thanks, Steve -- Achieve unprecedented app performance and reliability What every C/C++ and Fortran developer should know. Learn how Intel has extended the reach of its next-generation tools to help boost performance applications - inlcuding clusters. http://p.sf.net/sfu/intel-dev2devmay___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users