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
(12) |
2
(14) |
3
(13) |
4
(6) |
|
5
(6) |
6
(21) |
7
(29) |
8
(30) |
9
(13) |
10
(4) |
11
(4) |
|
12
(4) |
13
(15) |
14
(22) |
15
(23) |
16
(23) |
17
(9) |
18
(23) |
|
19
(12) |
20
(10) |
21
(26) |
22
(5) |
23
(32) |
24
(5) |
25
(7) |
|
26
(4) |
27
(3) |
28
(19) |
29
(20) |
|
|
|
|
From: Russell E. O. <ro...@uw...> - 2012-02-15 23:40:16
|
In article <loo...@po...>, 7stud <7s...@ex...> wrote: > Russell E. Owen <rowen@...> writes: > > > > > I just created a binary installer for python.org's 64-bit Python 2.7 > > (MacOS X 10.6 and later). I'd like a few folks to test it to make sure > > it works for more than just me, before serving it at the usual > > location. > > > > I can report that your installer has enabled me to successfully > execute the following two progams:... Thank you for testing it. I have uploaded the installer to sourceforge. -- Russell |
|
From: Russell E. O. <ro...@uw...> - 2012-02-15 23:33:33
|
In article <loo...@po...>, 7stud <7s...@ex...> wrote: > Since my op, I also tried to download: > > matplotlib-1.1.0.tar.gz > > and I got a Decompression Failed message in the Downloads window. > I checked my Safari settings, and > Safari is set to automatically decompress 'safe' files. > guess it couldn't in the case of matplotlib. > > Next, I tried decompressing and untaring myself: >... > So it seems to me like the tar.gz file at sourceforge is corrupted. Very odd. I'm on MacOS X 10.6.8 and I am able to download it and uncompress it just fine. I double click it and BOM helper handles it just fine. You might try reinstalling your operating system from a combo updater, or try BetterZip (which I own so I can easily make .zip and .tgz files with no Mac-specific content). -- Russell |
|
From: Benjamin R. <ben...@ou...> - 2012-02-15 22:16:25
|
On Wed, Feb 15, 2012 at 3:57 PM, Mark Lawrence <bre...@ya...>wrote:
> On 15/02/2012 21:34, Benjamin Root wrote:
> > On Wed, Feb 15, 2012 at 2:52 PM, Mark Lawrence<bre...@ya...
> >wrote:
> >
> >> On 15/02/2012 17:21, Benjamin Root wrote:
> >>> On Tue, Feb 14, 2012 at 8:58 AM, Mark Lawrence<bre...@ya...
> >>> wrote:
> >>>
> >>>> On 14/02/2012 13:52, Debashish Saha wrote:
> >>>>> import numpy
> >>>>>
> >>>>> from enthought.mayavi import mlab
> >>>>>
> >>>>> #def test_mesh():
> >>>>> #"""A very pretty picture of spherical harmonics translated from
> >>>>>
> >>>>> #the octaviz example."""
> >>>>> for r in range (1,5):
> >>>>> print r
> >>>>>
> >>>>>
> >>>>> pi = numpy.pi
> >>>>>
> >>>>> cos = numpy.cos
> >>>>>
> >>>>> sin = numpy.sin
> >>>>>
> >>>>> dphi, dtheta, dz = pi/250.0, pi/250.0, 0.01
> >>>>>
> >>>>> #[phi,theta] =
> >>>> numpy.mgrid[0:pi+dphi*1.5:dphi,0:2*pi+dtheta*1.5:dtheta]
> >>>>> [phi,z] = numpy.mgrid[0:2*pi+dphi*1.5:dphi,0:2+dz*1.5:dz]
> >>>>>
> >>>>> m0 = 4; m1 = 3; m2 = 2; m3 = 3; m4 = 6; m5 = 2; m6 = 6; m7 = 4;
> >>>>>
> >>>>> # r = sin(m0*phi)**m1 + cos(m2*phi)**m3 + 5*sin(m4*theta)**m5 +
> >>>>> cos(m6*theta)**m7
> >>>>>
> >>>>> #x = 1*sin(phi)*cos(theta)
> >>>>>
> >>>>> #y = 1*sin(phi)*sin(theta)
> >>>>>
> >>>>> #z = 1*cos(phi);
> >>>>> x=r*cos(phi)
> >>>>> y=r*sin(phi)
> >>>>> z=z
> >>>>> i=['Reds','greens','autumn','purples']
> >>>>> print i[r-1]
> >>>>> e=i[r-1]
> >>>>>
> >>>>> mlab.mesh(x, y, z,colormap='e')
> >>>>> #print i[r-1]
> >>>>>
> >>>>> Error:
> >>>>> TypeError Traceback (most recent call
> >>>> last)
> >>>>> C:\Python27\lib\site-packages\IPython\utils\py3compat.pyc in
> >>>>> execfile(fname, glob, loc)
> >>>>> 166 else:
> >>>>> 167 filename = fname
> >>>>> --> 168 exec compile(scripttext, filename, 'exec') in
> >> glob,
> >>>> loc
> >>>>> 169 else:
> >>>>> 170 def execfile(fname, *where):
> >>>>>
> >>>>> C:\Users\as\jhgf.py in<module>()
> >>>>> 24 print i[r-1]
> >>>>> 25 e=i[r-1]
> >>>>> ---> 26 mlab.mesh(x, y, z,'e')
> >>>>> 27 #print i[r-1]
> >>>>>
> >>>>> 28
> >>>>>
> >>>>> C:\Python27\lib\site-packages\mayavi\tools\helper_functions.pyc in
> >>>>> the_function(*args, **kwargs)
> >>>>> 32 def document_pipeline(pipeline):
> >>>>> 33 def the_function(*args, **kwargs):
> >>>>> ---> 34 return pipeline(*args, **kwargs)
> >>>>> 35
> >>>>> 36 if hasattr(pipeline, 'doc'):
> >>>>>
> >>>>> C:\Python27\lib\site-packages\mayavi\tools\helper_functions.pyc in
> >>>>> __call__(self, *args, **kwargs)
> >>>>> 77 scene.disable_render = True
> >>>>> 78 # Then call the real logic
> >>>>>
> >>>>> ---> 79 output = self.__call_internal__(*args, **kwargs)
> >>>>> 80 # And re-enable the rendering, if needed.
> >>>>>
> >>>>> 81 if scene is not None:
> >>>>>
> >>>>> C:\Python27\lib\site-packages\mayavi\tools\helper_functions.pyc in
> >>>>> __call_internal__(self, *args, **kwargs)
> >>>>> 830 filters.
> >>>>> 831 """
> >>>>> --> 832 self.source = self._source_function(*args,
> **kwargs)
> >>>>> 833 kwargs.pop('name', None)
> >>>>> 834 self.store_kwargs(kwargs)
> >>>>>
> >>>>> TypeError: grid_source() takes exactly 3 arguments (4 given)
> >>>>>
> >>>>>
> >>>>
> >>
> ------------------------------------------------------------------------------
> >>>>> Keep Your Developer Skills Current with LearnDevNow!
> >>>>> The most comprehensive online learning library for Microsoft
> developers
> >>>>> is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3,
> >> MVC3,
> >>>>> Metro Style Apps, more. Free future releases when you subscribe now!
> >>>>> http://p.sf.net/sfu/learndevnow-d2d
> >>>>
> >>>> Didn't this get answered on the python tutor mailing list within the
> >>>> last couple of hours? What's with it with you?
> >>>>
> >>>> --
> >>>> Cheers.
> >>>>
> >>>> Mark Lawrence.
> >>>>
> >>>>
> >>> A couple of things I would like to point out here:
> >>>
> >>> 1.) It is possible that Debashish sent similar questions to multiple
> >>> mailing lists in the hopes to maximize the chance of getting a
> response.
> >>> It may only "appear" that this thread was started after having the
> >> question
> >>> answered on another mailing list because of the delays that are
> notorious
> >>> on this list. I suspect he sent both emails at around the same time,
> but
> >>> the python tutors list processed it faster than the matplotlib-users
> >> list.
> >>>
> >>> Therefore...
> >>>
> >>> 2.) I would like to make sure that this mailing list remains a
> welcoming
> >>> forum for all users, and for all of us to understand that people have
> >>> different mailing habits that we may not be familiar with. Therefore,
> >>> gentle reminders of mailing decorum (such as reminders to bottom-post)
> >>> should be the response, not chastising.
> >>>
> >>> -- Debashish,
> >>>
> >>> We are more than happy to help you. Please keep your question to a
> >> single
> >>> mailing list at a time. The users on the mailing list will let you
> know
> >> if
> >>> you should direct your question elsewhere. In the case of your
> problem,
> >> it
> >>> is not matplotlib, but mayavi. Hopefully, you have been directed to
> the
> >>> mayavi mailing list.
> >>>
> >>> Cheers!
> >>> Ben Root
> >>>
> >>>
> >>>
> >>>
> >>>
> >>
> ------------------------------------------------------------------------------
> >>> Virtualization& Cloud Management Using Capacity Planning
> >>> Cloud computing makes use of virtualization - but cloud computing
> >>> also focuses on allowing computing to be delivered as a service.
> >>> http://www.accelacomm.com/jaw/sfnl/114/51521223/
> >>>
> >>>
> >>>
> >>> _______________________________________________
> >>> Matplotlib-users mailing list
> >>> Mat...@li...
> >>> https://lists.sourceforge.net/lists/listinfo/matplotlib-users
> >>
> >> Please accept my apologies if I breached protocol but there are five
> >> threads from the OP on the Python tutor mailing list, each of which has
> >> had one or more replies. Two of them don't actually ask a question, the
> >> above being one, and the OP hasn't had the courtesy to reply to anyone
> >> with a thank you or anything else.
> >>
> >> --
> >> Cheers.
> >>
> >> Mark Lawrence.
> >>
> >>
> >>
> > Mark,
> >
> > That may be the case, but he has only posted one other question before on
> > *this* mailing list. I do not frequent the python tutors list, and I do
> > not know how that list is run. I don't even "run" this list, either, so
> I
> > shouldn't be considered a moderator. However, as a fellow poster, I
> would
> > rather leave emails unanswered if we don't have anything constructive to
> > say, IMHO.
> >
> > Cheers!
> > Ben Root
> >
> >
> >
> >
> >
> ------------------------------------------------------------------------------
> > Virtualization& Cloud Management Using Capacity Planning
> > Cloud computing makes use of virtualization - but cloud computing
> > also focuses on allowing computing to be delivered as a service.
> > http://www.accelacomm.com/jaw/sfnl/114/51521223/
> >
> >
> >
> > _______________________________________________
> > Matplotlib-users mailing list
> > Mat...@li...
> > https://lists.sourceforge.net/lists/listinfo/matplotlib-users
>
> Correct, four minutes after posting it on the Python tutor mailing list.
> Presumably the people over there were discourteous for not answering
> quickly enough? Of course if you're happy to see people just slap a
> Python traceback here without even asking a question and presumably
> expect somebody to give a positive response then that's fine by me, but
> to do it in two separate places is just plain rude as far as I'm
> concerned and needs responding to. It seems as if the two of us think
> differently so I think it best if we agree to disagree and leave it at
> that. Is this ok with you?
>
> --
> Cheers.
>
> Mark Lawrence.
>
>
I am more of a live-and-let-live kind of person. I don't disagree that it
is rude. Certainly, if there is an apparent need to teach a user how to
provide more useful questions and not spam the lists, then let's do so in a
teaching manner. However, if the person continues to not provided useful
questions, then what can you do? If you want to vent, vent at stuffed
animal.
I welcome all on this list regardless of past "transgressions", and I want
to make sure everyone feels welcomed. As far as I am concerned, nothing
more needs to be said.
Ben Root
|
|
From: Mark L. <bre...@ya...> - 2012-02-15 22:00:10
|
On 15/02/2012 21:34, Benjamin Root wrote:
> On Wed, Feb 15, 2012 at 2:52 PM, Mark Lawrence<bre...@ya...>wrote:
>
>> On 15/02/2012 17:21, Benjamin Root wrote:
>>> On Tue, Feb 14, 2012 at 8:58 AM, Mark Lawrence<bre...@ya...
>>> wrote:
>>>
>>>> On 14/02/2012 13:52, Debashish Saha wrote:
>>>>> import numpy
>>>>>
>>>>> from enthought.mayavi import mlab
>>>>>
>>>>> #def test_mesh():
>>>>> #"""A very pretty picture of spherical harmonics translated from
>>>>>
>>>>> #the octaviz example."""
>>>>> for r in range (1,5):
>>>>> print r
>>>>>
>>>>>
>>>>> pi = numpy.pi
>>>>>
>>>>> cos = numpy.cos
>>>>>
>>>>> sin = numpy.sin
>>>>>
>>>>> dphi, dtheta, dz = pi/250.0, pi/250.0, 0.01
>>>>>
>>>>> #[phi,theta] =
>>>> numpy.mgrid[0:pi+dphi*1.5:dphi,0:2*pi+dtheta*1.5:dtheta]
>>>>> [phi,z] = numpy.mgrid[0:2*pi+dphi*1.5:dphi,0:2+dz*1.5:dz]
>>>>>
>>>>> m0 = 4; m1 = 3; m2 = 2; m3 = 3; m4 = 6; m5 = 2; m6 = 6; m7 = 4;
>>>>>
>>>>> # r = sin(m0*phi)**m1 + cos(m2*phi)**m3 + 5*sin(m4*theta)**m5 +
>>>>> cos(m6*theta)**m7
>>>>>
>>>>> #x = 1*sin(phi)*cos(theta)
>>>>>
>>>>> #y = 1*sin(phi)*sin(theta)
>>>>>
>>>>> #z = 1*cos(phi);
>>>>> x=r*cos(phi)
>>>>> y=r*sin(phi)
>>>>> z=z
>>>>> i=['Reds','greens','autumn','purples']
>>>>> print i[r-1]
>>>>> e=i[r-1]
>>>>>
>>>>> mlab.mesh(x, y, z,colormap='e')
>>>>> #print i[r-1]
>>>>>
>>>>> Error:
>>>>> TypeError Traceback (most recent call
>>>> last)
>>>>> C:\Python27\lib\site-packages\IPython\utils\py3compat.pyc in
>>>>> execfile(fname, glob, loc)
>>>>> 166 else:
>>>>> 167 filename = fname
>>>>> --> 168 exec compile(scripttext, filename, 'exec') in
>> glob,
>>>> loc
>>>>> 169 else:
>>>>> 170 def execfile(fname, *where):
>>>>>
>>>>> C:\Users\as\jhgf.py in<module>()
>>>>> 24 print i[r-1]
>>>>> 25 e=i[r-1]
>>>>> ---> 26 mlab.mesh(x, y, z,'e')
>>>>> 27 #print i[r-1]
>>>>>
>>>>> 28
>>>>>
>>>>> C:\Python27\lib\site-packages\mayavi\tools\helper_functions.pyc in
>>>>> the_function(*args, **kwargs)
>>>>> 32 def document_pipeline(pipeline):
>>>>> 33 def the_function(*args, **kwargs):
>>>>> ---> 34 return pipeline(*args, **kwargs)
>>>>> 35
>>>>> 36 if hasattr(pipeline, 'doc'):
>>>>>
>>>>> C:\Python27\lib\site-packages\mayavi\tools\helper_functions.pyc in
>>>>> __call__(self, *args, **kwargs)
>>>>> 77 scene.disable_render = True
>>>>> 78 # Then call the real logic
>>>>>
>>>>> ---> 79 output = self.__call_internal__(*args, **kwargs)
>>>>> 80 # And re-enable the rendering, if needed.
>>>>>
>>>>> 81 if scene is not None:
>>>>>
>>>>> C:\Python27\lib\site-packages\mayavi\tools\helper_functions.pyc in
>>>>> __call_internal__(self, *args, **kwargs)
>>>>> 830 filters.
>>>>> 831 """
>>>>> --> 832 self.source = self._source_function(*args, **kwargs)
>>>>> 833 kwargs.pop('name', None)
>>>>> 834 self.store_kwargs(kwargs)
>>>>>
>>>>> TypeError: grid_source() takes exactly 3 arguments (4 given)
>>>>>
>>>>>
>>>>
>> ------------------------------------------------------------------------------
>>>>> Keep Your Developer Skills Current with LearnDevNow!
>>>>> The most comprehensive online learning library for Microsoft developers
>>>>> is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3,
>> MVC3,
>>>>> Metro Style Apps, more. Free future releases when you subscribe now!
>>>>> http://p.sf.net/sfu/learndevnow-d2d
>>>>
>>>> Didn't this get answered on the python tutor mailing list within the
>>>> last couple of hours? What's with it with you?
>>>>
>>>> --
>>>> Cheers.
>>>>
>>>> Mark Lawrence.
>>>>
>>>>
>>> A couple of things I would like to point out here:
>>>
>>> 1.) It is possible that Debashish sent similar questions to multiple
>>> mailing lists in the hopes to maximize the chance of getting a response.
>>> It may only "appear" that this thread was started after having the
>> question
>>> answered on another mailing list because of the delays that are notorious
>>> on this list. I suspect he sent both emails at around the same time, but
>>> the python tutors list processed it faster than the matplotlib-users
>> list.
>>>
>>> Therefore...
>>>
>>> 2.) I would like to make sure that this mailing list remains a welcoming
>>> forum for all users, and for all of us to understand that people have
>>> different mailing habits that we may not be familiar with. Therefore,
>>> gentle reminders of mailing decorum (such as reminders to bottom-post)
>>> should be the response, not chastising.
>>>
>>> -- Debashish,
>>>
>>> We are more than happy to help you. Please keep your question to a
>> single
>>> mailing list at a time. The users on the mailing list will let you know
>> if
>>> you should direct your question elsewhere. In the case of your problem,
>> it
>>> is not matplotlib, but mayavi. Hopefully, you have been directed to the
>>> mayavi mailing list.
>>>
>>> Cheers!
>>> Ben Root
>>>
>>>
>>>
>>>
>>>
>> ------------------------------------------------------------------------------
>>> Virtualization& Cloud Management Using Capacity Planning
>>> Cloud computing makes use of virtualization - but cloud computing
>>> also focuses on allowing computing to be delivered as a service.
>>> http://www.accelacomm.com/jaw/sfnl/114/51521223/
>>>
>>>
>>>
>>> _______________________________________________
>>> Matplotlib-users mailing list
>>> Mat...@li...
>>> https://lists.sourceforge.net/lists/listinfo/matplotlib-users
>>
>> Please accept my apologies if I breached protocol but there are five
>> threads from the OP on the Python tutor mailing list, each of which has
>> had one or more replies. Two of them don't actually ask a question, the
>> above being one, and the OP hasn't had the courtesy to reply to anyone
>> with a thank you or anything else.
>>
>> --
>> Cheers.
>>
>> Mark Lawrence.
>>
>>
>>
> Mark,
>
> That may be the case, but he has only posted one other question before on
> *this* mailing list. I do not frequent the python tutors list, and I do
> not know how that list is run. I don't even "run" this list, either, so I
> shouldn't be considered a moderator. However, as a fellow poster, I would
> rather leave emails unanswered if we don't have anything constructive to
> say, IMHO.
>
> Cheers!
> Ben Root
>
>
>
>
> ------------------------------------------------------------------------------
> Virtualization& Cloud Management Using Capacity Planning
> Cloud computing makes use of virtualization - but cloud computing
> also focuses on allowing computing to be delivered as a service.
> http://www.accelacomm.com/jaw/sfnl/114/51521223/
>
>
>
> _______________________________________________
> Matplotlib-users mailing list
> Mat...@li...
> https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Correct, four minutes after posting it on the Python tutor mailing list.
Presumably the people over there were discourteous for not answering
quickly enough? Of course if you're happy to see people just slap a
Python traceback here without even asking a question and presumably
expect somebody to give a positive response then that's fine by me, but
to do it in two separate places is just plain rude as far as I'm
concerned and needs responding to. It seems as if the two of us think
differently so I think it best if we agree to disagree and leave it at
that. Is this ok with you?
--
Cheers.
Mark Lawrence.
|
|
From: Benjamin R. <ben...@ou...> - 2012-02-15 21:34:57
|
On Wed, Feb 15, 2012 at 2:52 PM, Mark Lawrence <bre...@ya...>wrote:
> On 15/02/2012 17:21, Benjamin Root wrote:
> > On Tue, Feb 14, 2012 at 8:58 AM, Mark Lawrence<bre...@ya...
> >wrote:
> >
> >> On 14/02/2012 13:52, Debashish Saha wrote:
> >>> import numpy
> >>>
> >>> from enthought.mayavi import mlab
> >>>
> >>> #def test_mesh():
> >>> #"""A very pretty picture of spherical harmonics translated from
> >>>
> >>> #the octaviz example."""
> >>> for r in range (1,5):
> >>> print r
> >>>
> >>>
> >>> pi = numpy.pi
> >>>
> >>> cos = numpy.cos
> >>>
> >>> sin = numpy.sin
> >>>
> >>> dphi, dtheta, dz = pi/250.0, pi/250.0, 0.01
> >>>
> >>> #[phi,theta] =
> >> numpy.mgrid[0:pi+dphi*1.5:dphi,0:2*pi+dtheta*1.5:dtheta]
> >>> [phi,z] = numpy.mgrid[0:2*pi+dphi*1.5:dphi,0:2+dz*1.5:dz]
> >>>
> >>> m0 = 4; m1 = 3; m2 = 2; m3 = 3; m4 = 6; m5 = 2; m6 = 6; m7 = 4;
> >>>
> >>> # r = sin(m0*phi)**m1 + cos(m2*phi)**m3 + 5*sin(m4*theta)**m5 +
> >>> cos(m6*theta)**m7
> >>>
> >>> #x = 1*sin(phi)*cos(theta)
> >>>
> >>> #y = 1*sin(phi)*sin(theta)
> >>>
> >>> #z = 1*cos(phi);
> >>> x=r*cos(phi)
> >>> y=r*sin(phi)
> >>> z=z
> >>> i=['Reds','greens','autumn','purples']
> >>> print i[r-1]
> >>> e=i[r-1]
> >>>
> >>> mlab.mesh(x, y, z,colormap='e')
> >>> #print i[r-1]
> >>>
> >>> Error:
> >>> TypeError Traceback (most recent call
> >> last)
> >>> C:\Python27\lib\site-packages\IPython\utils\py3compat.pyc in
> >>> execfile(fname, glob, loc)
> >>> 166 else:
> >>> 167 filename = fname
> >>> --> 168 exec compile(scripttext, filename, 'exec') in
> glob,
> >> loc
> >>> 169 else:
> >>> 170 def execfile(fname, *where):
> >>>
> >>> C:\Users\as\jhgf.py in<module>()
> >>> 24 print i[r-1]
> >>> 25 e=i[r-1]
> >>> ---> 26 mlab.mesh(x, y, z,'e')
> >>> 27 #print i[r-1]
> >>>
> >>> 28
> >>>
> >>> C:\Python27\lib\site-packages\mayavi\tools\helper_functions.pyc in
> >>> the_function(*args, **kwargs)
> >>> 32 def document_pipeline(pipeline):
> >>> 33 def the_function(*args, **kwargs):
> >>> ---> 34 return pipeline(*args, **kwargs)
> >>> 35
> >>> 36 if hasattr(pipeline, 'doc'):
> >>>
> >>> C:\Python27\lib\site-packages\mayavi\tools\helper_functions.pyc in
> >>> __call__(self, *args, **kwargs)
> >>> 77 scene.disable_render = True
> >>> 78 # Then call the real logic
> >>>
> >>> ---> 79 output = self.__call_internal__(*args, **kwargs)
> >>> 80 # And re-enable the rendering, if needed.
> >>>
> >>> 81 if scene is not None:
> >>>
> >>> C:\Python27\lib\site-packages\mayavi\tools\helper_functions.pyc in
> >>> __call_internal__(self, *args, **kwargs)
> >>> 830 filters.
> >>> 831 """
> >>> --> 832 self.source = self._source_function(*args, **kwargs)
> >>> 833 kwargs.pop('name', None)
> >>> 834 self.store_kwargs(kwargs)
> >>>
> >>> TypeError: grid_source() takes exactly 3 arguments (4 given)
> >>>
> >>>
> >>
> ------------------------------------------------------------------------------
> >>> Keep Your Developer Skills Current with LearnDevNow!
> >>> The most comprehensive online learning library for Microsoft developers
> >>> is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3,
> MVC3,
> >>> Metro Style Apps, more. Free future releases when you subscribe now!
> >>> http://p.sf.net/sfu/learndevnow-d2d
> >>
> >> Didn't this get answered on the python tutor mailing list within the
> >> last couple of hours? What's with it with you?
> >>
> >> --
> >> Cheers.
> >>
> >> Mark Lawrence.
> >>
> >>
> > A couple of things I would like to point out here:
> >
> > 1.) It is possible that Debashish sent similar questions to multiple
> > mailing lists in the hopes to maximize the chance of getting a response.
> > It may only "appear" that this thread was started after having the
> question
> > answered on another mailing list because of the delays that are notorious
> > on this list. I suspect he sent both emails at around the same time, but
> > the python tutors list processed it faster than the matplotlib-users
> list.
> >
> > Therefore...
> >
> > 2.) I would like to make sure that this mailing list remains a welcoming
> > forum for all users, and for all of us to understand that people have
> > different mailing habits that we may not be familiar with. Therefore,
> > gentle reminders of mailing decorum (such as reminders to bottom-post)
> > should be the response, not chastising.
> >
> > -- Debashish,
> >
> > We are more than happy to help you. Please keep your question to a
> single
> > mailing list at a time. The users on the mailing list will let you know
> if
> > you should direct your question elsewhere. In the case of your problem,
> it
> > is not matplotlib, but mayavi. Hopefully, you have been directed to the
> > mayavi mailing list.
> >
> > Cheers!
> > Ben Root
> >
> >
> >
> >
> >
> ------------------------------------------------------------------------------
> > Virtualization& Cloud Management Using Capacity Planning
> > Cloud computing makes use of virtualization - but cloud computing
> > also focuses on allowing computing to be delivered as a service.
> > http://www.accelacomm.com/jaw/sfnl/114/51521223/
> >
> >
> >
> > _______________________________________________
> > Matplotlib-users mailing list
> > Mat...@li...
> > https://lists.sourceforge.net/lists/listinfo/matplotlib-users
>
> Please accept my apologies if I breached protocol but there are five
> threads from the OP on the Python tutor mailing list, each of which has
> had one or more replies. Two of them don't actually ask a question, the
> above being one, and the OP hasn't had the courtesy to reply to anyone
> with a thank you or anything else.
>
> --
> Cheers.
>
> Mark Lawrence.
>
>
>
Mark,
That may be the case, but he has only posted one other question before on
*this* mailing list. I do not frequent the python tutors list, and I do
not know how that list is run. I don't even "run" this list, either, so I
shouldn't be considered a moderator. However, as a fellow poster, I would
rather leave emails unanswered if we don't have anything constructive to
say, IMHO.
Cheers!
Ben Root
|
|
From: Mark L. <bre...@ya...> - 2012-02-15 21:07:37
|
On 15/02/2012 17:21, Benjamin Root wrote:
> On Tue, Feb 14, 2012 at 8:58 AM, Mark Lawrence<bre...@ya...>wrote:
>
>> On 14/02/2012 13:52, Debashish Saha wrote:
>>> import numpy
>>>
>>> from enthought.mayavi import mlab
>>>
>>> #def test_mesh():
>>> #"""A very pretty picture of spherical harmonics translated from
>>>
>>> #the octaviz example."""
>>> for r in range (1,5):
>>> print r
>>>
>>>
>>> pi = numpy.pi
>>>
>>> cos = numpy.cos
>>>
>>> sin = numpy.sin
>>>
>>> dphi, dtheta, dz = pi/250.0, pi/250.0, 0.01
>>>
>>> #[phi,theta] =
>> numpy.mgrid[0:pi+dphi*1.5:dphi,0:2*pi+dtheta*1.5:dtheta]
>>> [phi,z] = numpy.mgrid[0:2*pi+dphi*1.5:dphi,0:2+dz*1.5:dz]
>>>
>>> m0 = 4; m1 = 3; m2 = 2; m3 = 3; m4 = 6; m5 = 2; m6 = 6; m7 = 4;
>>>
>>> # r = sin(m0*phi)**m1 + cos(m2*phi)**m3 + 5*sin(m4*theta)**m5 +
>>> cos(m6*theta)**m7
>>>
>>> #x = 1*sin(phi)*cos(theta)
>>>
>>> #y = 1*sin(phi)*sin(theta)
>>>
>>> #z = 1*cos(phi);
>>> x=r*cos(phi)
>>> y=r*sin(phi)
>>> z=z
>>> i=['Reds','greens','autumn','purples']
>>> print i[r-1]
>>> e=i[r-1]
>>>
>>> mlab.mesh(x, y, z,colormap='e')
>>> #print i[r-1]
>>>
>>> Error:
>>> TypeError Traceback (most recent call
>> last)
>>> C:\Python27\lib\site-packages\IPython\utils\py3compat.pyc in
>>> execfile(fname, glob, loc)
>>> 166 else:
>>> 167 filename = fname
>>> --> 168 exec compile(scripttext, filename, 'exec') in glob,
>> loc
>>> 169 else:
>>> 170 def execfile(fname, *where):
>>>
>>> C:\Users\as\jhgf.py in<module>()
>>> 24 print i[r-1]
>>> 25 e=i[r-1]
>>> ---> 26 mlab.mesh(x, y, z,'e')
>>> 27 #print i[r-1]
>>>
>>> 28
>>>
>>> C:\Python27\lib\site-packages\mayavi\tools\helper_functions.pyc in
>>> the_function(*args, **kwargs)
>>> 32 def document_pipeline(pipeline):
>>> 33 def the_function(*args, **kwargs):
>>> ---> 34 return pipeline(*args, **kwargs)
>>> 35
>>> 36 if hasattr(pipeline, 'doc'):
>>>
>>> C:\Python27\lib\site-packages\mayavi\tools\helper_functions.pyc in
>>> __call__(self, *args, **kwargs)
>>> 77 scene.disable_render = True
>>> 78 # Then call the real logic
>>>
>>> ---> 79 output = self.__call_internal__(*args, **kwargs)
>>> 80 # And re-enable the rendering, if needed.
>>>
>>> 81 if scene is not None:
>>>
>>> C:\Python27\lib\site-packages\mayavi\tools\helper_functions.pyc in
>>> __call_internal__(self, *args, **kwargs)
>>> 830 filters.
>>> 831 """
>>> --> 832 self.source = self._source_function(*args, **kwargs)
>>> 833 kwargs.pop('name', None)
>>> 834 self.store_kwargs(kwargs)
>>>
>>> TypeError: grid_source() takes exactly 3 arguments (4 given)
>>>
>>>
>> ------------------------------------------------------------------------------
>>> Keep Your Developer Skills Current with LearnDevNow!
>>> The most comprehensive online learning library for Microsoft developers
>>> is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3,
>>> Metro Style Apps, more. Free future releases when you subscribe now!
>>> http://p.sf.net/sfu/learndevnow-d2d
>>
>> Didn't this get answered on the python tutor mailing list within the
>> last couple of hours? What's with it with you?
>>
>> --
>> Cheers.
>>
>> Mark Lawrence.
>>
>>
> A couple of things I would like to point out here:
>
> 1.) It is possible that Debashish sent similar questions to multiple
> mailing lists in the hopes to maximize the chance of getting a response.
> It may only "appear" that this thread was started after having the question
> answered on another mailing list because of the delays that are notorious
> on this list. I suspect he sent both emails at around the same time, but
> the python tutors list processed it faster than the matplotlib-users list.
>
> Therefore...
>
> 2.) I would like to make sure that this mailing list remains a welcoming
> forum for all users, and for all of us to understand that people have
> different mailing habits that we may not be familiar with. Therefore,
> gentle reminders of mailing decorum (such as reminders to bottom-post)
> should be the response, not chastising.
>
> -- Debashish,
>
> We are more than happy to help you. Please keep your question to a single
> mailing list at a time. The users on the mailing list will let you know if
> you should direct your question elsewhere. In the case of your problem, it
> is not matplotlib, but mayavi. Hopefully, you have been directed to the
> mayavi mailing list.
>
> Cheers!
> Ben Root
>
>
>
>
> ------------------------------------------------------------------------------
> Virtualization& Cloud Management Using Capacity Planning
> Cloud computing makes use of virtualization - but cloud computing
> also focuses on allowing computing to be delivered as a service.
> http://www.accelacomm.com/jaw/sfnl/114/51521223/
>
>
>
> _______________________________________________
> Matplotlib-users mailing list
> Mat...@li...
> https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Please accept my apologies if I breached protocol but there are five
threads from the OP on the Python tutor mailing list, each of which has
had one or more replies. Two of them don't actually ask a question, the
above being one, and the OP hasn't had the courtesy to reply to anyone
with a thank you or anything else.
--
Cheers.
Mark Lawrence.
|
|
From: <Pyt...@ro...> - 2012-02-15 21:05:33
|
Hello,
I don't know if I can ask questions concerning matplotlib problems
in this email list ... just let me know that this is not the right
place, if.
I have an image, which I can read and put into a figure. The image
has axis and I can even save the image. I have two issues:
1. Since it is an 512 x 512 pixel image, the x and y axis labels
go from 0 to 500. However, I don't want these labels, I want to
change them to, e.g., 0 .. 3400 and 0 .. 3400. How can I do this?
2. I tried to attach a color bar to the right of the image but without
success. Have you a hint?
The code can be found below, it is a rather simple one.
Thanks in advance for any help.
Pythphys.
*****************************************************************
import scipy
import matplotlib.pyplot as plt
import matplotlib.image as mpimg
import numpy as np
file_path = "path_to_file"
# The binary file is read
data = scipy.fromfile(file=file_path,dtype=scipy.int16)
data = data.byteswap()
# The file has 512 x 512 pixel
data.shape = 512, 512
# The following code works fine. However, I still need:
#
# - Color bar (plt.color() does not work)
# - The x and y labels are 0 ... 500 and 0 ... 500 <= I want to change
these labels. How.
fig = plt.figure()
frame = plt.subplot(111)
frame.imshow(data)
frame.axis()
plt.xlabel('X (nm)')
plt.ylabel('Y (nm)')
plt.savefig("image")
|
|
From: Eric F. <ef...@ha...> - 2012-02-15 20:34:27
|
On 02/15/2012 10:15 AM, Alexa Villaume wrote: > Hi Everybody, > > > I'm trying to label the contours of my contour plot following this > example - > > http://matplotlib.sourceforge.net/examples/pylab_examples/contour_label_demo.html > > > My actual code looks like this - > > > import matplotlib > > matplotlib.use('PDF') > > frompylab import* > > import numpy as np > > > # Define the surface of the plot > > metals=np.arange(-3.0, 1.1, 0.1) > > U=np.arange(-6.0, 0.25, 0.25) > > > # Create the arrays that the data will be stored in > > o3=np.zeros([25,41]) > > o2=np.zeros([25,41]) > > c3=np.zeros([25,41]) > > mg2=np.zeros([25,41]) > > c3=np.zeros([25,41]) > > si2=np.zeros([25,41]) > > s3=np.zeros([25,41]) > > > CS=plt.contourf(metals, U, o3, levels=[o3col-nsig*o3sig, > o3col+nsig*o3sig], alpha=0.50, colors='#f88534') > > CS=plt.contourf(metals, U, o2, levels=[o2col-nsig*o2sig, > o2col+nsig*o2sig], alpha=0.50, colors='#f2f34f') > > CS=plt.contourf(metals, U, c3, levels=[c3col-nsig*c3sig, > c3col+nsig*c3sig], alpha=0.50, colors='#93d3f3') > > CS=plt.contourf(metals, U, mg2, levels=[mg2col-nsig*mg2sig, > mg2col+nsig*mg2sig], alpha=0.50, colors='#ff536d') > > CS=plt.contourf(metals, U, s3, levels=[s3col-nsig*s3sig, > s3col+nsig*s3sig], alpha=0.50, colors='#83c460') > > CS=plt.contourf(metals, U, si2, levels=[si2col-nsig*si2sig, > si2col+nsig*si2sig], alpha=0.50, colors='black') > > > > # Trying to label the contours > > > fmt = {} > > strs = [ 'O III', 'O II', 'C III', 'Mg II', 'S III', 'Si II'] > > for l,s in zip(levels, strs): > > fmt[l] = s > > plt.clabel(CS,levels[::2],inline=True,fmt=fmt,fontize=14) > > > But I get an error that says that "levels" is not defined. What should I do? Define levels! In your call to clabel, you are referencing a global "levels" which you did not define; what you did define is the levels attribute of each CS object. So probably what you want is something like: plt.clabel(CS, CS.levels[::2],inline=True,fmt=fmt,fontize=14) but you need one such call for each CS you create, if you want all of them labeled. Eric > > > Thanks! > > Alexa > > > > ------------------------------------------------------------------------------ > Virtualization& Cloud Management Using Capacity Planning > Cloud computing makes use of virtualization - but cloud computing > also focuses on allowing computing to be delivered as a service. > http://www.accelacomm.com/jaw/sfnl/114/51521223/ > > > > _______________________________________________ > Matplotlib-users mailing list > Mat...@li... > https://lists.sourceforge.net/lists/listinfo/matplotlib-users |
|
From: Alexa V. <ale...@gm...> - 2012-02-15 20:15:40
|
Hi Everybody, I'm trying to label the contours of my contour plot following this example - http://matplotlib.sourceforge.net/examples/pylab_examples/contour_label_demo.html My actual code looks like this - import matplotlib matplotlib.use('PDF') from pylab import * import numpy as np # Define the surface of the plot metals=np.arange(-3.0, 1.1, 0.1) U=np.arange(-6.0, 0.25, 0.25) # Create the arrays that the data will be stored in o3=np.zeros([25,41]) o2=np.zeros([25,41]) c3=np.zeros([25,41]) mg2=np.zeros([25,41]) c3=np.zeros([25,41]) si2=np.zeros([25,41]) s3=np.zeros([25,41]) CS=plt.contourf(metals, U, o3, levels=[o3col-nsig*o3sig, o3col+nsig*o3sig], alpha=0.50, colors='#f88534') CS=plt.contourf(metals, U, o2, levels=[o2col-nsig*o2sig, o2col+nsig*o2sig], alpha=0.50, colors='#f2f34f') CS=plt.contourf(metals, U, c3, levels=[c3col-nsig*c3sig, c3col+nsig*c3sig], alpha=0.50, colors='#93d3f3') CS=plt.contourf(metals, U, mg2, levels=[mg2col-nsig*mg2sig, mg2col+nsig*mg2sig], alpha=0.50, colors='#ff536d') CS=plt.contourf(metals, U, s3, levels=[s3col-nsig*s3sig, s3col+nsig*s3sig], alpha=0.50, colors='#83c460') CS=plt.contourf(metals, U, si2, levels=[si2col-nsig*si2sig, si2col+nsig*si2sig], alpha=0.50, colors='black') # Trying to label the contours fmt = {} strs = [ 'O III', 'O II', 'C III', 'Mg II', 'S III', 'Si II'] for l,s in zip(levels, strs): fmt[l] = s plt.clabel(CS,levels[::2],inline=True,fmt=fmt,fontize=14) But I get an error that says that "levels" is not defined. What should I do? Thanks! Alexa |
|
From: Benjamin R. <ben...@ou...> - 2012-02-15 18:10:16
|
On Mon, Feb 13, 2012 at 10:38 AM, Bruce Ford <br...@cl...>wrote: > I have a application that plots figures on demand. I'm running into an > issue when plotting more than one parameter on a figure. Each parameter is > run through libraries that I've written that make decisions and eventually > plots the figure. However, for some figures (when two parameters are > plotted), the colorbar plots atop the main figure (see the attached). > > I think the reason is that each time through the libraries, a separate > basemap is created (although with the same values) but for the first > parameter, a colorbar is plotted and for the second, there will never be a > colorbar. So the final figure plots the colorbar on top. > > is there a way to test the gca() to see if a basemap has been created, or > to detect whether the gcs() has a colorbar and leave the map/figure alone. > (I'm not exactly sure if it's the re-creation of the basemap or the fact > that the second parameter will not contain a colorbar that is the issue.) > > Anyone crossed this bridge? > > Bruce > > What is creating a colorbar? My usual coding style is such that any functions I make to do complicated plots do not do any more than is necessary. All axis limits, title setting and colorbar making are left for the caller of the plotting function. >From your description, it is hard to tell if the bug is in your code, basemap, or some other third-party library. Could you please clarify? Cheers! Ben Root P.S. - Furthermore, I *really* like using the axes_grid1 toolkit because I can specify if I want space pre-allocated for colorbars. This way, when I create my colorbar, I can pass the pre-allocated axes object that was made just for the colorbar. |
|
From: C M <cmp...@gm...> - 2012-02-15 17:52:29
|
On Mon, Feb 13, 2012 at 12:48 PM, C M <cmp...@gm...> wrote: > I noticed what is causing one of these issues: > > 1) When I point-pick on the plot, the plot area still "jumps" (expands >> vertically a small amount). It used to do this each time I point-picked, >> but after upgrading MPL it now just does it the *first* time only. But is >> it possible it can be fixed so it doesn't jump at all? >> > > I see why this happens. When I point pick, a popup window pops up and > covers the plot. I think this triggers a redraw. What causes the jump in > my case is that the plot's title is set, in y coordinate, to 1.04. That > is, the line is this: > > self.subplot.title.set_y(1.04) > > This is interacting with the line in make_axes_area_auto_adjustable: > > if self.title.get_visible(): > artists.append(self.title) > I have a workaround for this, which is just using a tip from Jae Joon to me* from 3 years ago (!). Instead of setting the title offset as shown above, I set it in this fashion: self.subplot.titleOffsetTrans._t = (0., 20.0/72.) self.subplot.titleOffsetTrans.invalidate() And then this somehow doesn't interact with the make_axes_area_auto_ adjustable function. One problem down. (I hope it is OK that I am answering my own questions, but didn't want to leave them out there and have others bother to work on it). -Che * http://www.mail-archive.com/mat...@li.../msg10259.html |
|
From: Benjamin R. <ben...@ou...> - 2012-02-15 17:31:04
|
On Sat, Feb 11, 2012 at 8:22 AM, reckoner <rec...@gm...> wrote: > Hi, > > I am creating a big and complicated plot by doing things like: > > ax.add_patch( ... ) > > and when I'm done I want to save the resulting frame. However, I've > looked through > the examples and it seems like you have to use plot() or pcolor() to > create frames that you > can feed into ArtistAnimation. > > So,then, how can I use capture the resulting axes into a frame? > > Thanks! > > reckoner, Sorry for the delay in responding. No, you don't need to use plot() or pcolor() to use ArtistAnimation. Functions like plot() take input data, create Artists and/or Collection objects, attach them to an axes and returns those objects that have been created. So, when you do a "ax.add_patch()", it is actually exactly what some of the plotting functions do internally. All you need to do to make things work is to have a list of Artists/Collections (such as your patches) for each frame and build up a list of these lists. That list can then be passed to the constructor for ArtistAnimation. I hope that helps! Ben Root |
|
From: Benjamin R. <ben...@ou...> - 2012-02-15 17:21:39
|
On Tue, Feb 14, 2012 at 8:58 AM, Mark Lawrence <bre...@ya...>wrote:
> On 14/02/2012 13:52, Debashish Saha wrote:
> > import numpy
> >
> > from enthought.mayavi import mlab
> >
> > #def test_mesh():
> > #"""A very pretty picture of spherical harmonics translated from
> >
> > #the octaviz example."""
> > for r in range (1,5):
> > print r
> >
> >
> > pi = numpy.pi
> >
> > cos = numpy.cos
> >
> > sin = numpy.sin
> >
> > dphi, dtheta, dz = pi/250.0, pi/250.0, 0.01
> >
> > #[phi,theta] =
> numpy.mgrid[0:pi+dphi*1.5:dphi,0:2*pi+dtheta*1.5:dtheta]
> > [phi,z] = numpy.mgrid[0:2*pi+dphi*1.5:dphi,0:2+dz*1.5:dz]
> >
> > m0 = 4; m1 = 3; m2 = 2; m3 = 3; m4 = 6; m5 = 2; m6 = 6; m7 = 4;
> >
> > # r = sin(m0*phi)**m1 + cos(m2*phi)**m3 + 5*sin(m4*theta)**m5 +
> > cos(m6*theta)**m7
> >
> > #x = 1*sin(phi)*cos(theta)
> >
> > #y = 1*sin(phi)*sin(theta)
> >
> > #z = 1*cos(phi);
> > x=r*cos(phi)
> > y=r*sin(phi)
> > z=z
> > i=['Reds','greens','autumn','purples']
> > print i[r-1]
> > e=i[r-1]
> >
> > mlab.mesh(x, y, z,colormap='e')
> > #print i[r-1]
> >
> > Error:
> > TypeError Traceback (most recent call
> last)
> > C:\Python27\lib\site-packages\IPython\utils\py3compat.pyc in
> > execfile(fname, glob, loc)
> > 166 else:
> > 167 filename = fname
> > --> 168 exec compile(scripttext, filename, 'exec') in glob,
> loc
> > 169 else:
> > 170 def execfile(fname, *where):
> >
> > C:\Users\as\jhgf.py in<module>()
> > 24 print i[r-1]
> > 25 e=i[r-1]
> > ---> 26 mlab.mesh(x, y, z,'e')
> > 27 #print i[r-1]
> >
> > 28
> >
> > C:\Python27\lib\site-packages\mayavi\tools\helper_functions.pyc in
> > the_function(*args, **kwargs)
> > 32 def document_pipeline(pipeline):
> > 33 def the_function(*args, **kwargs):
> > ---> 34 return pipeline(*args, **kwargs)
> > 35
> > 36 if hasattr(pipeline, 'doc'):
> >
> > C:\Python27\lib\site-packages\mayavi\tools\helper_functions.pyc in
> > __call__(self, *args, **kwargs)
> > 77 scene.disable_render = True
> > 78 # Then call the real logic
> >
> > ---> 79 output = self.__call_internal__(*args, **kwargs)
> > 80 # And re-enable the rendering, if needed.
> >
> > 81 if scene is not None:
> >
> > C:\Python27\lib\site-packages\mayavi\tools\helper_functions.pyc in
> > __call_internal__(self, *args, **kwargs)
> > 830 filters.
> > 831 """
> > --> 832 self.source = self._source_function(*args, **kwargs)
> > 833 kwargs.pop('name', None)
> > 834 self.store_kwargs(kwargs)
> >
> > TypeError: grid_source() takes exactly 3 arguments (4 given)
> >
> >
> ------------------------------------------------------------------------------
> > Keep Your Developer Skills Current with LearnDevNow!
> > The most comprehensive online learning library for Microsoft developers
> > is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3,
> > Metro Style Apps, more. Free future releases when you subscribe now!
> > http://p.sf.net/sfu/learndevnow-d2d
>
> Didn't this get answered on the python tutor mailing list within the
> last couple of hours? What's with it with you?
>
> --
> Cheers.
>
> Mark Lawrence.
>
>
A couple of things I would like to point out here:
1.) It is possible that Debashish sent similar questions to multiple
mailing lists in the hopes to maximize the chance of getting a response.
It may only "appear" that this thread was started after having the question
answered on another mailing list because of the delays that are notorious
on this list. I suspect he sent both emails at around the same time, but
the python tutors list processed it faster than the matplotlib-users list.
Therefore...
2.) I would like to make sure that this mailing list remains a welcoming
forum for all users, and for all of us to understand that people have
different mailing habits that we may not be familiar with. Therefore,
gentle reminders of mailing decorum (such as reminders to bottom-post)
should be the response, not chastising.
-- Debashish,
We are more than happy to help you. Please keep your question to a single
mailing list at a time. The users on the mailing list will let you know if
you should direct your question elsewhere. In the case of your problem, it
is not matplotlib, but mayavi. Hopefully, you have been directed to the
mayavi mailing list.
Cheers!
Ben Root
|
|
From: Benjamin R. <ben...@ou...> - 2012-02-15 17:09:25
|
On Tue, Feb 14, 2012 at 9:23 PM, 7stud <7s...@ex...> wrote:
> Benjamin Root <ben.root@...> writes:
> >
> > The second one shouldn't take much time at all to finish.
> > How long did it take? How big was the png file?
> > Ben Root
>
>
> def my_func():
> import matplotlib.pyplot as plot
>
> xs = [2, 3, 5, 7, 11]
> ys = [4, 9, 5, 9, 1]
> plot.plot(xs, ys)
> plot.savefig("squaremod10.png")
>
> import timeit
> t = timeit.Timer('my_func()', 'from __main__ import my_func')
> print(t.timeit(100) / 100)
>
> $ python mpl1.py
> 0.14541503191
>
>
> $ ls -al squaremod10.png
> -rw-r--r-- 1 7stud staff 27904 Feb 14 20:12 squaremod10.png
>
>
>
7stud,
>From the above example, it looks like the plotting no longer "takes
forever". I suspect that you were merely experiencing the first-time
font-cache build process, which can be slow. Shall we consider this
resolved?
(of course, documentation needs to be updated for the Mac instructions)
Ben Root
|
|
From: Benjamin R. <ben...@ou...> - 2012-02-15 17:05:42
|
On Tue, Feb 14, 2012 at 4:43 PM, Martin Mokrejs <mmo...@fo... > wrote: > Ah, this seems to be the issue that my figsize was growing all the time so > it > went over the maximum limits. > > I thought this is valid: > DefaultSize = F.get_size_inches() > print str(DefaultSize) > blah > F.set_size_inches(DefaultSize) > > See http://matplotlib.sourceforge.net/api/figure_api.html > > <quote> > set_size_inches(*args, **kwargs) > > set_size_inches(w,h, forward=False) > > Set the figure size in inches > > Usage: > > fig.set_size_inches(w,h) # OR > fig.set_size_inches((w,h) ) > > optional kwarg forward=True will cause the canvas size to be > automatically updated; eg you can resize the figure window from the shell > > ACCEPTS: a w,h tuple with w,h in inches > </quote> > > Nope, it does not work. The print call gives me: [ 8. 6.]. So, this is > not a tuple? > Or python-2.7 issue how is it printed ... I fear? ;-) > Anyway, doing > > F.set_size_inches(11.2, 15) > > works for me. > > Martin > > I am a little bit confused by your code example. You get the figure size and print it, and *then* you set it with the exact same values, and you are surprised that it came out as [8. 6.]? Note that the figure size is stored internally as a numpy array, so when you do "print str(DefaultSize)", you will get the string representation of the numpy array. You can still pass in a tuple, list, or two separate elements. Try this code: import matplotlib.pyplot as plt fig = plt.figure() print fig.get_size_inches() fig.set_size_inches(11.2, 15.0) print fig.get_size_inches() fig.set_size_inches((4.0, 7.2)) print fig.get_size_inches() fig.set_size_inches([9.3, 11.1]) print fig.get_size_inches() You should see: [ 8. 6.] [ 11.2 15. ] [ 4. 7.2] [ 9.2 11.1] Everything works as expected. There is nothing special about python 2.7 in this regard. Let us know if you are still having problems updating your figures and include a stand-alone example showing how the figure size is not being updated. Cheers! Ben Root |
|
From: Benjamin R. <ben...@ou...> - 2012-02-15 16:45:05
|
On Tue, Feb 14, 2012 at 4:54 AM, Oren Gampel <or...@fu...> wrote: > This is relating wxmpl (wxPython+matplotlib). version 2.0dev of wxmpl, > matplotlib ver 1.1.0, and wx version is 2.8.12.1. > > Since wxmpl is a very "thin" layer above mpl, I believe this is an issue > with mpl. > > I'm using wxmpl and trying to get mouse points and selection. This > fails when there is more than one axes in the same place, which I do > since I'm using twinx() in my original code. > > I believe the issue is the overlapping of both axes on the same area. > The following code shows that overlapping two axes makes > the mouse events in the overlapped area fail. For example, the cursor > doesn't change in them and the crosshairs disappear (if enabled). > Removing the ax2 code, or just ensuring ax1 and ax2 do not overlap > allows all the events to reach the handler. > > Any idea on how to receive mouse events from the overlapped area? > > Thanks, > Oren > Oren, You identified the source of the problem correctly and this is a known issue. It used to be possible to do this, but due to changes needed to fix other bugs, thiis "feature" went away (I think at v1.0.0). We agree that this isn't desirable, but we have not found a suitable solution. There have been some discussion about this and proposed solutions. Here is one with possible hacks that might be useful. http://old.nabble.com/onpick-on-a-2-y-plot-%28-via-twinx%28%29-%29-seems-to-only-allow-picking-of-second-axes%27s-artists-td25049128.html I hope this helps! Ben Root |
|
From: Benjamin R. <ben...@ou...> - 2012-02-15 15:48:27
|
On Tue, Feb 14, 2012 at 7:00 PM, 7stud <7s...@ex...> wrote: > Russell E. Owen <rowen@...> writes: > > > The file you found is the only option for MacOS X (presently). It > > requires python.org's 32-bit Python 2.7, which is for MacOS X 10.3.9 > > and > > later. > > > > I just built an installer for python.org's 64-bit Python 2.7, which > > requires MacOS X 10.6 and after a bit of testing I'll serve that. > > > > Thanks for the response! Okay, I see your other thread, so I guess > I'll be one of your testers. > > Since my op, I also tried to download: > > matplotlib-1.1.0.tar.gz > > and I got a Decompression Failed message in the Downloads window. > I checked my Safari settings, and > Safari is set to automatically decompress 'safe' files. > guess it couldn't in the case of matplotlib. > > Next, I tried decompressing and untaring myself: > > $ tar xvfz matplotlib-1.1.0.tar.gz > > ...but after a lot of output it finished with: > > x matplotlib-1.1.0/lib/matplotlib/mpl-data/fonts/ttf/ > STIXGeneralBol.ttf: Truncated tar archive > tar: Error exit delayed from previous errors. > > Then I checked the md5, and I got: > > $ md5 ~/Downloads/matplotlib-1.1.0.tar.gz > MD5 (/Users/7stud/Downloads/matplotlib-1.1.0.tar.gz) = > 57a627f30b3b27821f808659889514c2 > > ..which matches the md5 listed at sourceforge here: > > http://sourceforge.net/projects/matplotlib/files/matplotlib/ > matplotlib-1.1.0/ > > So it seems to me like the tar.gz file at sourceforge is corrupted. > > Strange, I just double-checked the file and it works fine for me, and I have the same check-sums. Maybe something is wrong with tar? What version do you have? For me: $ tar --version tar (GNU tar) 1.26 Copyright (C) 2011 Free Software Foundation, Inc. License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html >. This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law. Written by John Gilmore and Jay Fenlason. Ben Root |
|
From: Justin M. <jn...@gm...> - 2012-02-15 14:26:11
|
I have some figures with multiple axes stacked on top of each other, generated with Figure.add_subplot(). In each figure, some sets of these axes are logically grouped together, and I need some visual clue of which axes are more closely related. The right way is probably to use GridSpec [ http://matplotlib.sourceforge.net/users/gridspec.html] and add some additional wspace. Instead, I attempted to just add some lines between the logical groups of axes (code below), generated from the bounding boxes of the axes, and drawing the lines halfway between. There are probably many things wrong with this code. :) If I use 'figure pixels' (red lines), the displayed figure looks great, but the lines move to different places in the saved PNG file. I'm guessing this is the result of rcParams.update({'savefig.dpi': 300.0}). If I use 'figure points' (green lines), the lines show up in the same place both in the display and saved file. Is there a different function I should be using to get the bounding box edges, or to convert between the figure pixels and points? Thanks, Justin --- f = figure() map(lambda i : f.add_subplot(10, 1, i), range(1,10)) # make subplots do_lines_after = [1,3,5,7] # draw lines after these axes (indexes) def group_axes(f, do_lines_after, color='red', coords='figure pixels'): boxes = [ax.bbox.get_points() for ax in f.axes] # get bounding boxes for ax_index in do_lines_after: if ax_index < (len(boxes) - 1): (x0, y1), (x1, _) = boxes[ax_index] # y1 -> bottom of upper axes y0 = boxes[ax_index+1][1][1] # y0 -> top of lower axes y = y0 + (y1 - y0)/2.0 # halfway in between the two axes dict(arrowstyle='-', facecolor=color, edgecolor=color) ax.annotate('', xy=(x0*0.3, y), xytext=(x1*1.01, y), arrowprops=arrowprops, xycoords=coords, textcoords=coords) return group_axes(f, do_lines_after, 'red', 'figure pixels') group_axes(f, do_lines_after, 'green', 'figure points') f.canvas.draw() # pixels/red look good, green notsomuch f.savefig('test.png') # green in the same place; red is somewhere else now (based on dpi?) |
|
From: 7stud <7s...@ex...> - 2012-02-15 03:23:28
|
Benjamin Root <ben.root@...> writes:
>
> The second one shouldn't take much time at all to finish.
> How long did it take? How big was the png file?
> Ben Root
def my_func():
import matplotlib.pyplot as plot
xs = [2, 3, 5, 7, 11]
ys = [4, 9, 5, 9, 1]
plot.plot(xs, ys)
plot.savefig("squaremod10.png")
import timeit
t = timeit.Timer('my_func()', 'from __main__ import my_func')
print(t.timeit(100) / 100)
$ python mpl1.py
0.14541503191
$ ls -al squaremod10.png
-rw-r--r-- 1 7stud staff 27904 Feb 14 20:12 squaremod10.png
|
|
From: Jeff W. <js...@fa...> - 2012-02-15 03:08:58
|
On 2/14/12 7:10 PM, Benjamin Root wrote: > > > On Tuesday, February 14, 2012, 7stud <7s...@ex... > <mailto:7s...@ex...>> wrote: > > Russell E. Owen <rowen@...> writes: > > > >> > >> I just created a binary installer for python.org > <http://python.org>'s 64-bit Python 2.7 > >> (MacOS X 10.6 and later). I'd like a few folks to test it to make sure > >> it works for more than just me, before serving it at the usual > >> location. > >> > > > > I can report that your installer has enabled me to successfully > > execute the following two progams: > > > > 1) > > import matplotlib as mpl > > print(mpl.__version__) > > print(mpl.__file__) > > print(mpl.get_configdir()) > > > > > > 2) > > import matplotlib.pyplot as plot > > xs = [2, 3, 5, 7, 11] > > ys = [4, 9, 5, 9, 1] > > plot.plot(xs, ys) > > plot.savefig("squaremod10.png") > > > > > > The second one took forever to finish executing, so I thought something > > was wrong. But it finally finished and produces a nice .png! On > > subsequent runs, the program took about 1 sec to execute. > > > > Thanks! > > > > > > The second one shouldn't take much time at all to finish. How long > did it take? How big was the png file? > > Ben Root Maybe it was building the font cache. -Jeff |
|
From: Benjamin R. <ben...@ou...> - 2012-02-15 02:10:48
|
On Tuesday, February 14, 2012, 7stud <7s...@ex...> wrote: > Russell E. Owen <rowen@...> writes: > >> >> I just created a binary installer for python.org's 64-bit Python 2.7 >> (MacOS X 10.6 and later). I'd like a few folks to test it to make sure >> it works for more than just me, before serving it at the usual >> location. >> > > I can report that your installer has enabled me to successfully > execute the following two progams: > > 1) > import matplotlib as mpl > print(mpl.__version__) > print(mpl.__file__) > print(mpl.get_configdir()) > > > 2) > import matplotlib.pyplot as plot > xs = [2, 3, 5, 7, 11] > ys = [4, 9, 5, 9, 1] > plot.plot(xs, ys) > plot.savefig("squaremod10.png") > > > The second one took forever to finish executing, so I thought something > was wrong. But it finally finished and produces a nice .png! On > subsequent runs, the program took about 1 sec to execute. > > Thanks! > > The second one shouldn't take much time at all to finish. How long did it take? How big was the png file? Ben Root |
|
From: 7stud <7s...@ex...> - 2012-02-15 01:49:45
|
Russell E. Owen <rowen@...> writes: > > I just created a binary installer for python.org's 64-bit Python 2.7 > (MacOS X 10.6 and later). I'd like a few folks to test it to make sure > it works for more than just me, before serving it at the usual > location. > I can report that your installer has enabled me to successfully execute the following two progams: 1) import matplotlib as mpl print(mpl.__version__) print(mpl.__file__) print(mpl.get_configdir()) 2) import matplotlib.pyplot as plot xs = [2, 3, 5, 7, 11] ys = [4, 9, 5, 9, 1] plot.plot(xs, ys) plot.savefig("squaremod10.png") The second one took forever to finish executing, so I thought something was wrong. But it finally finished and produces a nice .png! On subsequent runs, the program took about 1 sec to execute. Thanks! |
|
From: 7stud <7s...@ex...> - 2012-02-15 01:10:16
|
Russell E. Owen <rowen@...> writes: > The file you found is the only option for MacOS X (presently). It > requires python.org's 32-bit Python 2.7, which is for MacOS X 10.3.9 > and > later. > > I just built an installer for python.org's 64-bit Python 2.7, which > requires MacOS X 10.6 and after a bit of testing I'll serve that. > Thanks for the response! Okay, I see your other thread, so I guess I'll be one of your testers. Since my op, I also tried to download: matplotlib-1.1.0.tar.gz and I got a Decompression Failed message in the Downloads window. I checked my Safari settings, and Safari is set to automatically decompress 'safe' files. guess it couldn't in the case of matplotlib. Next, I tried decompressing and untaring myself: $ tar xvfz matplotlib-1.1.0.tar.gz ...but after a lot of output it finished with: x matplotlib-1.1.0/lib/matplotlib/mpl-data/fonts/ttf/ STIXGeneralBol.ttf: Truncated tar archive tar: Error exit delayed from previous errors. Then I checked the md5, and I got: $ md5 ~/Downloads/matplotlib-1.1.0.tar.gz MD5 (/Users/7stud/Downloads/matplotlib-1.1.0.tar.gz) = 57a627f30b3b27821f808659889514c2 ..which matches the md5 listed at sourceforge here: http://sourceforge.net/projects/matplotlib/files/matplotlib/ matplotlib-1.1.0/ So it seems to me like the tar.gz file at sourceforge is corrupted. |