Tim Michelsen | 1 Feb 01:08
Picon

Re: matplotlib, ipython and ubuntu

Hello Fernando,

>> <type 'exceptions.AttributeError'>: 'module' object has no attribute
>> 'ArrayType'
>>
>> maybe some of the IPython power users can give me a hint why this
>> happes. [1]
> 
> Very strange.  I can't reproduce it here (on gutsy, but running
> ipython from my own tree). What's odd is this:
> 
> In [1]: import Numeric
> 
> In [2]: print Numeric.ArrayType
> <type 'array'>
> 
> 
> So Numeric *most definitely* has an ArrayType member. Try doing the
> same as I did, also showing us whether you started ipython with -pylab
> or not.  There may be something odd about your Numeric installation.
> Also do this:
> 
> In [3]: Numeric?
> Type:           module
> Base Class:     <type 'module'>
> Namespace:      Interactive
> File:           /usr/lib/python2.5/site-packages/Numeric/Numeric.py
> 
> [etc]
> 
(Continue reading)

Rich Shepard | 1 Feb 02:56
Favicon

pylab.save() File Name Syntax

   I want to save plots programmatically, using a variable + .png as the
filename. I don't see an example of the proper syntax, and my
trial-and-error approach hasn't yielded a solution, either.

   If I want to write

 	pylab.save(curVar.png)

where 'curVar' is a variable assigned programmatically, how do I correctly
write it?

Rich

--

-- 
Richard B. Shepard, Ph.D.               |  Integrity            Credibility
Applied Ecosystem Services, Inc.        |            Innovation
<http://www.appl-ecosys.com>     Voice: 503-667-4517      Fax: 503-667-8863

-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
Alan G Isaac | 1 Feb 03:34
Picon
Favicon
Gravatar

Re: pylab.save() File Name Syntax

On Thu, 31 Jan 2008, Rich Shepard apparently wrote:
>    If I want to write
>  	pylab.save(curVar.png)
> where 'curVar' is a variable assigned programmatically, how do I correctly 
> write it? 

Use string concatenation:
curVar+'.png'

<URL:http://docs.python.org/tut/node5.html#SECTION005120000000000000000>

hth,
Alan Isaac

-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
Stephen George | 1 Feb 03:36
Picon
Gravatar

Re: pylab.save() File Name Syntax

Hi Rich,

bit confused what your asking.
are you looking for the pylab API savefig
http://matplotlib.sourceforge.net/matplotlib.pyplot.html#-savefig

or you asking how to convert your variable+.png into a filename?
is your variable a number?, string?

for count in range(3):
    count = count +1
    fname = 'MyPlot_%d.png' %count
    print fname

mystr = 'MyFirstPlot'
fname = '%s.png' % mystr
print fname

results in
 >python -u "test.py"
MyPlot_1.png
MyPlot_2.png
MyPlot_3.png
MyFirstPlot.png
 >Exit code: 0

pylab.savefig('%s.png'% curVar)
   or
pylab.savefig('%d.png'% curVar)

(Continue reading)

Wayne E. Harlan | 1 Feb 05:13

Re: Subplot Questions

Eric:
I have never seen any software which dealt with non uniform DPI 
settings, although that is always a possibility.  And all the displays I 
have ever worked on/with have been the same for both H and V.  ( I am a 
display engineer with over 25 years experience in CRT displays and a bit 
in flat panel).  From what I have seen, the RGB trio in any display is 
set up so that the horizontal pitch is the same as the vertical pitch.  
In a flat panel the R, G and B are 3 times taller than they are wide so 
that when you place R, G and B together they form a square.  I don't 
think that Matplotlib or Alan needs to worry about anything outside 
those boundaries.

Wayne

Eric Firing wrote:
> John Hunter wrote:
>   
>> On Jan 31, 2008 12:54 AM, Eric Firing <efiring@...> wrote:
>>
>>     
>>> Screens vary.  The screen on my laptop has about 130 dpi. Desktop flat
>>> panels will usually have a smaller value than that.  For example, an old
>>> "15-inch" flat panel with 1024/768 pixels is actually about 12 inches
>>> wide, so dpi=85.  The mpl default 'figure.dpi' of 80 is low; I doubt
>>>       
>> And it is not unusual to have a different DPI in the horizontal and
>> vertical directions.  In order to support true physical sizes on the
>> screen, we would need to support different dpis in the two directions.
>>     
>
(Continue reading)

Fernando Perez | 1 Feb 08:23
Picon
Gravatar

IPython -pylab/-Xthread improvements in SVN - testers?

Hi all,

sorry for the quick cross-post, but I know that many mpl users rely on
the ipython -pylab support for interactive work.

This is a call for testing from current SVN of anyone who uses ipython
with the GUI thread support, whether via -pylab or directly via one of
the -Xthread options.

For a long time I've known that this code was subject to possible
deadlocks, having seen it go nuts on me on occasion, but I'd never
been able to track down the exact source of the race conditions
causing it (I'm not an expert in threads at all).  In

http://ipython.scipy.org/ipython/ipython/ticket/210
http://ipython.scipy.org/ipython/ipython/ticket/212

a very helpful analysis and solution code was provided by Marc.  I've
applied his fixes to current SVN, and with my testing so far I've been
unable to get any more deadlocks or crashes, so this looks great, and
his analysis looks very sound to me.  In particular, it makes proper
use of a re-entrant lock which I'd originally tried to use but given
up on, due to having used it incorrectly (though I knew it should be
the right tool).  I'd just left a comment noting the issue, which
Marc's fixes now address.

It would be great if any of you who relies on the GUI thread support
could test this, since this threaded code is subtle and has a long
history of hard to trigger but annoying bugs.  You can run it from
SVN.  In a few minutes I'll finish uploading test builds as well to
(Continue reading)

Mark Bakker | 1 Feb 09:42
Picon

dashes and dpi?

Alan -

You started a discussion about dpi on the figures.
Yet here you claim that 1pt = 1/72 inch.
Is that always the case?
And why? How does mpl figure that out, if there are also different dpi settings?
The plot thickens...

Mark
 
Alan Isaac wrote: 

Note: 1pt = 1/72 inch

hth,
Alan Isaac

-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Matplotlib-users mailing list
Matplotlib-users@...
https://lists.sourceforge.net/lists/listinfo/matplotlib-users
khromushin | 1 Feb 09:50

Easy Embedding of Matplotlib in wx appls module + Boa constructor plug-in for Matplotlib


New version is available now. Just select matplotlib component  from Boa
pallete and plot any number of different plots as easy as with Pylab. See
runtime sample. My e-mail is khrom@... If you are interested, please,
write me. It costs $50. Igor V. Khromushin
http://www.nabble.com/file/p15221924/runtimesample1.jpg 
--

-- 
View this message in context: http://www.nabble.com/Easy-Embedding-of-Matplotlib-in-wx-appls-module-%2B-Boa-constructor-plug-in-for-Matplotlib-tp15221924p15221924.html
Sent from the matplotlib - users mailing list archive at Nabble.com.

-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
Manuel Metz | 1 Feb 10:02
Picon
Favicon

Re: dashes and dpi?

Mark Bakker wrote:
> Alan -
> 
> You started a discussion about dpi on the figures.
> Yet here you claim that 1pt = 1/72 inch.
> Is that always the case?

Yes, I that's *by definition* always the case !

pt is a point - not a dot or a pixel !!!

"Point" is a unit of measurement used in typography that is equal to 
1/72 inch. It is used primarily for representing the height of 
characters and the amount of space between lines, also known as leading.

   --> see http://support.microsoft.com/kb/76388

Manuel

> And why? How does mpl figure that out, if there are also different dpi
> settings?
> The plot thickens...
> 
> Mark
> 
> 
>> Alan Isaac wrote:
> 
> 
>> Note: 1pt = 1/72 inch
>>
>> hth,
>> Alan Isaac
>>
> 
> 
> ------------------------------------------------------------------------
> 
> -------------------------------------------------------------------------
> This SF.net email is sponsored by: Microsoft
> Defy all challenges. Microsoft(R) Visual Studio 2008.
> http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
> 
> 
> ------------------------------------------------------------------------
> 
> _______________________________________________
> Matplotlib-users mailing list
> Matplotlib-users@...
> https://lists.sourceforge.net/lists/listinfo/matplotlib-users

-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
Michael Droettboom | 1 Feb 14:19

Re: dashes and dpi?

Mark Bakker wrote:
> Alan -
> 
> You started a discussion about dpi on the figures.
> Yet here you claim that 1pt = 1/72 inch.
> Is that always the case?

Barring any bugs, yes.

> And why? How does mpl figure that out, if there are also different dpi 
> settings?

The conversion from points to pixels is simply "dpi * points / 72.0".

Cheers,
Mike

> The plot thickens...
> 
> Mark
>  
> 
>     Alan Isaac wrote: 
> 
> 
>     Note: 1pt = 1/72 inch
> 
>     hth,
>     Alan Isaac
> 
> 
> 
> ------------------------------------------------------------------------
> 
> -------------------------------------------------------------------------
> This SF.net email is sponsored by: Microsoft
> Defy all challenges. Microsoft(R) Visual Studio 2008.
> http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
> 
> 
> ------------------------------------------------------------------------
> 
> _______________________________________________
> Matplotlib-users mailing list
> Matplotlib-users@...
> https://lists.sourceforge.net/lists/listinfo/matplotlib-users

--

-- 
Michael Droettboom
Science Software Branch
Operations and Engineering Division
Space Telescope Science Institute
Operated by AURA for NASA

-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/

Gmane