# 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.

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 +0000 (UTC)
Von: Pauli Virtanen <pav@...397...>
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

--
NEU: FreePhone - kostenlos mobil telefonieren und surfen!
Jetzt informieren: http://www.gmx.net/de/go/freephone

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 +0000 (UTC)
Von: Pauli Virtanen<pav@...397...>
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

"figure" is the term for the entire printable space. The graphs that
are made in a figure are called "plots". figtext() lets you put text
anywhere you want in the normalized domain of 0 to 1. If you want the
text exactly in the middle, the specify 0.5, 0.5. Want it in a
corner, then you can do 0.0, 1.0. Figtext is what you want.

Ben Root

···

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

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 +0000 (UTC)
Von: Pauli Virtanen<pav@...397...>
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

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?