Re: [Matplotlib-users] histogram examples?

2008-11-12 Thread Michael Hannon
On Tue, Nov 11, 2008 at 08:52:15AM -1000, Eric Firing wrote:
.
.
.
> >Hi, Eric.  I'm using the packages provided by Fedora:
> >
> >numpy.x86_64 1.2.0-1.fc9
> >python-matplotlib.x86_64 0.91.4-1.fc9
> >
> >It appears that numpy is reasonably up-to-date, but Matplotlib appears
> >to be relatively old (although I don't know what d(version)/dt is).
> 
> Yes, your numpy is fine, but your matplotlib is an older branch, and 
> although it is still being maintained it looks like it is not in sync 
> with changes to numpy going from 1.1 to 1.2.  I hope Fedora 10 has 
> switched to the current branch, 0.98.x.  In any case, however, 
> matplotlib changes fast enough that it may be worthwhile building your 
> own.  It is very easy to do on a linux machine once the necessary 
> headers are in place.  Typically this involves installing several *dev 
> or *devel packages--I don't know the specifics of Fedora packaging.

Thanks again, Eric.  I built Matplotlib 0.98 from source on my Fedora
box, and that did fix the problem.

I haven't checked Fedora 10 yet (arriving in 13 days).

- Mike
-- 
Michael Hannonmailto:[EMAIL PROTECTED]
Dept. of Physics  530.752.4966
University of California  530.752.4717 FAX
Davis, CA 95616-8677

-
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Re: [Matplotlib-users] saving figures on OS X

2008-11-12 Thread Gideon Simpson
Both of these issues seem to be resolved by the latest fink packages.
-gideon

On Nov 7, 2008, at 10:13 AM, Gideon Simpson wrote:

> 1.  I find that the eps's generated, for whatever reason, do not
> automatically conform to something that Preview.app can open.  it
> generates the error:
>
> PostScript Conversion Error
> The PostScript file "test.eps" could not be converted to a PDF file.
>
> However, the eps's are fundamentally there.  I can open them in GIMP
> and use ps2pdf on them.
>
> 2.  My fink installed QT4 backend gives an error while trying to save
> a figure as PDF using the GUI.  I get:
>
> [Errno 4] Interrupted system call
>
> Other file formats do not generate this error.
>
>
> -gideon
>
>
> -
> This SF.Net email is sponsored by the Moblin Your Move Developer's  
> challenge
> Build the coolest Linux based applications with Moblin SDK & win  
> great prizes
> Grand prize is a trip for two to an Open Source event anywhere in  
> the world
> http://moblin-contest.org/redirect.php?banner_id=100&url=/
> ___
> Matplotlib-users mailing list
> Matplotlib-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/matplotlib-users


-
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


[Matplotlib-users] Multi-histogram example generates errors

2008-11-12 Thread Zane Selvans
I'm trying to make a bar-style histogram, along the lines of the last  
example figure from the extended histogram demo:


http://matplotlib.sourceforge.net/examples/pylab_examples/histogram_demo_extended.html

in which the several arrays to be histogrammed do not have the same  
length.  However, I'm getting an error about "setting an array element  
with a sequence", even when I just cut-and-paste in the example code.   
The previous multi-histogram examples in which the array being plotted  
is generated using: x = mu + sigma*randn(1000,3) work fine though.


Am I doing something stupid?

Here's the trace:

In [25]: n, bins, patches = hist( [x0,x1,x2], 10, histtype='bar')
---
ValueErrorTraceback (most recent call  
last)


/Users/zane/svn/googlecode/ in ()

/Library/Python/2.5/site-packages/matplotlib-0.98.3-py2.5-macosx-10.3- 
i386.egg/matplotlib/pyplot.pyc in hist(*args, **kwargs)

   1866 hold(h)
   1867 try:
-> 1868 ret =  gca().hist(*args, **kwargs)
   1869 draw_if_interactive()
   1870 except:

/Library/Python/2.5/site-packages/matplotlib-0.98.3-py2.5-macosx-10.3- 
i386.egg/matplotlib/axes.pyc in hist(self, x, bins, range, normed,  
cumulative, bottom, histtype, align, orientation, rwidth, log, **kwargs)

   6211
   6212 # todo: make hist() work with list of arrays with  
different lengths

-> 6213 x = np.asarray(x).copy()
   6214 if len(x.shape)==2 and min(x.shape)==1:
   6215 x.shape = max(x.shape),

/Library/Python/2.5/site-packages/numpy-1.2.0.dev5677-py2.5- 
macosx-10.3-i386.egg/numpy/core/numeric.pyc in asarray(a, dtype, order)

228
229 """
--> 230 return array(a, dtype, copy=False, order=order)
231
232 def asanyarray(a, dtype=None, order=None):

ValueError: setting an array element with a sequence.


--
Zane Selvans
Amateur Earthling
[EMAIL PROTECTED]
303/815-6866
http://zaneselvans.org
PGP Key: 55E0815F








-
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Re: [Matplotlib-users] Multi-histogram example generates errors

2008-11-12 Thread Eric Firing
Zane Selvans wrote:
> I'm trying to make a bar-style histogram, along the lines of the last 
> example figure from the extended histogram demo:
> 
> http://matplotlib.sourceforge.net/examples/pylab_examples/histogram_demo_extended.html
> 
> in which the several arrays to be histogrammed do not have the same 
> length.  However, I'm getting an error about "setting an array element 
> with a sequence", even when I just cut-and-paste in the example code. 
>  The previous multi-histogram examples in which the array being plotted 
> is generated using: x = mu + sigma*randn(1000,3) work fine though.
> 
> Am I doing something stupid?

No.

The example code runs with mpl from svn, so I suspect you are running 
into an example that was written to show capabilities added since the 
last release.  In fact, it looks like that 6212 #todo is the clue: it is 
not found in the svn version.

Eric

> 
> Here's the trace:
> 
> In [25]: n, bins, patches = hist( [x0,x1,x2], 10, histtype='bar')
> ---
> ValueErrorTraceback (most recent call last)
> 
> /Users/zane/svn/googlecode/ in ()
> 
> /Library/Python/2.5/site-packages/matplotlib-0.98.3-py2.5-macosx-10.3-i386.egg/matplotlib/pyplot.pyc
>  
> in hist(*args, **kwargs)
>1866 hold(h)
>1867 try:
> -> 1868 ret =  gca().hist(*args, **kwargs)
>1869 draw_if_interactive()
>1870 except:
> 
> /Library/Python/2.5/site-packages/matplotlib-0.98.3-py2.5-macosx-10.3-i386.egg/matplotlib/axes.pyc
>  
> in hist(self, x, bins, range, normed, cumulative, bottom, histtype, 
> align, orientation, rwidth, log, **kwargs)
>6211 
>6212 # todo: make hist() work with list of arrays with 
> different lengths
> -> 6213 x = np.asarray(x).copy()
>6214 if len(x.shape)==2 and min(x.shape)==1:
>6215 x.shape = max(x.shape),
> 
> /Library/Python/2.5/site-packages/numpy-1.2.0.dev5677-py2.5-macosx-10.3-i386.egg/numpy/core/numeric.pyc
>  
> in asarray(a, dtype, order)
> 228 
> 229 """
> --> 230 return array(a, dtype, copy=False, order=order)
> 231 
> 232 def asanyarray(a, dtype=None, order=None):
> 
> ValueError: setting an array element with a sequence.
> 
> 
> --
> Zane Selvans
> Amateur Earthling
> [EMAIL PROTECTED] 
> 303/815-6866
> http://zaneselvans.org
> PGP Key: 55E0815F
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> -
> This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
> Build the coolest Linux based applications with Moblin SDK & win great prizes
> Grand prize is a trip for two to an Open Source event anywhere in the world
> http://moblin-contest.org/redirect.php?banner_id=100&url=/
> 
> 
> 
> 
> ___
> Matplotlib-users mailing list
> Matplotlib-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/matplotlib-users


-
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users