|
From: Wayne W. <sie...@sb...> - 2010-02-09 16:06:54
|
I'm sure not making much progress on understanding show(). When used in XP in IDLE or by file execution (click on file name), it seems to tie up the executing program. In IDLE, the shell window stops and one must exit the window. I'd appreciate it if someone could take any examples from <http://matplotlib.sourceforge.net/index.html> and try to execute them as in the first paragraph to see if they terminate successfully.Let me know what OS used, hopefully XP, and if you used IDLE or file execution. I suspect you will find every example there ends with show(). Try putting a print statement after show() you've done it with the show() the last line. -- "Crime is way down. War is declining. And that's far from the good news." -- Steven Pinker (and other sources) Why is this true, but yet the media says otherwise? The media knows very well how to manipulate us (see limbic, emotion, $$). -- WTW |
|
From: John H. <jd...@gm...> - 2010-02-09 16:19:44
|
On Tue, Feb 9, 2010 at 10:06 AM, Wayne Watson <sie...@sb...> wrote: > I'm sure not making much progress on understanding show(). When used in > XP in IDLE or by file execution (click on file name), it seems to tie up > the executing program. In IDLE, the shell window stops and one must > exit the window. > > I'd appreciate it if someone could take any examples from > <http://matplotlib.sourceforge.net/index.html> and try to execute them > as in the first paragraph to see if they terminate successfully.Let me > know what OS used, hopefully XP, and if you used IDLE or file execution. > I suspect you will find every example there ends with show(). Try > putting a print statement after show() you've done it with the show() > the last line. "show" is meant to start the GUI mainloop, which is usually blocking, and raise all windows, so the behavior you are reporting is the intended behavior. When working interactively, as in Idle, you shouldn't need to use show if you turn interactive mode on. http://matplotlib.sourceforge.net/users/shell.html We recommend using ipython in pylab model when working interactively because it is designed to make the correct interactive settings and override "show" to be non-blocking. You can obtain the right results in matplotlib using Idle if you are careful, but for "just works out of the box" ipython in pylab mode will be easier. JDH |
|
From: Wayne W. <sie...@sb...> - 2010-02-09 18:22:16
|
Thanks. Completely missed it. (P.S. Reply All +corrected mail filter.) On 2/9/2010 8:18 AM, John Hunter wrote: > On Tue, Feb 9, 2010 at 10:06 AM, Wayne Watson > <sie...@sb...> wrote: > >> I'm sure not making much progress on understanding show(). When used in >> XP in IDLE or by file execution (click on file name), it seems to tie up >> the executing program. In IDLE, the shell window stops and one must >> ... > http://matplotlib.sourceforge.net/users/shell.html > > We recommend using ipython in pylab model when working interactively > because it is designed to make the correct interactive settings and > override "show" to be non-blocking. You can obtain the right results > in matplotlib using Idle if you are careful, but for "just works out > of the box" ipython in pylab mode will be easier. > > JDH > > -- "Crime is way down. War is declining. And that's far from the good news." -- Steven Pinker (and other sources) Why is this true, but yet the media says otherwise? The media knows very well how to manipulate us (see limbic, emotion, $$). -- WTW |
|
From: Wayne W. <sie...@sb...> - 2010-02-09 16:19:41
|
Version of Python would help too. I'm using 2.5. On 2/9/2010 8:06 AM, Wayne Watson wrote: > I'm sure not making much progress on understanding show(). When used in > XP in IDLE or by file execution (click on file name), it seems to tie up > the executing program. In IDLE, the shell window stops and one must > exit the window. > > I'd appreciate it if someone could take any examples from > <http://matplotlib.sourceforge.net/index.html> and try to execute them > as in the first paragraph to see if they terminate successfully.Let me > know what OS used, hopefully XP, and if you used IDLE or file execution. > I suspect you will find every example there ends with show(). Try > putting a print statement after show() you've done it with the show() > the last line. > -- "Crime is way down. War is declining. And that's far from the good news." -- Steven Pinker (and other sources) Why is this true, but yet the media says otherwise? The media knows very well how to manipulate us (see limbic, emotion, $$). -- WTW |
|
From: Ben A. <BAx...@co...> - 2010-02-09 16:20:32
|
Maybe instead of plot.show() you should do something like:
plot.draw()
raw_input('Press ENTER to exit')
Personally, I also use IDLE on Windows XP to edit my matplotlib files. However, I never execute in IDLE. I simply double click the file in windows explorer.
-Ben
-----Original Message-----
From: Wayne Watson [mailto:sie...@sb...]
Sent: Tuesday, February 09, 2010 11:07 AM
To: mat...@li...
Subject: [Matplotlib-users] Verifying the Use of show()? Win XP
I'm sure not making much progress on understanding show(). When used in XP in IDLE or by file execution (click on file name), it seems to tie up the executing program. In IDLE, the shell window stops and one must exit the window.
I'd appreciate it if someone could take any examples from <http://matplotlib.sourceforge.net/index.html> and try to execute them as in the first paragraph to see if they terminate successfully.Let me know what OS used, hopefully XP, and if you used IDLE or file execution.
I suspect you will find every example there ends with show(). Try putting a print statement after show() you've done it with the show() the last line.
--
"Crime is way down. War is declining. And that's far from the good news." -- Steven Pinker (and other sources) Why is this true, but yet the media says otherwise? The media knows very well how to manipulate us (see limbic, emotion, $$). -- WTW
------------------------------------------------------------------------------
The Planet: dedicated and managed hosting, cloud storage, colocation Stay online with enterprise data centers and the best network in the business Choose flexible plans and management services without long-term contracts Personal 24x7 support from experience hosting pros just a phone call away.
http://p.sf.net/sfu/theplanet-com
_______________________________________________
Matplotlib-users mailing list
Mat...@li...
https://lists.sourceforge.net/lists/listinfo/matplotlib-users
|
|
From: Wayne W. <sie...@sb...> - 2010-02-09 17:37:36
|
Thanks. I'll consider it. See my post to John Hunter moments ago as to
why I "must" use IDLE. Basically, the users are not at all familiar with
Python, and historically the us has been that way for 3-4 years.
On 2/9/2010 8:20 AM, Ben Axelrod wrote:
> Maybe instead of plot.show() you should do something like:
>
> plot.draw()
> raw_input('Press ENTER to exit')
>
> Personally, I also use IDLE on Windows XP to edit my matplotlib files. However, I never execute in IDLE. I simply double click the file in windows explorer.
>
> -Ben
>
> -----Original Message-----
> From: Wayne Watson [mailto:sie...@sb...]
> Sent: Tuesday, February 09, 2010 11:07 AM
> To: mat...@li...
> Subject: [Matplotlib-users] Verifying the Use of show()? Win XP
>
> I'm sure not making much progress on understanding show(). When used in XP in IDLE or by file execution (click on file name), it seems to tie up the executing program. In IDLE, the shell window stops and one must exit the window.
>
> I'd appreciate it if someone could take any examples from<http://matplotlib.sourceforge.net/index.html> and try to execute them as in the first paragraph to see if they terminate successfully.Let me know what OS used, hopefully XP, and if you used IDLE or file execution.
> I suspect you will find every example there ends with show(). Try putting a print statement after show() you've done it with the show() the last line.
> --
> "Crime is way down. War is declining. And that's far from the good news." -- Steven Pinker (and other sources) Why is this true, but yet the media says otherwise? The media knows very well how to manipulate us (see limbic, emotion, $$). -- WTW
>
> ------------------------------------------------------------------------------
> The Planet: dedicated and managed hosting, cloud storage, colocation Stay online with enterprise data centers and the best network in the business Choose flexible plans and management services without long-term contracts Personal 24x7 support from experience hosting pros just a phone call away.
> http://p.sf.net/sfu/theplanet-com
> _______________________________________________
> Matplotlib-users mailing list
> Mat...@li...
> https://lists.sourceforge.net/lists/listinfo/matplotlib-users
>
>
--
"Crime is way down. War is declining. And that's far from the good
news." -- Steven Pinker (and other sources) Why is this true, but yet
the media says otherwise? The media knows very well how to manipulate us
(see limbic, emotion, $$). -- WTW
|
|
From: Wayne W. <sie...@sb...> - 2010-02-09 17:36:44
|
Thanks for the clarification. I'm really new to this, and do not know of interactive mode. I presume there's a command to turn it off and on, and possibly an example on how to do it. Is this method of operation with show() mentioned anywhere? The unfortunate present use of show() is that it ties up the shell script, where I happened to have written program output. It's handy to put it there, since it's meant to be interactive. The user is keyboard arrowing through images, and statistical data is placed on the shell window. At the same time he sees a plot of data relevant to the image. He needs to close the plot window before going to the next image. I can probably figure out how to kill the plot window when he does that. My problem with using ipython is that the program I'm modifying is used with IDLE, and people have gotten to use it that way. I had nothing to do with that method of op. I doubt any of the users would be agreeable to using ipython. None of them know Python. The next time the program is released, I may provide it in executable form. I used matlab five years ago, for about two months. To see if it could help me understand MPL, I fired it up, and it's now working. Perhaps the interactive op is explained there. I take it there is no show() there? Interesting mention of "non-blocking". In the midst of this dilemma, I started getting socket errors. Using McAffe I found pythonw as blocked. Would that be in anyway associated with the use of show()? I've since changed it to outbound blocking. On 2/9/2010 8:18 AM, John Hunter wrote: > On Tue, Feb 9, 2010 at 10:06 AM, Wayne Watson > <sie...@sb...> wrote: > ... >> the last line. >> > "show" is meant to start the GUI mainloop, which is usually blocking, > and raise all windows, so the behavior you are reporting is the > intended behavior. When working interactively, as in Idle, you > shouldn't need to use show if you turn interactive mode on. > > http://matplotlib.sourceforge.net/users/shell.html > > We recommend using ipython in pylab model when working interactively > because it is designed to make the correct interactive settings and > override "show" to be non-blocking. You can obtain the right results > in matplotlib using Idle if you are careful, but for "just works out > of the box" ipython in pylab mode will be easier. > > JDH > > -- "Crime is way down. War is declining. And that's far from the good news." -- Steven Pinker (and other sources) Why is this true, but yet the media says otherwise? The media knows very well how to manipulate us (see limbic, emotion, $$). -- WTW |
|
From: John H. <jd...@gm...> - 2010-02-09 17:53:10
|
On Tue, Feb 9, 2010 at 11:36 AM, Wayne Watson <sie...@sb...> wrote: > Thanks for the clarification. I'm really new to this, and do not know of > interactive mode. I presume there's a command to turn it off and on, and > possibly an example on how to do it. Is this method of operation with > show() mentioned anywhere? Yes, on the documentation link I referred you to. JDH |
|
From: Jeffrey B. <je...@MI...> - 2010-02-10 17:42:38
|
Hi everyone,
This has been brought up before, but not completely addressed. Is it
possible to get the text in a Legend to match the rest of the text
when using LateX? Here is an example of the problem:
import matplotlib as mpl
mpl.rcParams['text.usetex'] = True
import matplotlib.pyplot as plt
fig = plt.figure()
ax = fig.add_subplot(111)
ax.plot([1,5,2,3]) # random data
plt.figlegend(ax.lines,[r'$\rm{label}$ label'],loc='upper left')
plt.show()
The first word is at least in a roman font, but the font size is
wrong. I am using svn revision 8005 with gtkagg backend on linux, and
confirm the behavior with 0.99.0 with tkagg on OS X.
Thanks,
Jeff
|
|
From: <PH...@Ge...> - 2010-02-10 18:01:48
|
Jeff,
I send all of my figures through LaTeX and don't have this problem. The only thing I can think of is to check your matplotlibrc file and make sure you've set the legend font to be the same size as the other fonts.
HTH,
-paul h.
> -----Original Message-----
> From: Jeffrey Blackburne [mailto:je...@MI...]
> Sent: Wednesday, February 10, 2010 9:45 AM
> To: mat...@li...
> Subject: [Matplotlib-users] LateX Legend (again)
>
> Hi everyone,
>
> This has been brought up before, but not completely addressed. Is it
> possible to get the text in a Legend to match the rest of the text
> when using LateX? Here is an example of the problem:
>
> import matplotlib as mpl
> mpl.rcParams['text.usetex'] = True
> import matplotlib.pyplot as plt
>
> fig = plt.figure()
> ax = fig.add_subplot(111)
> ax.plot([1,5,2,3]) # random data
> plt.figlegend(ax.lines,[r'$\rm{label}$ label'],loc='upper left')
> plt.show()
>
> The first word is at least in a roman font, but the font size is
> wrong. I am using svn revision 8005 with gtkagg backend on linux, and
> confirm the behavior with 0.99.0 with tkagg on OS X.
>
> Thanks,
> Jeff
>
>
> -------------------------------------------------------------------------
> -----
> SOLARIS 10 is the OS for Data Centers - provides features such as DTrace,
> Predictive Self Healing and Award Winning ZFS. Get Solaris 10 NOW
> http://p.sf.net/sfu/solaris-dev2dev
> _______________________________________________
> Matplotlib-users mailing list
> Mat...@li...
> https://lists.sourceforge.net/lists/listinfo/matplotlib-users
|
|
From: Jeffrey B. <je...@MI...> - 2010-02-10 18:34:17
|
Ah, I didn't know there was a section of the rc file for legends. Adding
mpl.rcParams['font.family'] = 'serif'
mpl.rcParams['legend.fontsize'] = 'medium'
fixed things right up.
Thanks,
Jeff
On Feb 10, 2010, at 1:01 PM, <PH...@ge...> wrote:
> Jeff,
>
> I send all of my figures through LaTeX and don't have this problem.
> The only thing I can think of is to check your matplotlibrc file
> and make sure you've set the legend font to be the same size as the
> other fonts.
>
> HTH,
> -paul h.
>
>> -----Original Message-----
>> From: Jeffrey Blackburne [mailto:je...@MI...]
>> Sent: Wednesday, February 10, 2010 9:45 AM
>> To: mat...@li...
>> Subject: [Matplotlib-users] LateX Legend (again)
>>
>> Hi everyone,
>>
>> This has been brought up before, but not completely addressed. Is it
>> possible to get the text in a Legend to match the rest of the text
>> when using LateX? Here is an example of the problem:
>>
>> import matplotlib as mpl
>> mpl.rcParams['text.usetex'] = True
>> import matplotlib.pyplot as plt
>>
>> fig = plt.figure()
>> ax = fig.add_subplot(111)
>> ax.plot([1,5,2,3]) # random data
>> plt.figlegend(ax.lines,[r'$\rm{label}$ label'],loc='upper left')
>> plt.show()
>>
>> The first word is at least in a roman font, but the font size is
>> wrong. I am using svn revision 8005 with gtkagg backend on linux, and
>> confirm the behavior with 0.99.0 with tkagg on OS X.
>>
>> Thanks,
>> Jeff
>>
>>
>> ---------------------------------------------------------------------
>> ----
>> -----
>> SOLARIS 10 is the OS for Data Centers - provides features such as
>> DTrace,
>> Predictive Self Healing and Award Winning ZFS. Get Solaris 10 NOW
>> http://p.sf.net/sfu/solaris-dev2dev
>> _______________________________________________
>> Matplotlib-users mailing list
>> Mat...@li...
>> https://lists.sourceforge.net/lists/listinfo/matplotlib-users
|