SourceForge logo
SourceForge logo
Menu

matplotlib-users — Discussion related to using matplotlib

You can subscribe to this list here.

2003 Jan
Feb
Mar
Apr
May
(3)
Jun
Jul
Aug
(12)
Sep
(12)
Oct
(56)
Nov
(65)
Dec
(37)
2004 Jan
(59)
Feb
(78)
Mar
(153)
Apr
(205)
May
(184)
Jun
(123)
Jul
(171)
Aug
(156)
Sep
(190)
Oct
(120)
Nov
(154)
Dec
(223)
2005 Jan
(184)
Feb
(267)
Mar
(214)
Apr
(286)
May
(320)
Jun
(299)
Jul
(348)
Aug
(283)
Sep
(355)
Oct
(293)
Nov
(232)
Dec
(203)
2006 Jan
(352)
Feb
(358)
Mar
(403)
Apr
(313)
May
(165)
Jun
(281)
Jul
(316)
Aug
(228)
Sep
(279)
Oct
(243)
Nov
(315)
Dec
(345)
2007 Jan
(260)
Feb
(323)
Mar
(340)
Apr
(319)
May
(290)
Jun
(296)
Jul
(221)
Aug
(292)
Sep
(242)
Oct
(248)
Nov
(242)
Dec
(332)
2008 Jan
(312)
Feb
(359)
Mar
(454)
Apr
(287)
May
(340)
Jun
(450)
Jul
(403)
Aug
(324)
Sep
(349)
Oct
(385)
Nov
(363)
Dec
(437)
2009 Jan
(500)
Feb
(301)
Mar
(409)
Apr
(486)
May
(545)
Jun
(391)
Jul
(518)
Aug
(497)
Sep
(492)
Oct
(429)
Nov
(357)
Dec
(310)
2010 Jan
(371)
Feb
(657)
Mar
(519)
Apr
(432)
May
(312)
Jun
(416)
Jul
(477)
Aug
(386)
Sep
(419)
Oct
(435)
Nov
(320)
Dec
(202)
2011 Jan
(321)
Feb
(413)
Mar
(299)
Apr
(215)
May
(284)
Jun
(203)
Jul
(207)
Aug
(314)
Sep
(321)
Oct
(259)
Nov
(347)
Dec
(209)
2012 Jan
(322)
Feb
(414)
Mar
(377)
Apr
(179)
May
(173)
Jun
(234)
Jul
(295)
Aug
(239)
Sep
(276)
Oct
(355)
Nov
(144)
Dec
(108)
2013 Jan
(170)
Feb
(89)
Mar
(204)
Apr
(133)
May
(142)
Jun
(89)
Jul
(160)
Aug
(180)
Sep
(69)
Oct
(136)
Nov
(83)
Dec
(32)
2014 Jan
(71)
Feb
(90)
Mar
(161)
Apr
(117)
May
(78)
Jun
(94)
Jul
(60)
Aug
(83)
Sep
(102)
Oct
(132)
Nov
(154)
Dec
(96)
2015 Jan
(45)
Feb
(138)
Mar
(176)
Apr
(132)
May
(119)
Jun
(124)
Jul
(77)
Aug
(31)
Sep
(34)
Oct
(22)
Nov
(23)
Dec
(9)
2016 Jan
(26)
Feb
(17)
Mar
(10)
Apr
(8)
May
(4)
Jun
(8)
Jul
(6)
Aug
(5)
Sep
(9)
Oct
(4)
Nov
Dec
2017 Jan
(5)
Feb
(7)
Mar
(1)
Apr
(5)
May
Jun
(3)
Jul
(6)
Aug
(1)
Sep
Oct
(2)
Nov
(1)
Dec
2018 Jan
Feb
Mar
Apr
(1)
May
Jun
Jul
Aug
Sep
Oct
Nov
Dec
2020 Jan
Feb
Mar
Apr
May
(1)
Jun
Jul
Aug
Sep
Oct
Nov
Dec
2025 Jan
(1)
Feb
Mar
Apr
May
Jun
Jul
Aug
Sep
Oct
Nov
Dec
S M T W T F S
1
(3)
2
(7)
3
(13)
4
(6)
5
(18)
6
(39)
7
(1)
8
(4)
9
(4)
10
(4)
11
(19)
12
(15)
13
(16)
14
(1)
15
(5)
16
(17)
17
(12)
18
(19)
19
(2)
20
(5)
21
(3)
22
(1)
23
(3)
24
(5)
25
(4)
26
(1)
27
(13)
28
(4)
29
(2)
30
(21)
31
(17)




Showing results of 279

<< < 1 .. 3 4 5 6 7 .. 12 > >> (Page 5 of 12)
From: Benjamin R. <ben...@ou...> - 2011年05月17日 14:43:30
On Tue, May 17, 2011 at 2:58 AM, Johannes Radinger <JRa...@gm...> wrote:
>
> -------- Original-Nachricht --------
> > Datum: 2011年5月16日 11:36:18 -0500
> > Von: Benjamin Root <ben...@ou...>
> > An: Johannes Radinger <JRa...@gm...>
> > CC: mat...@li...
> > Betreff: Re: [Matplotlib-users] use matplotlib to produce mathathematical
> expression only
>
> > On Mon, May 16, 2011 at 11:22 AM, Johannes Radinger
> > <JRa...@gm...>wrote:
> >
> > >
> > > -------- Original-Nachricht --------
> > > > Datum: 2011年5月16日 10:59:34 -0500
> > > > Von: Benjamin Root <ben...@ou...>
> > > > An: Johannes Radinger <JRa...@gm...>
> > > > CC: mat...@li...
> > > > Betreff: Re: [Matplotlib-users] use matplotlib to produce
> > mathathematical
> > > expression only
> > >
> > > > On Mon, May 16, 2011 at 10:21 AM, Johannes Radinger
> > > > <JRa...@gm...>wrote:
> > > >
> > > > >
> > > > > -------- Original-Nachricht --------
> > > > > > Datum: 2011年5月16日 09:49:24 -0500
> > > > > > Von: Benjamin Root <ben...@ou...>
> > > > > > An: "mat...@li..." <
> > > > > mat...@li...>
> > > > > > Betreff: Re: [Matplotlib-users] [SciPy-User] use matplotlib to
> > > produce
> > > > > mathathematical expression only
> > > > >
> > > > > > On Monday, May 16, 2011, Johannes Radinger <JRa...@gm...>
> > wrote:
> > > > > > >
> > > > > > > -------- Original-Nachricht --------
> > > > > > >> Datum: 2011年5月16日 08:28:49 -0500
> > > > > > >> Von: Robert Kern <rob...@gm...>
> > > > > > >> An: SciPy Users List <sci...@sc...>
> > > > > > >> CC: mat...@li...
> > > > > > >> Betreff: Re: [Matplotlib-users] [SciPy-User] use matplotlib to
> > > > produce
> > > > > > mathathematical expression only
> > > > > > >
> > > > > > >> On Mon, May 16, 2011 at 08:21, Johannes Radinger <
> > > JRa...@gm...>
> > > > > > wrote:
> > > > > > >> > Hello,
> > > > > > >> >
> > > > > > >> > I want to produce a eps file of following mathematical
> > > > expression:
> > > > > > >> >
> > > > > > >>
> > > > > >
> > > > >
> > > >
> > >
> >
> r'$F(x)=p*\frac{1}{s1\sqrt{2\pi}}*e^{-\frac{1}{2}*(\frac{x-m}{s1})}+(1-p)*\frac{1}{s1\sqrt{2\pi}}*e^{-\frac{1}{2}*(\frac{x-m}{s1})}$'
> > > > > > >> >
> > > > > > >> > is it possible to somehow missuse matplotlib for that to
> > produce
> > > > > only
> > > > > > >> the function without any other plot things? Or is there a
> > better
> > > > > python
> > > > > > >> library within scipy? I don't want to install the complete
> > latex
> > > > > > libraries just
> > > > > > >> for producing this single eps file.
> > > > > > >>
> > > > > > >> Check out mathtex. It is matplotlib's TeX parsing engine and
> > > > renderer
> > > > > > >> broken out into a separate library:
> > > > > > >>
> > > > > > >> http://code.google.com/p/mathtex/
> > > > > > >
> > > > > > > I also thought about mathtex but don't know how to use my
> > > > mathematical
> > > > > > expression without a plot of axis etc. any suggestions? I just
> > want
> > > to
> > > > > have
> > > > > > the formated math expression as eps and I don't know how to do
> it,
> > > > still
> > > > > > after reading in the matplotlib-manual.
> > > > > > >
> > > > > > > /johannes
> > > > > > >
> > > > > > >
> > > > > > >>
> > > > > > >> Also, please send matplotlib questions just to the matplotlib
> > > list.
> > > > > > >> Thanks.
> > > > > > >>
> > > > > > >> --
> > > > > > >> Robert Kern
> > > > > > >>
> > > > > > >> "I have come to believe that the whole world is an enigma, a
> > > > harmless
> > > > > > >> enigma that is made terrible by our own mad attempt to
> > interpret
> > > it
> > > > as
> > > > > > >> though it had an underlying truth."
> > > > > > >> -- Umberto Eco
> > > > > > >>
> > > > > > >>
> > > > > >
> > > > >
> > > >
> > >
> >
> ------------------------------------------------------------------------------
> > > > > > >> 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
> > > > > > >> Mat...@li...
> > > > > > >> https://lists.sourceforge.net/lists/listinfo/matplotlib-users
> > > > > > >
> > > > > > > --
> > > > > > > NEU: FreePhone - kostenlos mobil telefonieren und surfen!
> > > > > > > Jetzt informieren: http://www.gmx.net/de/go/freephone
> > > > > > > _______________________________________________
> > > > > > > SciPy-User mailing list
> > > > > > > Sci...@sc...
> > > > > > > http://mail.scipy.org/mailman/listinfo/scipy-user
> > > > > > >
> > > > > >
> > > > > > We have added a new feature to do just that in the development
> > > branch,
> > > > > > but it should be fairly trivial to do with existing releases of
> > > > > > matplotlib. Just create a figure object and use its figtitle to
> > hold
> > > > > > the expression and then save the figure.
> > > > >
> > > > > It might be trivial but how to remove the axis/plot then and crop
> > the
> > > > > extend of the eps?
> > > > >
> > > > > I tried:
> > > > >
> > > > > plt.figure()
> > > > >
> > > >
> > >
> >
> plt.title(r'$F(x)=p*\frac{1}{s1\sqrt{2\pi}}*e^{-\frac{1}{2}*(\frac{x-m}{s1})}+(1-p)*\frac{1}{s1\sqrt{2\pi}}*e^{-\frac{1}{2}*(\frac{x-m}{s1})}$',
> > > > > fontsize=20)
> > > > > plt.show()
> > > > >
> > > > > /j
> > > > >
> > > > >
> > > > Use figtext instead. I did the following and it looked fine to me:
> > > >
> > > > plt.figure()
> > > > plt.figtext(0.1, 0.5,
> > > >
> > >
> >
> r'$F(x)=p*\frac{1}{s1\sqrt{2\pi}}*e^{-\frac{1}{2}*(\frac{x-m}{s1})}+(1-p)*\frac{1}{s1\sqrt{2\pi}}*e^{-\frac{1}{2}*(\frac{x-m}{s1})}$',
> > > > fontsize=20)
> > > > plt.show()
> > > >
> > >
> > >
> > > thats working nearly perfect, I would just need to crop the display
> > extend
> > > resp. the white space from the eps around...any option/idea?
> > >
> > >
> > > /j
> > >
> > >
> > Try setting bbox_inches='tight' in the call to savefig. With
> > bbox_inches='tight', you can then specify the 'pad_inches' kwarg to
> > indicate
> > how much padding to put around the tight bounding box. This should work,
> > however some older version of matplotlib might not check the figure text
> > objects for calculating the tightest bounding box.
>
> Hej,
>
> I tried your suggestion like:
> plt.figure()
> plt.figtext(0.01,
> 0.5,r'$F(x)=p*\frac{1}{s1\sqrt{2\pi}}*e^{-\frac{1}{2}*(\frac{x-m}{s1})}+(1-p)*\frac{1}{s1\sqrt{2\pi}}*e^{-\frac{1}{2}*(\frac{x-m}{s1})}$',
> fontsize=26)
> #plt.show()
> plt.savefig("testplot.eps", bbox_inches='tight')
>
> but get following error:
> plt.savefig("testplot.eps", bbox_inches='tight')
> File
> "/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/matplotlib/pyplot.py",
> line 363, in savefig
> return fig.savefig(*args, **kwargs)
> File
> "/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/matplotlib/figure.py",
> line 1084, in savefig
> self.canvas.print_figure(*args, **kwargs)
> File
> "/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/matplotlib/backend_bases.py",
> line 1891, in print_figure
> bbox_inches = self.figure.get_tightbbox(renderer)
> File
> "/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/matplotlib/figure.py",
> line 1212, in get_tightbbox
> _bbox = Bbox.union([b for b in bb if b.width!=0 or b.height!=0])
> File
> "/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/matplotlib/transforms.py",
> line 675, in union
> assert(len(bboxes))
> AssertionError
>
>
> For your information:
> I work with python 2.6.6 and matplotlib 1.0.1 on Mac OS X 10.6.6
>
> /j
>
>
>
There have been some bugs fixed with bbox_inches='tight', but I couldn't
remember if they happened after or before the v1.0.1 release. My guess is
that it happened after.
I am glad the other function worked for you.
Ben Root
From: Scott S. <sco...@gm...> - 2011年05月17日 12:53:37
---------- Forwarded message ----------
From: Scott Sinclair <sco...@gm...>
Date: 17 May 2011 14:52
Subject: Re: [Matplotlib-users] result in the graph
To: Waleria <wal...@gm...>
On 17 May 2011 14:35, Waleria <wal...@gm...> wrote:
> Hello all,
>
> I have this code: http://dpaste.com/543369/ (part that generates the chart)
> . So i need to show a result in the graph, i have the line 69 (variable
> x_sqr) in code, i need to show tthe result of variable in the graph. How can
> i do this?
How about:
import matplotlib.pyplot as plt
x_sqr = 42.42
fig = plt.figure()
ax = fig.add_subplot(111)
ax.plot(range(5))
ax.text(3, 2, r'x$^2$ = %.2f' % x_sqr)
plt.show()
Cheers,
Scott
From: Waleria <wal...@gm...> - 2011年05月17日 12:52:12
Where did you change in the code?
Waléria
On Tue, May 17, 2011 at 9:46 AM, Sathishkumar Duraisamy <
flo...@gm...> wrote:
> On Tue, May 17, 2011 at 6:05 PM, Waleria <wal...@gm...> wrote:
> > Hello all,
> >
> > I have this code: http://dpaste.com/543369/ (part that generates the
> chart)
> > . So i need to show a result in the graph, i have the line 69 (variable
> > x_sqr) in code, i need to show tthe result of variable in the graph. How
> can
> > i do this?
> may be useful http://dpaste.com/543378/
>
> >
> ------------------------------------------------------------------------------
> > 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
> > Mat...@li...
> > https://lists.sourceforge.net/lists/listinfo/matplotlib-users
> >
> >
>
>
>
> --
> Regards,
> Sathishkumar D
>
From: Waleria <wal...@gm...> - 2011年05月17日 12:35:40
Hello all,
I have this code: http://dpaste.com/543369/ (part that generates the chart)
. So i need to show a result in the graph, i have the line 69 (variable
x_sqr) in code, i need to show tthe result of variable in the graph. How can
i do this?
Thank you
Waléria
From: Neal B. <ndb...@gm...> - 2011年05月17日 12:08:30
I have several line graphs on a single plot. I'd like to indicate what is the 
mean of each of them (they are showing cumulative distributions).
Each is a different color.
I tried putting 'mean=xxx' into the legend. That works, but I think it's 
confusing. The legend normally displays independent variables, not results.
I put vertical lines and then text, vertically, just below the x-axis giving the 
mean values. Not very clear.
This is not really a technical question, but one of presentation style. How to 
convey this information?
From: Joachim S. <sa...@gf...> - 2011年05月17日 11:53:21
All,
I have stumbled upon a (for me) unexpected behaviour of axvspan().
import matplotlib.pylab as plt
from numpy import *
x = arange(1000)
y = 0.2*sin(0.02*x)
ax = plt.axes()
plt.axvspan(250, 400, facecolor='g', alpha=0.2)
plt.plot(x,y)
plt.show()
The displayed y range is -0.2 to 1, while from the sine amplitude I 
would have expected -0.2 to 0.2. The expected y range can be obtained by 
omitting the axvspan() call and also if it is called *after* plot().
Is this the desired behaviour, especially in view of the dependence on 
the call order?
__version__ is 1.1.0
Cheers,
Joachim
From: Jae-Joon L. <lee...@gm...> - 2011年05月17日 10:50:42
Attachments: tight_layout.py
Attached is a modified version of Tony's script.
 * no drawing is necessary
 * support subplots that span multiple rows/columns
Please test it and let me know of any problem.
I'm planning to push these functionality into matplolib after some
refactoring (e.g., it would be good to have pyplot.tight_layout).
Regards,
-JJ
On Wed, May 11, 2011 at 8:50 PM, Daniel Mader
<dan...@go...> wrote:
> Hi again,
>
>>> Hi Jae-Loon,
>>>
>>> thanks for your comments! Of course I do agree that a figure layout
>>> should not change in interactive mode. However, I don't see why this
>>> should happen upon a panning action. A different case is when the
>>> label or title font sizes are changed, but I was assuming this is
>>> adjusted prior to the creation of the figure.
>>>
>>
>> Since you said the current design is broken, I thought you want things
>> adjusted *whenever* a figure is updated.
>>
>> So, I guess what you want is some functionality like what Tony's script does?
>> One of the reason that I was not very inclined to Tony's approach is
>> that it only works for subplots (and I guess it only works with
>> subplots with pure n x m grid. Correct me if I'm wrong). But maybe it
>> is better than nothing. I'll consider how things can be improved.
>
> I do sense a match of ideas here :) This is exactly what I am missing!
> It is very good to hear that you are so open to suggestions and
> possible improvements!
>
> It is a great pleasure to work with Scipy/Matplotlib and interact with
> the community!
>
> Best regards,
> Daniel
>
From: Johannes R. <JRa...@gm...> - 2011年05月17日 07:59:01
-------- Original-Nachricht --------
> Datum: 2011年5月16日 11:36:18 -0500
> Von: Benjamin Root <ben...@ou...>
> An: Johannes Radinger <JRa...@gm...>
> CC: mat...@li...
> Betreff: Re: [Matplotlib-users] use matplotlib to produce mathathematical expression only
> On Mon, May 16, 2011 at 11:22 AM, Johannes Radinger
> <JRa...@gm...>wrote:
> 
> >
> > -------- Original-Nachricht --------
> > > Datum: 2011年5月16日 10:59:34 -0500
> > > Von: Benjamin Root <ben...@ou...>
> > > An: Johannes Radinger <JRa...@gm...>
> > > CC: mat...@li...
> > > Betreff: Re: [Matplotlib-users] use matplotlib to produce
> mathathematical
> > expression only
> >
> > > On Mon, May 16, 2011 at 10:21 AM, Johannes Radinger
> > > <JRa...@gm...>wrote:
> > >
> > > >
> > > > -------- Original-Nachricht --------
> > > > > Datum: 2011年5月16日 09:49:24 -0500
> > > > > Von: Benjamin Root <ben...@ou...>
> > > > > An: "mat...@li..." <
> > > > mat...@li...>
> > > > > Betreff: Re: [Matplotlib-users] [SciPy-User] use matplotlib to
> > produce
> > > > mathathematical expression only
> > > >
> > > > > On Monday, May 16, 2011, Johannes Radinger <JRa...@gm...>
> wrote:
> > > > > >
> > > > > > -------- Original-Nachricht --------
> > > > > >> Datum: 2011年5月16日 08:28:49 -0500
> > > > > >> Von: Robert Kern <rob...@gm...>
> > > > > >> An: SciPy Users List <sci...@sc...>
> > > > > >> CC: mat...@li...
> > > > > >> Betreff: Re: [Matplotlib-users] [SciPy-User] use matplotlib to
> > > produce
> > > > > mathathematical expression only
> > > > > >
> > > > > >> On Mon, May 16, 2011 at 08:21, Johannes Radinger <
> > JRa...@gm...>
> > > > > wrote:
> > > > > >> > Hello,
> > > > > >> >
> > > > > >> > I want to produce a eps file of following mathematical
> > > expression:
> > > > > >> >
> > > > > >>
> > > > >
> > > >
> > >
> >
> r'$F(x)=p*\frac{1}{s1\sqrt{2\pi}}*e^{-\frac{1}{2}*(\frac{x-m}{s1})}+(1-p)*\frac{1}{s1\sqrt{2\pi}}*e^{-\frac{1}{2}*(\frac{x-m}{s1})}$'
> > > > > >> >
> > > > > >> > is it possible to somehow missuse matplotlib for that to
> produce
> > > > only
> > > > > >> the function without any other plot things? Or is there a
> better
> > > > python
> > > > > >> library within scipy? I don't want to install the complete
> latex
> > > > > libraries just
> > > > > >> for producing this single eps file.
> > > > > >>
> > > > > >> Check out mathtex. It is matplotlib's TeX parsing engine and
> > > renderer
> > > > > >> broken out into a separate library:
> > > > > >>
> > > > > >> http://code.google.com/p/mathtex/
> > > > > >
> > > > > > I also thought about mathtex but don't know how to use my
> > > mathematical
> > > > > expression without a plot of axis etc. any suggestions? I just
> want
> > to
> > > > have
> > > > > the formated math expression as eps and I don't know how to do it,
> > > still
> > > > > after reading in the matplotlib-manual.
> > > > > >
> > > > > > /johannes
> > > > > >
> > > > > >
> > > > > >>
> > > > > >> Also, please send matplotlib questions just to the matplotlib
> > list.
> > > > > >> Thanks.
> > > > > >>
> > > > > >> --
> > > > > >> Robert Kern
> > > > > >>
> > > > > >> "I have come to believe that the whole world is an enigma, a
> > > harmless
> > > > > >> enigma that is made terrible by our own mad attempt to
> interpret
> > it
> > > as
> > > > > >> though it had an underlying truth."
> > > > > >> -- Umberto Eco
> > > > > >>
> > > > > >>
> > > > >
> > > >
> > >
> >
> ------------------------------------------------------------------------------
> > > > > >> 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
> > > > > >> Mat...@li...
> > > > > >> https://lists.sourceforge.net/lists/listinfo/matplotlib-users
> > > > > >
> > > > > > --
> > > > > > NEU: FreePhone - kostenlos mobil telefonieren und surfen!
> > > > > > Jetzt informieren: http://www.gmx.net/de/go/freephone
> > > > > > _______________________________________________
> > > > > > SciPy-User mailing list
> > > > > > Sci...@sc...
> > > > > > http://mail.scipy.org/mailman/listinfo/scipy-user
> > > > > >
> > > > >
> > > > > We have added a new feature to do just that in the development
> > branch,
> > > > > but it should be fairly trivial to do with existing releases of
> > > > > matplotlib. Just create a figure object and use its figtitle to
> hold
> > > > > the expression and then save the figure.
> > > >
> > > > It might be trivial but how to remove the axis/plot then and crop
> the
> > > > extend of the eps?
> > > >
> > > > I tried:
> > > >
> > > > plt.figure()
> > > >
> > >
> >
> plt.title(r'$F(x)=p*\frac{1}{s1\sqrt{2\pi}}*e^{-\frac{1}{2}*(\frac{x-m}{s1})}+(1-p)*\frac{1}{s1\sqrt{2\pi}}*e^{-\frac{1}{2}*(\frac{x-m}{s1})}$',
> > > > fontsize=20)
> > > > plt.show()
> > > >
> > > > /j
> > > >
> > > >
> > > Use figtext instead. I did the following and it looked fine to me:
> > >
> > > plt.figure()
> > > plt.figtext(0.1, 0.5,
> > >
> >
> r'$F(x)=p*\frac{1}{s1\sqrt{2\pi}}*e^{-\frac{1}{2}*(\frac{x-m}{s1})}+(1-p)*\frac{1}{s1\sqrt{2\pi}}*e^{-\frac{1}{2}*(\frac{x-m}{s1})}$',
> > > fontsize=20)
> > > plt.show()
> > >
> >
> >
> > thats working nearly perfect, I would just need to crop the display
> extend
> > resp. the white space from the eps around...any option/idea?
> >
> >
> > /j
> >
> >
> Try setting bbox_inches='tight' in the call to savefig. With
> bbox_inches='tight', you can then specify the 'pad_inches' kwarg to
> indicate
> how much padding to put around the tight bounding box. This should work,
> however some older version of matplotlib might not check the figure text
> objects for calculating the tightest bounding box. 
Hej,
I tried your suggestion like:
plt.figure()
plt.figtext(0.01, 0.5,r'$F(x)=p*\frac{1}{s1\sqrt{2\pi}}*e^{-\frac{1}{2}*(\frac{x-m}{s1})}+(1-p)*\frac{1}{s1\sqrt{2\pi}}*e^{-\frac{1}{2}*(\frac{x-m}{s1})}$', fontsize=26)
#plt.show()
plt.savefig("testplot.eps", bbox_inches='tight')
but get following error:
 plt.savefig("testplot.eps", bbox_inches='tight')
 File "/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/matplotlib/pyplot.py", line 363, in savefig
 return fig.savefig(*args, **kwargs)
 File "/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/matplotlib/figure.py", line 1084, in savefig
 self.canvas.print_figure(*args, **kwargs)
 File "/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/matplotlib/backend_bases.py", line 1891, in print_figure
 bbox_inches = self.figure.get_tightbbox(renderer)
 File "/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/matplotlib/figure.py", line 1212, in get_tightbbox
 _bbox = Bbox.union([b for b in bb if b.width!=0 or b.height!=0])
 File "/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/matplotlib/transforms.py", line 675, in union
 assert(len(bboxes))
AssertionError
For your information:
I work with python 2.6.6 and matplotlib 1.0.1 on Mac OS X 10.6.6
/j
In that case, the way
> that I typically autocrop my eps files is to convert it into a pdf file
> and
> use pdfcrop and then convert it back to eps (assuming you have a standard
> linux install). Here is the chain of commands I typically use on my
> Fedora
> machine:
> 
> epstopdf mathtext.eps --outfile=mathtext.temp.pdf
> pdfcrop --margins '15 2 15 2' --clip mathtext.temp.pdf
> mathtext.cropped.pdf
> pdftops mathtext.cropped.pdf mathtext.cropped.eps
> 
> You can adjust margins to your tastes, and the names of the files are
> fairly
> arbitrary.
> 
> I hope that helps!
> Ben Root
-- 
NEU: FreePhone - kostenlos mobil telefonieren und surfen!			
Jetzt informieren: http://www.gmx.net/de/go/freephone
From: Goyo <goy...@gm...> - 2011年05月16日 20:10:57
2011年5月15日 Johannes Radinger <jra...@gm...>:
> 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?
Use subplots_adjust.
Goyo
From: Michael D. <md...@st...> - 2011年05月16日 18:09:05
<https://github.com/matplotlib/matplotlib/commit/44d3cf8cb883a85c325459165b6ed120219c7451>Below 
is the new function that was recently added to the development version 
(that Benjamin was referring to). It should work to include it in your 
own code and should work for the past few releases of matplotlib. It 
gets around the need for any external tools for cropping etc since the 
tight bounding box is calculated within matplotlib.
Mike
def math_to_image(s, filename_or_obj, prop=None, dpi=None, format=None):
 """
 Given a math expression, renders it in a closely-clipped bounding
 box to an image file.
 *s*
 A math expression. The math portion should be enclosed in
 dollar signs.
 *filename_or_obj*
 A filepath or writable file-like object to write the image data
 to.
 *prop*
 If provided, a FontProperties() object describing the size and
 style of the text.
 *dpi*
 Override the output dpi, otherwise use the default associated
 with the output format.
 *format*
 The output format, eg. 'svg', 'pdf', 'ps' or 'png'. If not
 provided, will be deduced from the filename.
 """
 from matplotlib import figure
 # backend_agg supports all of the core output formats
 from matplotlib.backends import backend_agg
 if prop is None:
 prop = FontProperties()
 parser = MathTextParser('path')
 width, height, depth, _, _ = parser.parse(s, dpi=72, prop=prop)
 fig = figure.Figure(figsize=(width / 72.0, height / 72.0))
 fig.text(0, depth/height, s, fontproperties=prop)
 backend_agg.FigureCanvasAgg(fig)
 fig.savefig(filename_or_obj, dpi=dpi, format=format)
 return depth
On 05/16/2011 12:36 PM, Benjamin Root wrote:
>
>
> On Mon, May 16, 2011 at 11:22 AM, Johannes Radinger <JRa...@gm... 
> <mailto:JRa...@gm...>> wrote:
>
>
> -------- Original-Nachricht --------
> > Datum: 2011年5月16日 10:59:34 -0500
> > Von: Benjamin Root <ben...@ou... <mailto:ben...@ou...>>
> > An: Johannes Radinger <JRa...@gm... <mailto:JRa...@gm...>>
> > CC: mat...@li...
> <mailto:mat...@li...>
> > Betreff: Re: [Matplotlib-users] use matplotlib to produce
> mathathematical expression only
>
> > On Mon, May 16, 2011 at 10:21 AM, Johannes Radinger
> > <JRa...@gm... <mailto:JRa...@gm...>>wrote:
> >
> > >
> > > -------- Original-Nachricht --------
> > > > Datum: 2011年5月16日 09:49:24 -0500
> > > > Von: Benjamin Root <ben...@ou... <mailto:ben...@ou...>>
> > > > An: "mat...@li...
> <mailto:mat...@li...>" <
> > > mat...@li...
> <mailto:mat...@li...>>
> > > > Betreff: Re: [Matplotlib-users] [SciPy-User] use matplotlib
> to produce
> > > mathathematical expression only
> > >
> > > > On Monday, May 16, 2011, Johannes Radinger <JRa...@gm...
> <mailto:JRa...@gm...>> wrote:
> > > > >
> > > > > -------- Original-Nachricht --------
> > > > >> Datum: 2011年5月16日 08:28:49 -0500
> > > > >> Von: Robert Kern <rob...@gm...
> <mailto:rob...@gm...>>
> > > > >> An: SciPy Users List <sci...@sc...
> <mailto:sci...@sc...>>
> > > > >> CC: mat...@li...
> <mailto:mat...@li...>
> > > > >> Betreff: Re: [Matplotlib-users] [SciPy-User] use
> matplotlib to
> > produce
> > > > mathathematical expression only
> > > > >
> > > > >> On Mon, May 16, 2011 at 08:21, Johannes Radinger
> <JRa...@gm... <mailto:JRa...@gm...>>
> > > > wrote:
> > > > >> > Hello,
> > > > >> >
> > > > >> > I want to produce a eps file of following mathematical
> > expression:
> > > > >> >
> > > > >>
> > > >
> > >
> >
> r'$F(x)=p*\frac{1}{s1\sqrt{2\pi}}*e^{-\frac{1}{2}*(\frac{x-m}{s1})}+(1-p)*\frac{1}{s1\sqrt{2\pi}}*e^{-\frac{1}{2}*(\frac{x-m}{s1})}$'
> > > > >> >
> > > > >> > is it possible to somehow missuse matplotlib for that
> to produce
> > > only
> > > > >> the function without any other plot things? Or is there a
> better
> > > python
> > > > >> library within scipy? I don't want to install the
> complete latex
> > > > libraries just
> > > > >> for producing this single eps file.
> > > > >>
> > > > >> Check out mathtex. It is matplotlib's TeX parsing engine and
> > renderer
> > > > >> broken out into a separate library:
> > > > >>
> > > > >> http://code.google.com/p/mathtex/
> > > > >
> > > > > I also thought about mathtex but don't know how to use my
> > mathematical
> > > > expression without a plot of axis etc. any suggestions? I
> just want to
> > > have
> > > > the formated math expression as eps and I don't know how to
> do it,
> > still
> > > > after reading in the matplotlib-manual.
> > > > >
> > > > > /johannes
> > > > >
> > > > >
> > > > >>
> > > > >> Also, please send matplotlib questions just to the
> matplotlib list.
> > > > >> Thanks.
> > > > >>
> > > > >> --
> > > > >> Robert Kern
> > > > >>
> > > > >> "I have come to believe that the whole world is an enigma, a
> > harmless
> > > > >> enigma that is made terrible by our own mad attempt to
> interpret it
> > as
> > > > >> though it had an underlying truth."
> > > > >> -- Umberto Eco
> > > > >>
> > > > >>
> > > >
> > >
> >
> ------------------------------------------------------------------------------
> > > > >> 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
> > > > >> Mat...@li...
> <mailto:Mat...@li...>
> > > > >> https://lists.sourceforge.net/lists/listinfo/matplotlib-users
> > > > >
> > > > > --
> > > > > NEU: FreePhone - kostenlos mobil telefonieren und surfen!
> > > > > Jetzt informieren: http://www.gmx.net/de/go/freephone
> > > > > _______________________________________________
> > > > > SciPy-User mailing list
> > > > > Sci...@sc... <mailto:Sci...@sc...>
> > > > > http://mail.scipy.org/mailman/listinfo/scipy-user
> > > > >
> > > >
> > > > We have added a new feature to do just that in the
> development branch,
> > > > but it should be fairly trivial to do with existing releases of
> > > > matplotlib. Just create a figure object and use its
> figtitle to hold
> > > > the expression and then save the figure.
> > >
> > > It might be trivial but how to remove the axis/plot then and
> crop the
> > > extend of the eps?
> > >
> > > I tried:
> > >
> > > plt.figure()
> > >
> >
> plt.title(r'$F(x)=p*\frac{1}{s1\sqrt{2\pi}}*e^{-\frac{1}{2}*(\frac{x-m}{s1})}+(1-p)*\frac{1}{s1\sqrt{2\pi}}*e^{-\frac{1}{2}*(\frac{x-m}{s1})}$',
> > > fontsize=20)
> > > plt.show()
> > >
> > > /j
> > >
> > >
> > Use figtext instead. I did the following and it looked fine to me:
> >
> > plt.figure()
> > plt.figtext(0.1, 0.5,
> >
> r'$F(x)=p*\frac{1}{s1\sqrt{2\pi}}*e^{-\frac{1}{2}*(\frac{x-m}{s1})}+(1-p)*\frac{1}{s1\sqrt{2\pi}}*e^{-\frac{1}{2}*(\frac{x-m}{s1})}$',
> > fontsize=20)
> > plt.show()
> >
>
>
> thats working nearly perfect, I would just need to crop the
> display extend resp. the white space from the eps around...any
> option/idea?
>
>
> /j
>
>
> Try setting bbox_inches='tight' in the call to savefig. With 
> bbox_inches='tight', you can then specify the 'pad_inches' kwarg to 
> indicate how much padding to put around the tight bounding box. This 
> should work, however some older version of matplotlib might not check 
> the figure text objects for calculating the tightest bounding box. In 
> that case, the way that I typically autocrop my eps files is to 
> convert it into a pdf file and use pdfcrop and then convert it back to 
> eps (assuming you have a standard linux install). Here is the chain 
> of commands I typically use on my Fedora machine:
>
> epstopdf mathtext.eps --outfile=mathtext.temp.pdf
> pdfcrop --margins '15 2 15 2' --clip mathtext.temp.pdf 
> mathtext.cropped.pdf
> pdftops mathtext.cropped.pdf mathtext.cropped.eps
>
> You can adjust margins to your tastes, and the names of the files are 
> fairly arbitrary.
>
> I hope that helps!
> Ben Root
>
>
> ------------------------------------------------------------------------------
> 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
> Mat...@li...
> https://lists.sourceforge.net/lists/listinfo/matplotlib-users
> 
-- 
Michael Droettboom
Science Software Branch
Space Telescope Science Institute
Baltimore, Maryland, USA
From: Benjamin R. <ben...@ou...> - 2011年05月16日 16:36:45
On Mon, May 16, 2011 at 11:22 AM, Johannes Radinger <JRa...@gm...>wrote:
>
> -------- Original-Nachricht --------
> > Datum: 2011年5月16日 10:59:34 -0500
> > Von: Benjamin Root <ben...@ou...>
> > An: Johannes Radinger <JRa...@gm...>
> > CC: mat...@li...
> > Betreff: Re: [Matplotlib-users] use matplotlib to produce mathathematical
> expression only
>
> > On Mon, May 16, 2011 at 10:21 AM, Johannes Radinger
> > <JRa...@gm...>wrote:
> >
> > >
> > > -------- Original-Nachricht --------
> > > > Datum: 2011年5月16日 09:49:24 -0500
> > > > Von: Benjamin Root <ben...@ou...>
> > > > An: "mat...@li..." <
> > > mat...@li...>
> > > > Betreff: Re: [Matplotlib-users] [SciPy-User] use matplotlib to
> produce
> > > mathathematical expression only
> > >
> > > > On Monday, May 16, 2011, Johannes Radinger <JRa...@gm...> wrote:
> > > > >
> > > > > -------- Original-Nachricht --------
> > > > >> Datum: 2011年5月16日 08:28:49 -0500
> > > > >> Von: Robert Kern <rob...@gm...>
> > > > >> An: SciPy Users List <sci...@sc...>
> > > > >> CC: mat...@li...
> > > > >> Betreff: Re: [Matplotlib-users] [SciPy-User] use matplotlib to
> > produce
> > > > mathathematical expression only
> > > > >
> > > > >> On Mon, May 16, 2011 at 08:21, Johannes Radinger <
> JRa...@gm...>
> > > > wrote:
> > > > >> > Hello,
> > > > >> >
> > > > >> > I want to produce a eps file of following mathematical
> > expression:
> > > > >> >
> > > > >>
> > > >
> > >
> >
> r'$F(x)=p*\frac{1}{s1\sqrt{2\pi}}*e^{-\frac{1}{2}*(\frac{x-m}{s1})}+(1-p)*\frac{1}{s1\sqrt{2\pi}}*e^{-\frac{1}{2}*(\frac{x-m}{s1})}$'
> > > > >> >
> > > > >> > is it possible to somehow missuse matplotlib for that to produce
> > > only
> > > > >> the function without any other plot things? Or is there a better
> > > python
> > > > >> library within scipy? I don't want to install the complete latex
> > > > libraries just
> > > > >> for producing this single eps file.
> > > > >>
> > > > >> Check out mathtex. It is matplotlib's TeX parsing engine and
> > renderer
> > > > >> broken out into a separate library:
> > > > >>
> > > > >> http://code.google.com/p/mathtex/
> > > > >
> > > > > I also thought about mathtex but don't know how to use my
> > mathematical
> > > > expression without a plot of axis etc. any suggestions? I just want
> to
> > > have
> > > > the formated math expression as eps and I don't know how to do it,
> > still
> > > > after reading in the matplotlib-manual.
> > > > >
> > > > > /johannes
> > > > >
> > > > >
> > > > >>
> > > > >> Also, please send matplotlib questions just to the matplotlib
> list.
> > > > >> Thanks.
> > > > >>
> > > > >> --
> > > > >> Robert Kern
> > > > >>
> > > > >> "I have come to believe that the whole world is an enigma, a
> > harmless
> > > > >> enigma that is made terrible by our own mad attempt to interpret
> it
> > as
> > > > >> though it had an underlying truth."
> > > > >> -- Umberto Eco
> > > > >>
> > > > >>
> > > >
> > >
> >
> ------------------------------------------------------------------------------
> > > > >> 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
> > > > >> Mat...@li...
> > > > >> https://lists.sourceforge.net/lists/listinfo/matplotlib-users
> > > > >
> > > > > --
> > > > > NEU: FreePhone - kostenlos mobil telefonieren und surfen!
> > > > > Jetzt informieren: http://www.gmx.net/de/go/freephone
> > > > > _______________________________________________
> > > > > SciPy-User mailing list
> > > > > Sci...@sc...
> > > > > http://mail.scipy.org/mailman/listinfo/scipy-user
> > > > >
> > > >
> > > > We have added a new feature to do just that in the development
> branch,
> > > > but it should be fairly trivial to do with existing releases of
> > > > matplotlib. Just create a figure object and use its figtitle to hold
> > > > the expression and then save the figure.
> > >
> > > It might be trivial but how to remove the axis/plot then and crop the
> > > extend of the eps?
> > >
> > > I tried:
> > >
> > > plt.figure()
> > >
> >
> plt.title(r'$F(x)=p*\frac{1}{s1\sqrt{2\pi}}*e^{-\frac{1}{2}*(\frac{x-m}{s1})}+(1-p)*\frac{1}{s1\sqrt{2\pi}}*e^{-\frac{1}{2}*(\frac{x-m}{s1})}$',
> > > fontsize=20)
> > > plt.show()
> > >
> > > /j
> > >
> > >
> > Use figtext instead. I did the following and it looked fine to me:
> >
> > plt.figure()
> > plt.figtext(0.1, 0.5,
> >
> r'$F(x)=p*\frac{1}{s1\sqrt{2\pi}}*e^{-\frac{1}{2}*(\frac{x-m}{s1})}+(1-p)*\frac{1}{s1\sqrt{2\pi}}*e^{-\frac{1}{2}*(\frac{x-m}{s1})}$',
> > fontsize=20)
> > plt.show()
> >
>
>
> thats working nearly perfect, I would just need to crop the display extend
> resp. the white space from the eps around...any option/idea?
>
>
> /j
>
>
Try setting bbox_inches='tight' in the call to savefig. With
bbox_inches='tight', you can then specify the 'pad_inches' kwarg to indicate
how much padding to put around the tight bounding box. This should work,
however some older version of matplotlib might not check the figure text
objects for calculating the tightest bounding box. In that case, the way
that I typically autocrop my eps files is to convert it into a pdf file and
use pdfcrop and then convert it back to eps (assuming you have a standard
linux install). Here is the chain of commands I typically use on my Fedora
machine:
epstopdf mathtext.eps --outfile=mathtext.temp.pdf
pdfcrop --margins '15 2 15 2' --clip mathtext.temp.pdf mathtext.cropped.pdf
pdftops mathtext.cropped.pdf mathtext.cropped.eps
You can adjust margins to your tastes, and the names of the files are fairly
arbitrary.
I hope that helps!
Ben Root
From: Jean-Baptiste M. <mar...@ia...> - 2011年05月16日 16:25:45
Hi Thomas,
AtPy looks great. My only concern with starjava was to use stilts functionalities for managing ascii tables and coordinates transformations from degrees to sexagesimal and reverse. But I guess that AtPy deals with headers having a leading "#" and names of columns, like
# id ra_min ra_max dec_min dec_max
and that pywcs can do transformations. So I can switch to pure python scripts.
Cheers,
JB
> Hi Jean-Baptiste,
> 
> I don't think numpy is currently supported by Jython.
> 
> I do not know exactly what is your use of starjava, but you might want to have a look at AtPy (http://atpy.github.com/) which does a pretty good job at manipulating (astronomical) tables.
> 
> Cheers,
> 
> Thomas Boch
> 
> On 16/05/11 17:02, Jean-Baptiste Marquette wrote:
>> 
>> Dear matplotlib/numpy gurus,
>> 
>> This is my first attempt to use matplotlib & numpy, with the following small piece of code:
>> 
>> #!/usr/bin/env jython **** jython because of the import of stilts from starjava ****
>> 
>> # Fabrique les figures des champs du papier Catalogue
>> 
>> 
>> __author__="marquett"
>> __date__ ="16ドル mai 2011 12:17:08$"
>> 
>> import sys
>> sys.path.append('/star/starjava/etc/ttools')
>> sys.path.append('/Library/Frameworks/Python.framework//Versions/2.6/lib/python2.6/site-packages')
>> import stilts
>> import glob
>> import matplotlib.pyplot as plt
>> 
>> I got the following trace:
>> 
>> Traceback (most recent call last):
>> File "/Users/marquett/Downloads/FigCat/src/figcat.py", line 14, in <module>
>> import matplotlib.pyplot as plt
>> File "/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/matplotlib/__init__.py", line 135, in <module>
>> from matplotlib.rcsetup import (defaultParams,
>> File "/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/matplotlib/rcsetup.py", line 19, in <module>
>> from matplotlib.colors import is_color_like
>> File "/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/matplotlib/colors.py", line 52, in <module>
>> import numpy as np
>> File "/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/numpy/__init__.py", line 137, in <module>
>> import add_newdocs
>> File "/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/numpy/add_newdocs.py", line 9, in <module>
>> from numpy.lib import add_newdoc
>> File "/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/numpy/lib/__init__.py", line 4, in <module>
>> from type_check import *
>> File "/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/numpy/lib/type_check.py", line 8, in <module>
>> import numpy.core.numeric as _nx
>> File "/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/numpy/core/__init__.py", line 5, in <module>
>> import multiarray
>> ImportError: No module named multiarray
>> 
>> I use the latest 1.6.0 version of numpy and 1.0.0 one of matplotlib.
>> 
>> My so little experience tells me that this is a deep numpy issue rather than a matplotlib one.
>> 
>> Any hint welcome, thanks.
>> 
>> JB Marquette
>> 
>> 
>> _______________________________________________
>> AstroPy mailing list
>> As...@sc...
>> http://mail.scipy.org/mailman/listinfo/astropy
> 
> 
> -- 
> Thomas Boch
> CDS/Observatoire Astronomique Phone : 33 (0)3 68 85 24 42
> 11, rue de l'Universite Fax : 33 (0)3 68 85 24 17
> F-67000 Strasbourg Email : tho...@as...
> France http://cdsweb.u-strasbg.fr/~boch
From: Johannes R. <JRa...@gm...> - 2011年05月16日 16:23:08
-------- Original-Nachricht --------
> Datum: 2011年5月16日 10:59:34 -0500
> Von: Benjamin Root <ben...@ou...>
> An: Johannes Radinger <JRa...@gm...>
> CC: mat...@li...
> Betreff: Re: [Matplotlib-users] use matplotlib to produce mathathematical expression only
> On Mon, May 16, 2011 at 10:21 AM, Johannes Radinger
> <JRa...@gm...>wrote:
> 
> >
> > -------- Original-Nachricht --------
> > > Datum: 2011年5月16日 09:49:24 -0500
> > > Von: Benjamin Root <ben...@ou...>
> > > An: "mat...@li..." <
> > mat...@li...>
> > > Betreff: Re: [Matplotlib-users] [SciPy-User] use matplotlib to produce
> > mathathematical expression only
> >
> > > On Monday, May 16, 2011, Johannes Radinger <JRa...@gm...> wrote:
> > > >
> > > > -------- Original-Nachricht --------
> > > >> Datum: 2011年5月16日 08:28:49 -0500
> > > >> Von: Robert Kern <rob...@gm...>
> > > >> An: SciPy Users List <sci...@sc...>
> > > >> CC: mat...@li...
> > > >> Betreff: Re: [Matplotlib-users] [SciPy-User] use matplotlib to
> produce
> > > mathathematical expression only
> > > >
> > > >> On Mon, May 16, 2011 at 08:21, Johannes Radinger <JRa...@gm...>
> > > wrote:
> > > >> > Hello,
> > > >> >
> > > >> > I want to produce a eps file of following mathematical
> expression:
> > > >> >
> > > >>
> > >
> >
> r'$F(x)=p*\frac{1}{s1\sqrt{2\pi}}*e^{-\frac{1}{2}*(\frac{x-m}{s1})}+(1-p)*\frac{1}{s1\sqrt{2\pi}}*e^{-\frac{1}{2}*(\frac{x-m}{s1})}$'
> > > >> >
> > > >> > is it possible to somehow missuse matplotlib for that to produce
> > only
> > > >> the function without any other plot things? Or is there a better
> > python
> > > >> library within scipy? I don't want to install the complete latex
> > > libraries just
> > > >> for producing this single eps file.
> > > >>
> > > >> Check out mathtex. It is matplotlib's TeX parsing engine and
> renderer
> > > >> broken out into a separate library:
> > > >>
> > > >> http://code.google.com/p/mathtex/
> > > >
> > > > I also thought about mathtex but don't know how to use my
> mathematical
> > > expression without a plot of axis etc. any suggestions? I just want to
> > have
> > > the formated math expression as eps and I don't know how to do it,
> still
> > > after reading in the matplotlib-manual.
> > > >
> > > > /johannes
> > > >
> > > >
> > > >>
> > > >> Also, please send matplotlib questions just to the matplotlib list.
> > > >> Thanks.
> > > >>
> > > >> --
> > > >> Robert Kern
> > > >>
> > > >> "I have come to believe that the whole world is an enigma, a
> harmless
> > > >> enigma that is made terrible by our own mad attempt to interpret it
> as
> > > >> though it had an underlying truth."
> > > >> -- Umberto Eco
> > > >>
> > > >>
> > >
> >
> ------------------------------------------------------------------------------
> > > >> 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
> > > >> Mat...@li...
> > > >> https://lists.sourceforge.net/lists/listinfo/matplotlib-users
> > > >
> > > > --
> > > > NEU: FreePhone - kostenlos mobil telefonieren und surfen!
> > > > Jetzt informieren: http://www.gmx.net/de/go/freephone
> > > > _______________________________________________
> > > > SciPy-User mailing list
> > > > Sci...@sc...
> > > > http://mail.scipy.org/mailman/listinfo/scipy-user
> > > >
> > >
> > > We have added a new feature to do just that in the development branch,
> > > but it should be fairly trivial to do with existing releases of
> > > matplotlib. Just create a figure object and use its figtitle to hold
> > > the expression and then save the figure.
> >
> > It might be trivial but how to remove the axis/plot then and crop the
> > extend of the eps?
> >
> > I tried:
> >
> > plt.figure()
> >
> plt.title(r'$F(x)=p*\frac{1}{s1\sqrt{2\pi}}*e^{-\frac{1}{2}*(\frac{x-m}{s1})}+(1-p)*\frac{1}{s1\sqrt{2\pi}}*e^{-\frac{1}{2}*(\frac{x-m}{s1})}$',
> > fontsize=20)
> > plt.show()
> >
> > /j
> >
> >
> Use figtext instead. I did the following and it looked fine to me:
> 
> plt.figure()
> plt.figtext(0.1, 0.5,
> r'$F(x)=p*\frac{1}{s1\sqrt{2\pi}}*e^{-\frac{1}{2}*(\frac{x-m}{s1})}+(1-p)*\frac{1}{s1\sqrt{2\pi}}*e^{-\frac{1}{2}*(\frac{x-m}{s1})}$',
> fontsize=20)
> plt.show()
> 
thats working nearly perfect, I would just need to crop the display extend resp. the white space from the eps around...any option/idea?
/j
> 
> I hope that helps!
> Ben Root
-- 
NEU: FreePhone - kostenlos mobil telefonieren und surfen!			
Jetzt informieren: http://www.gmx.net/de/go/freephone
Hi Jean-Baptiste,
I don't think numpy is currently supported by Jython.
I do not know exactly what is your use of starjava, but you might want 
to have a look at AtPy (http://atpy.github.com/) which does a pretty 
good job at manipulating (astronomical) tables.
Cheers,
Thomas Boch
On 16/05/11 17:02, Jean-Baptiste Marquette wrote:
> Dear matplotlib/numpy gurus,
>
> This is my first attempt to use matplotlib & numpy, with the following 
> small piece of code:
>
> #!/usr/bin/env jython **** jython because of the import of stilts 
> from starjava ****
>
> # Fabrique les figures des champs du papier Catalogue
>
>
> __author__="marquett"
> __date__ ="16ドル mai 2011 12:17:08$"
>
> import sys
> sys.path.append('/star/starjava/etc/ttools')
> sys.path.append('/Library/Frameworks/Python.framework//Versions/2.6/lib/python2.6/site-packages')
> import stilts
> import glob
> import matplotlib.pyplot as plt
>
> I got the following trace:
>
> Traceback (most recent call last):
> File "/Users/marquett/Downloads/FigCat/src/figcat.py", line 14, in 
> <module>
> import matplotlib.pyplot as plt
> File 
> "/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/matplotlib/__init__.py", 
> line 135, in <module>
> from matplotlib.rcsetup import (defaultParams,
> File 
> "/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/matplotlib/rcsetup.py", 
> line 19, in <module>
> from matplotlib.colors import is_color_like
> File 
> "/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/matplotlib/colors.py", 
> line 52, in <module>
> import numpy as np
> File 
> "/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/numpy/__init__.py", 
> line 137, in <module>
> import add_newdocs
> File 
> "/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/numpy/add_newdocs.py", 
> line 9, in <module>
> from numpy.lib import add_newdoc
> File 
> "/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/numpy/lib/__init__.py", 
> line 4, in <module>
> from type_check import *
> File 
> "/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/numpy/lib/type_check.py", 
> line 8, in <module>
> import numpy.core.numeric as _nx
> File 
> "/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/numpy/core/__init__.py", 
> line 5, in <module>
> import multiarray
> ImportError: No module named multiarray
>
> I use the latest 1.6.0 version of numpy and 1.0.0 one of matplotlib.
>
> My so little experience tells me that this is a deep numpy issue 
> rather than a matplotlib one.
>
> Any hint welcome, thanks.
>
> JB Marquette
>
>
> _______________________________________________
> AstroPy mailing list
> As...@sc...
> http://mail.scipy.org/mailman/listinfo/astropy
-- 
Thomas Boch
 CDS/Observatoire Astronomique Phone : 33 (0)3 68 85 24 42
 11, rue de l'Universite Fax : 33 (0)3 68 85 24 17
 F-67000 Strasbourg Email : tho...@as...
 France http://cdsweb.u-strasbg.fr/~boch
From: Benjamin R. <ben...@ou...> - 2011年05月16日 16:00:00
On Mon, May 16, 2011 at 10:21 AM, Johannes Radinger <JRa...@gm...>wrote:
>
> -------- Original-Nachricht --------
> > Datum: 2011年5月16日 09:49:24 -0500
> > Von: Benjamin Root <ben...@ou...>
> > An: "mat...@li..." <
> mat...@li...>
> > Betreff: Re: [Matplotlib-users] [SciPy-User] use matplotlib to produce
> mathathematical expression only
>
> > On Monday, May 16, 2011, Johannes Radinger <JRa...@gm...> wrote:
> > >
> > > -------- Original-Nachricht --------
> > >> Datum: 2011年5月16日 08:28:49 -0500
> > >> Von: Robert Kern <rob...@gm...>
> > >> An: SciPy Users List <sci...@sc...>
> > >> CC: mat...@li...
> > >> Betreff: Re: [Matplotlib-users] [SciPy-User] use matplotlib to produce
> > mathathematical expression only
> > >
> > >> On Mon, May 16, 2011 at 08:21, Johannes Radinger <JRa...@gm...>
> > wrote:
> > >> > Hello,
> > >> >
> > >> > I want to produce a eps file of following mathematical expression:
> > >> >
> > >>
> >
> r'$F(x)=p*\frac{1}{s1\sqrt{2\pi}}*e^{-\frac{1}{2}*(\frac{x-m}{s1})}+(1-p)*\frac{1}{s1\sqrt{2\pi}}*e^{-\frac{1}{2}*(\frac{x-m}{s1})}$'
> > >> >
> > >> > is it possible to somehow missuse matplotlib for that to produce
> only
> > >> the function without any other plot things? Or is there a better
> python
> > >> library within scipy? I don't want to install the complete latex
> > libraries just
> > >> for producing this single eps file.
> > >>
> > >> Check out mathtex. It is matplotlib's TeX parsing engine and renderer
> > >> broken out into a separate library:
> > >>
> > >> http://code.google.com/p/mathtex/
> > >
> > > I also thought about mathtex but don't know how to use my mathematical
> > expression without a plot of axis etc. any suggestions? I just want to
> have
> > the formated math expression as eps and I don't know how to do it, still
> > after reading in the matplotlib-manual.
> > >
> > > /johannes
> > >
> > >
> > >>
> > >> Also, please send matplotlib questions just to the matplotlib list.
> > >> Thanks.
> > >>
> > >> --
> > >> Robert Kern
> > >>
> > >> "I have come to believe that the whole world is an enigma, a harmless
> > >> enigma that is made terrible by our own mad attempt to interpret it as
> > >> though it had an underlying truth."
> > >> -- Umberto Eco
> > >>
> > >>
> >
> ------------------------------------------------------------------------------
> > >> 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
> > >> Mat...@li...
> > >> https://lists.sourceforge.net/lists/listinfo/matplotlib-users
> > >
> > > --
> > > NEU: FreePhone - kostenlos mobil telefonieren und surfen!
> > > Jetzt informieren: http://www.gmx.net/de/go/freephone
> > > _______________________________________________
> > > SciPy-User mailing list
> > > Sci...@sc...
> > > http://mail.scipy.org/mailman/listinfo/scipy-user
> > >
> >
> > We have added a new feature to do just that in the development branch,
> > but it should be fairly trivial to do with existing releases of
> > matplotlib. Just create a figure object and use its figtitle to hold
> > the expression and then save the figure.
>
> It might be trivial but how to remove the axis/plot then and crop the
> extend of the eps?
>
> I tried:
>
> plt.figure()
> plt.title(r'$F(x)=p*\frac{1}{s1\sqrt{2\pi}}*e^{-\frac{1}{2}*(\frac{x-m}{s1})}+(1-p)*\frac{1}{s1\sqrt{2\pi}}*e^{-\frac{1}{2}*(\frac{x-m}{s1})}$',
> fontsize=20)
> plt.show()
>
> /j
>
>
Use figtext instead. I did the following and it looked fine to me:
plt.figure()
plt.figtext(0.1, 0.5,
r'$F(x)=p*\frac{1}{s1\sqrt{2\pi}}*e^{-\frac{1}{2}*(\frac{x-m}{s1})}+(1-p)*\frac{1}{s1\sqrt{2\pi}}*e^{-\frac{1}{2}*(\frac{x-m}{s1})}$',
fontsize=20)
plt.show()
I hope that helps!
Ben Root
matplotlib or numpy aren't going to work with jython.
On May 16, 2011, at 11:02 AM, Jean-Baptiste Marquette wrote:
> Dear matplotlib/numpy gurus,
>
> This is my first attempt to use matplotlib & numpy, with the 
> following small piece of code:
>
> #!/usr/bin/env jython **** jython because of the import of stilts 
> from starjava ****
>
> # Fabrique les figures des champs du papier Catalogue
>
>
> __author__="marquett"
> __date__ ="16ドル mai 2011 12:17:08$"
>
> import sys
> sys.path.append('/star/starjava/etc/ttools')
> sys.path.append('/Library/Frameworks/Python.framework//Versions/2.6/ 
> lib/python2.6/site-packages')
> import stilts
> import glob
> import matplotlib.pyplot as plt
>
> I got the following trace:
>
> Traceback (most recent call last):
> File "/Users/marquett/Downloads/FigCat/src/figcat.py", line 14, in 
> <module>
> import matplotlib.pyplot as plt
> File "/Library/Frameworks/Python.framework/Versions/2.6/lib/ 
> python2.6/site-packages/matplotlib/__init__.py", line 135, in <module>
> from matplotlib.rcsetup import (defaultParams,
> File "/Library/Frameworks/Python.framework/Versions/2.6/lib/ 
> python2.6/site-packages/matplotlib/rcsetup.py", line 19, in <module>
> from matplotlib.colors import is_color_like
> File "/Library/Frameworks/Python.framework/Versions/2.6/lib/ 
> python2.6/site-packages/matplotlib/colors.py", line 52, in <module>
> import numpy as np
> File "/Library/Frameworks/Python.framework/Versions/2.6/lib/ 
> python2.6/site-packages/numpy/__init__.py", line 137, in <module>
> import add_newdocs
> File "/Library/Frameworks/Python.framework/Versions/2.6/lib/ 
> python2.6/site-packages/numpy/add_newdocs.py", line 9, in <module>
> from numpy.lib import add_newdoc
> File "/Library/Frameworks/Python.framework/Versions/2.6/lib/ 
> python2.6/site-packages/numpy/lib/__init__.py", line 4, in <module>
> from type_check import *
> File "/Library/Frameworks/Python.framework/Versions/2.6/lib/ 
> python2.6/site-packages/numpy/lib/type_check.py", line 8, in <module>
> import numpy.core.numeric as _nx
> File "/Library/Frameworks/Python.framework/Versions/2.6/lib/ 
> python2.6/site-packages/numpy/core/__init__.py", line 5, in <module>
> import multiarray
> ImportError: No module named multiarray
>
> I use the latest 1.6.0 version of numpy and 1.0.0 one of matplotlib.
>
> My so little experience tells me that this is a deep numpy issue 
> rather than a matplotlib one.
>
> Any hint welcome, thanks.
>
> JB Marquette
>
> _______________________________________________
> AstroPy mailing list
> As...@sc...
> http://mail.scipy.org/mailman/listinfo/astropy
From: Johannes R. <JRa...@gm...> - 2011年05月16日 15:21:47
-------- Original-Nachricht --------
> Datum: 2011年5月16日 09:49:24 -0500
> Von: Benjamin Root <ben...@ou...>
> An: "mat...@li..." <mat...@li...>
> Betreff: Re: [Matplotlib-users] [SciPy-User] use matplotlib to produce	mathathematical expression only
> On Monday, May 16, 2011, Johannes Radinger <JRa...@gm...> wrote:
> >
> > -------- Original-Nachricht --------
> >> Datum: 2011年5月16日 08:28:49 -0500
> >> Von: Robert Kern <rob...@gm...>
> >> An: SciPy Users List <sci...@sc...>
> >> CC: mat...@li...
> >> Betreff: Re: [Matplotlib-users] [SciPy-User] use matplotlib to produce
>    mathathematical expression only
> >
> >> On Mon, May 16, 2011 at 08:21, Johannes Radinger <JRa...@gm...>
> wrote:
> >> > Hello,
> >> >
> >> > I want to produce a eps file of following mathematical expression:
> >> >
> >>
> r'$F(x)=p*\frac{1}{s1\sqrt{2\pi}}*e^{-\frac{1}{2}*(\frac{x-m}{s1})}+(1-p)*\frac{1}{s1\sqrt{2\pi}}*e^{-\frac{1}{2}*(\frac{x-m}{s1})}$'
> >> >
> >> > is it possible to somehow missuse matplotlib for that to produce only
> >> the function without any other plot things? Or is there a better python
> >> library within scipy? I don't want to install the complete latex
> libraries just
> >> for producing this single eps file.
> >>
> >> Check out mathtex. It is matplotlib's TeX parsing engine and renderer
> >> broken out into a separate library:
> >>
> >> http://code.google.com/p/mathtex/
> >
> > I also thought about mathtex but don't know how to use my mathematical
> expression without a plot of axis etc. any suggestions? I just want to have
> the formated math expression as eps and I don't know how to do it, still
> after reading in the matplotlib-manual.
> >
> > /johannes
> >
> >
> >>
> >> Also, please send matplotlib questions just to the matplotlib list.
> >> Thanks.
> >>
> >> --
> >> Robert Kern
> >>
> >> "I have come to believe that the whole world is an enigma, a harmless
> >> enigma that is made terrible by our own mad attempt to interpret it as
> >> though it had an underlying truth."
> >>  -- Umberto Eco
> >>
> >>
> ------------------------------------------------------------------------------
> >> 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
> >> Mat...@li...
> >> https://lists.sourceforge.net/lists/listinfo/matplotlib-users
> >
> > --
> > NEU: FreePhone - kostenlos mobil telefonieren und surfen!
> > Jetzt informieren: http://www.gmx.net/de/go/freephone
> > _______________________________________________
> > SciPy-User mailing list
> > Sci...@sc...
> > http://mail.scipy.org/mailman/listinfo/scipy-user
> >
> 
> We have added a new feature to do just that in the development branch,
> but it should be fairly trivial to do with existing releases of
> matplotlib. Just create a figure object and use its figtitle to hold
> the expression and then save the figure.
It might be trivial but how to remove the axis/plot then and crop the extend of the eps?
I tried:
plt.figure()
plt.title(r'$F(x)=p*\frac{1}{s1\sqrt{2\pi}}*e^{-\frac{1}{2}*(\frac{x-m}{s1})}+(1-p)*\frac{1}{s1\sqrt{2\pi}}*e^{-\frac{1}{2}*(\frac{x-m}{s1})}$', fontsize=20)
plt.show()
/j
> 
> Ben Root
> 
> ------------------------------------------------------------------------------
> 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
> Mat...@li...
> https://lists.sourceforge.net/lists/listinfo/matplotlib-users
-- 
NEU: FreePhone - kostenlos mobil telefonieren und surfen!			
Jetzt informieren: http://www.gmx.net/de/go/freephone
From: Robert K. <rob...@gm...> - 2011年05月16日 15:06:46
On Mon, May 16, 2011 at 09:23, Johannes Radinger <JRa...@gm...> wrote:
>
> -------- Original-Nachricht --------
>> Datum: 2011年5月16日 08:28:49 -0500
>> Von: Robert Kern <rob...@gm...>
>> An: SciPy Users List <sci...@sc...>
>> CC: mat...@li...
>> Betreff: Re: [Matplotlib-users] [SciPy-User] use matplotlib to produce    mathathematical expression only
>
>> On Mon, May 16, 2011 at 08:21, Johannes Radinger <JRa...@gm...> wrote:
>> > Hello,
>> >
>> > I want to produce a eps file of following mathematical expression:
>> >
>> r'$F(x)=p*\frac{1}{s1\sqrt{2\pi}}*e^{-\frac{1}{2}*(\frac{x-m}{s1})}+(1-p)*\frac{1}{s1\sqrt{2\pi}}*e^{-\frac{1}{2}*(\frac{x-m}{s1})}$'
>> >
>> > is it possible to somehow missuse matplotlib for that to produce only
>> the function without any other plot things? Or is there a better python
>> library within scipy? I don't want to install the complete latex libraries just
>> for producing this single eps file.
>>
>> Check out mathtex. It is matplotlib's TeX parsing engine and renderer
>> broken out into a separate library:
>>
>> http://code.google.com/p/mathtex/
>
> I also thought about mathtex but don't know how to use my mathematical expression without a plot of axis etc. any suggestions? I just want to have the formated math expression as eps and I don't know how to do it, still after reading in the matplotlib-manual.
The mathtex that I link to above is a separate library, not a part of
matplotlib. Please follow the link.
-- 
Robert Kern
"I have come to believe that the whole world is an enigma, a harmless
enigma that is made terrible by our own mad attempt to interpret it as
though it had an underlying truth."
 -- Umberto Eco
From: Jean-Baptiste M. <mar...@ia...> - 2011年05月16日 15:02:14
Dear matplotlib/numpy gurus,
This is my first attempt to use matplotlib & numpy, with the following small piece of code:
#!/usr/bin/env jython **** jython because of the import of stilts from starjava ****
# Fabrique les figures des champs du papier Catalogue
__author__="marquett"
__date__ ="16ドル mai 2011 12:17:08$"
import sys
sys.path.append('/star/starjava/etc/ttools')
sys.path.append('/Library/Frameworks/Python.framework//Versions/2.6/lib/python2.6/site-packages')
import stilts
import glob
import matplotlib.pyplot as plt
I got the following trace:
Traceback (most recent call last):
 File "/Users/marquett/Downloads/FigCat/src/figcat.py", line 14, in <module>
 import matplotlib.pyplot as plt
 File "/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/matplotlib/__init__.py", line 135, in <module>
 from matplotlib.rcsetup import (defaultParams,
 File "/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/matplotlib/rcsetup.py", line 19, in <module>
 from matplotlib.colors import is_color_like
 File "/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/matplotlib/colors.py", line 52, in <module>
 import numpy as np
 File "/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/numpy/__init__.py", line 137, in <module>
 import add_newdocs
 File "/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/numpy/add_newdocs.py", line 9, in <module>
 from numpy.lib import add_newdoc
 File "/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/numpy/lib/__init__.py", line 4, in <module>
 from type_check import *
 File "/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/numpy/lib/type_check.py", line 8, in <module>
 import numpy.core.numeric as _nx
 File "/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/numpy/core/__init__.py", line 5, in <module>
 import multiarray
ImportError: No module named multiarray
I use the latest 1.6.0 version of numpy and 1.0.0 one of matplotlib.
My so little experience tells me that this is a deep numpy issue rather than a matplotlib one.
Any hint welcome, thanks.
JB Marquette
From: Benjamin R. <ben...@ou...> - 2011年05月16日 14:49:31
On Monday, May 16, 2011, Johannes Radinger <JRa...@gm...> wrote:
>
> -------- Original-Nachricht --------
>> Datum: 2011年5月16日 08:28:49 -0500
>> Von: Robert Kern <rob...@gm...>
>> An: SciPy Users List <sci...@sc...>
>> CC: mat...@li...
>> Betreff: Re: [Matplotlib-users] [SciPy-User] use matplotlib to produce    mathathematical expression only
>
>> On Mon, May 16, 2011 at 08:21, Johannes Radinger <JRa...@gm...> wrote:
>> > Hello,
>> >
>> > I want to produce a eps file of following mathematical expression:
>> >
>> r'$F(x)=p*\frac{1}{s1\sqrt{2\pi}}*e^{-\frac{1}{2}*(\frac{x-m}{s1})}+(1-p)*\frac{1}{s1\sqrt{2\pi}}*e^{-\frac{1}{2}*(\frac{x-m}{s1})}$'
>> >
>> > is it possible to somehow missuse matplotlib for that to produce only
>> the function without any other plot things? Or is there a better python
>> library within scipy? I don't want to install the complete latex libraries just
>> for producing this single eps file.
>>
>> Check out mathtex. It is matplotlib's TeX parsing engine and renderer
>> broken out into a separate library:
>>
>> http://code.google.com/p/mathtex/
>
> I also thought about mathtex but don't know how to use my mathematical expression without a plot of axis etc. any suggestions? I just want to have the formated math expression as eps and I don't know how to do it, still after reading in the matplotlib-manual.
>
> /johannes
>
>
>>
>> Also, please send matplotlib questions just to the matplotlib list.
>> Thanks.
>>
>> --
>> Robert Kern
>>
>> "I have come to believe that the whole world is an enigma, a harmless
>> enigma that is made terrible by our own mad attempt to interpret it as
>> though it had an underlying truth."
>>  -- Umberto Eco
>>
>> ------------------------------------------------------------------------------
>> 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
>> Mat...@li...
>> https://lists.sourceforge.net/lists/listinfo/matplotlib-users
>
> --
> NEU: FreePhone - kostenlos mobil telefonieren und surfen!
> Jetzt informieren: http://www.gmx.net/de/go/freephone
> _______________________________________________
> SciPy-User mailing list
> Sci...@sc...
> http://mail.scipy.org/mailman/listinfo/scipy-user
>
We have added a new feature to do just that in the development branch,
but it should be fairly trivial to do with existing releases of
matplotlib. Just create a figure object and use its figtitle to hold
the expression and then save the figure.
Ben Root
From: Johannes R. <JRa...@gm...> - 2011年05月16日 14:23:34
-------- Original-Nachricht --------
> Datum: 2011年5月16日 08:28:49 -0500
> Von: Robert Kern <rob...@gm...>
> An: SciPy Users List <sci...@sc...>
> CC: mat...@li...
> Betreff: Re: [Matplotlib-users] [SciPy-User] use matplotlib to produce	mathathematical expression only
> On Mon, May 16, 2011 at 08:21, Johannes Radinger <JRa...@gm...> wrote:
> > Hello,
> >
> > I want to produce a eps file of following mathematical expression:
> >
> r'$F(x)=p*\frac{1}{s1\sqrt{2\pi}}*e^{-\frac{1}{2}*(\frac{x-m}{s1})}+(1-p)*\frac{1}{s1\sqrt{2\pi}}*e^{-\frac{1}{2}*(\frac{x-m}{s1})}$'
> >
> > is it possible to somehow missuse matplotlib for that to produce only
> the function without any other plot things? Or is there a better python
> library within scipy? I don't want to install the complete latex libraries just
> for producing this single eps file.
> 
> Check out mathtex. It is matplotlib's TeX parsing engine and renderer
> broken out into a separate library:
> 
> http://code.google.com/p/mathtex/
I also thought about mathtex but don't know how to use my mathematical expression without a plot of axis etc. any suggestions? I just want to have the formated math expression as eps and I don't know how to do it, still after reading in the matplotlib-manual.
/johannes
> 
> Also, please send matplotlib questions just to the matplotlib list.
> Thanks.
> 
> -- 
> Robert Kern
> 
> "I have come to believe that the whole world is an enigma, a harmless
> enigma that is made terrible by our own mad attempt to interpret it as
> though it had an underlying truth."
>  -- Umberto Eco
> 
> ------------------------------------------------------------------------------
> 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
> Mat...@li...
> https://lists.sourceforge.net/lists/listinfo/matplotlib-users
-- 
NEU: FreePhone - kostenlos mobil telefonieren und surfen!			
Jetzt informieren: http://www.gmx.net/de/go/freephone
From: Robert K. <rob...@gm...> - 2011年05月16日 13:29:15
On Mon, May 16, 2011 at 08:21, Johannes Radinger <JRa...@gm...> wrote:
> Hello,
>
> I want to produce a eps file of following mathematical expression:
> r'$F(x)=p*\frac{1}{s1\sqrt{2\pi}}*e^{-\frac{1}{2}*(\frac{x-m}{s1})}+(1-p)*\frac{1}{s1\sqrt{2\pi}}*e^{-\frac{1}{2}*(\frac{x-m}{s1})}$'
>
> is it possible to somehow missuse matplotlib for that to produce only the function without any other plot things? Or is there a better python library within scipy? I don't want to install the complete latex libraries just for producing this single eps file.
Check out mathtex. It is matplotlib's TeX parsing engine and renderer
broken out into a separate library:
http://code.google.com/p/mathtex/
Also, please send matplotlib questions just to the matplotlib list. Thanks.
-- 
Robert Kern
"I have come to believe that the whole world is an enigma, a harmless
enigma that is made terrible by our own mad attempt to interpret it as
though it had an underlying truth."
 -- Umberto Eco
From: Johannes R. <JRa...@gm...> - 2011年05月16日 13:21:23
Hello,
I want to produce a eps file of following mathematical expression:
r'$F(x)=p*\frac{1}{s1\sqrt{2\pi}}*e^{-\frac{1}{2}*(\frac{x-m}{s1})}+(1-p)*\frac{1}{s1\sqrt{2\pi}}*e^{-\frac{1}{2}*(\frac{x-m}{s1})}$'
is it possible to somehow missuse matplotlib for that to produce only the function without any other plot things? Or is there a better python library within scipy? I don't want to install the complete latex libraries just for producing this single eps file.
thank you
/johannes
-- 
NEU: FreePhone - kostenlos mobil telefonieren und surfen!			
Jetzt informieren: http://www.gmx.net/de/go/freephone
From: Steve W. <pla...@gm...> - 2011年05月16日 03:33:16
>
> 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
From: Benjamin R. <ben...@ou...> - 2011年05月16日 02:11:08
On Sunday, May 15, 2011, Alice Marcot <ali...@gm...> 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.
5 messages has been excluded from this view by a project administrator.

Showing results of 279

<< < 1 .. 3 4 5 6 7 .. 12 > >> (Page 5 of 12)
Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.
Thanks for helping keep SourceForge clean.
X





Briefly describe the problem (required):
Upload screenshot of ad (required):
Select a file, or drag & drop file here.
Screenshot instructions:

Click URL instructions:
Right-click on the ad, choose "Copy Link", then paste here →
(This may not be possible with some types of ads)

More information about our ad policies

Ad destination/click URL:

AltStyle によって変換されたページ (->オリジナル) /