Re: [Matplotlib-users] Python 2.6 installer for Windows?

2009-03-21 Thread eliben


Adam Mercer wrote:
 
 On Sun, Feb 22, 2009 at 16:59, Wai Yip Tung tungwai...@yahoo.com wrote:
 
 I find that Matplotlib only have Python 2.5 build for Windows. Is there
 any plan to release a 2.6 build soon? I am trying to build it from source
 but I run into numerous problem. I am still struggling to find all
 dependent packages. It will help a lot if the 2.6 installer is available.
 
 AFAIK matplolib doesn't support python-2.6 yet, as NumPy doesn't.
 NumPy is expected to get python-2.6 support in the 1.3 release, so I
 imagine matplotlib will support python-2.6 in a release following the
 NumPy-1.3 release.
 
 Cheers
 
 Adam
 

NumPy 1.3 has been released, with pre-built win32 binaries for Python 2.6
(http://sourceforge.net/project/showfiles.php?group_id=1369package_id=175103).

Does this affect the plans to build matplotlib for py2.6 on win32 as well?
Is there a roadmap?

Thanks in advance


-- 
View this message in context: 
http://www.nabble.com/Python-2.6-installer-for-Windows--tp22152905p22634218.html
Sent from the matplotlib - users mailing list archive at Nabble.com.


--
Apps built with the Adobe(R) Flex(R) framework and Flex Builder(TM) are
powering Web 2.0 with engaging, cross-platform capabilities. Quickly and
easily build your RIAs with Flex Builder, the Eclipse(TM)based development
software that enables intelligent coding and step-through debugging.
Download the free 60 day trial. http://p.sf.net/sfu/www-adobe-com
___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Re: [Matplotlib-users] unexpected exception

2009-03-21 Thread Eric Firing
Vito De Tullio wrote:
 Hi!
 I'm a newbie of matplotlib, and I'm trying to plot a set of data... but I
 got blocked...
 
 $ cat matplotliberr.py
 #!/usr/bin/env python
 
 # dummy data to plot
 from datetime import date, timedelta
 from random import randint
 x = [ date.today() + timedelta(i) for i in range(10) ]
 y = [ randint(0, i) for i in range(10) ]
 
 from matplotlib import pyplot
 pyplot.fill(x, y) # no problem using pyplot.plot(x, y)

Try fill_between instead of fill.  Fill does not support units 
(arguments that are not simple number sequences), but fill_between does; 
in addition, I think fill_between is what you really want here.

Eric

 pyplot.show()
 $ ./matplotliberr.py
 /usr/lib/python2.6/site-packages/pytz/tzinfo.py:5: DeprecationWarning: the
 sets module is deprecated
   from sets import Set
 Traceback (most recent call last):
   File ./matplotliberr.py, line 10, in module
 pyplot.fill(x, y)
   File /usr/lib/python2.6/site-packages/matplotlib/pyplot.py, line 1876,
 in fill
 ret =  gca().fill(*args, **kwargs)
   File /usr/lib/python2.6/site-packages/matplotlib/axes.py, line 5558, in
 fill
 for poly in self._get_patches_for_fill(*args, **kwargs):
   File /usr/lib/python2.6/site-packages/matplotlib/axes.py, line 394, in
 _grab_next_args
 for seg in self._plot_2_args(remaining, **kwargs):
   File /usr/lib/python2.6/site-packages/matplotlib/axes.py, line 331, in
 _plot_2_args
 func(x, y)
   File /usr/lib/python2.6/site-packages/matplotlib/axes.py, line 314, in
 makefill
 (x[:,np.newaxis],y[:,np.newaxis])),
 TypeError: list indices must be integers, not tuple
 $ rpm -q python-matplotlib
 python-matplotlib-0.98.5.2-1.3
 


--
Apps built with the Adobe(R) Flex(R) framework and Flex Builder(TM) are
powering Web 2.0 with engaging, cross-platform capabilities. Quickly and
easily build your RIAs with Flex Builder, the Eclipse(TM)based development
software that enables intelligent coding and step-through debugging.
Download the free 60 day trial. http://p.sf.net/sfu/www-adobe-com
___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


[Matplotlib-users] Just a note of appreciation...

2009-03-21 Thread Kaushik Ghose
for one instance of the depth of thought that has gone into Matplotlib

http://assorted-experience.blogspot.com/2009/03/why-i-love-matplotlib-python.html

--
Apps built with the Adobe(R) Flex(R) framework and Flex Builder(TM) are
powering Web 2.0 with engaging, cross-platform capabilities. Quickly and
easily build your RIAs with Flex Builder, the Eclipse(TM)based development
software that enables intelligent coding and step-through debugging.
Download the free 60 day trial. http://p.sf.net/sfu/www-adobe-com
___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Re: [Matplotlib-users] error in hexbin normalization

2009-03-21 Thread Eric Firing
Mike Bauer wrote:
 Eric,
 
 Here's an example of a working hexbin (attached). What I want to do is 
 compare this with another dataset with many fewer points. What I'd 
 really like is for the color bar to reflect the cumulative percent of 
 the total count each cell holds, but I'd settle for what I thought 
 normalized gives which is scaling the colors from 0 - 1 instead of 
 showing the number count. I don't care about comparing numbers I care 
 about the relative frequency of each cell.

I don't have a solution for you, but it looks to me like you can do the 
sort of thing you are looking for via suitable choice of the C and 
reduce_C_function kwargs to hexbin.  This is not a job for the norm kwarg.

Actually, here is a stab at what I think you are describing:

x = np.random.normal(size=(1,))
y = np.random.normal(size=(1,))
imask = (x  -1)  (x  1)  (y  -1)  (y  1)
x = x[imask]
y = y[imask]
c = np.ones_like(x) * 100 / len(x)
hexbin(x, y, C=c, reduce_C_function=np.sum, gridsize=20)
colorbar()

I think this is giving percentage of hits in each bin.  The numbers are 
very small because there are many bins.

Eric


 
 Thanks for the pointer to colors.LogNorm(). I'll look into that.
 
 Mike
 
 Here's my script (sorry, you'll see it's a temporary hack).
 
 
 
 
 
 On Mar 20, 2009, at 7:10 PM, Eric Firing wrote:
 
 Mike Bauer wrote:
 Eric,
 Thanks for the reply.  I'm trying to show the relative 2d distribuion 
 between 2 sets of data. I thought the normalization would ease the 
 comparison. Fixing the ' doesn't help.
 So are you saying I need an instance of something.normalize rather 
 than just passing norm='normalize'?

 It sounds like you are misunderstanding the norm kwarg; it is for 
 controlling the mapping of an arbitrary range of numbers to the 0-1 
 range that is used in color mapping.  The default is a linear mapping; 
 one can use a log mapping instead (norm=colors.LogNorm()), or make 
 your own mapping function, etc.  The norm kwarg takes an instance of a 
 Normalize class or subclass.  See colors.py to find out what Normalize 
 subclasses are available.  But, you may not need to specify one at 
 all, depending on what it is you are trying to do.

 I still don't understand what it is that you wanted to normalize. 
 What was the undesirable characteristic of the plot you had before you 
 put in the norm kwarg?

 Eric

 Mike
 Sent from my iPhone
 On Mar 20, 2009, at 5:15 PM, Eric Firing efir...@hawaii.edu wrote:
 Mike Bauer wrote:
 Hello,
 Quick note. I'm making plots with hexbin and everything works  
 correctly until I try to use the norm='Normalize' option at which  
 point I get:
 Traceback (most recent call last):
  File diff_engine_v2tmp.py, line 731, in module
kept_and_discards)
  File diff_engine_v2tmp.py, line 605, in main
plt.hexbin(xdat,ydat,cmap=cm.jet,gridsize=25,norm=Normalize' )

 What is that single quote mark doing after Normalize?  If we ignore 
 it, then it looks like you are passing a class, not a class instance 
 as the kwarg needs.

  File /opt/local/Library/Frameworks/Python.framework/Versions/2.5/ 
 lib/python2.5/site-packages/matplotlib/pyplot.py, line 1920, in 
 hexbin
ret =  gca().hexbin(*args, **kwargs)
  File /opt/local/Library/Frameworks/Python.framework/Versions/2.5/ 
 lib/python2.5/site-packages/matplotlib/axes.py, line 5452, in hexbin
collection.autoscale_None()
  File /opt/local/Library/Frameworks/Python.framework/Versions/2.5/ 
 lib/python2.5/site-packages/matplotlib/cm.py, line 148, in  
 autoscale_None
self.norm.autoscale_None(self._A)
 AttributeError: 'int' object has no attribute 'autoscale_None'

 This part of the traceback is also a little puzzling; I'm not sure 
 why self.norm is an int at this point.

 I assume this a bug of some sort.

 No, I think the problem is that you are passing a class instead of 
 an instance of a class as the norm kwarg to hexbin.  (It is not 
 completely clear to me from the traceback, however--there is that 
 strange single quote mark.) What kind of normalization are you 
 trying to to?  In other words, what are you trying to accomplish by 
 specifying the norm kwarg?

 Eric


 Thanks for any ideas.
 Mike
 Using:
   os-x 10.5.6
   python 2.5.4 from macports
   matplotlib  0.98.5.2 from macports
 --
  

 Apps built with the Adobe(R) Flex(R) framework and Flex Builder(TM) 
 are
 powering Web 2.0 with engaging, cross-platform capabilities. 
 Quickly and
 easily build your RIAs with Flex Builder, the Eclipse(TM)based 
 development
 software that enables intelligent coding and step-through debugging.
 Download the free 60 day trial. http://p.sf.net/sfu/www-adobe-com
 ___
 Matplotlib-users mailing list
 Matplotlib-users@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/matplotlib-users


 
 
 



[Matplotlib-users] On changing the default tick pad

2009-03-21 Thread Gary Ruben
Whilst agreeing with Kaushik's sentiments on the greatness of 
matplotlib, I thought his example plot nicely illustrates a layout wart 
that I think is easily fixed by changing the default xtick.major.pad, 
xtick.minor.pad, ytick.major.pad and ytick.minor.pad values from 4 to 6.
As well as preventing the x- and y-axis labels running into each other 
in Kaushik's example, the most common case of a 2D plot with 0 lower 
bound on both the x- and y-axes [e.g. plot(rand(10))] looks better with 
the default font when pad=6. Just to bolster my case, according to the 
gestalt theory Law of Proximity 
http://en.wikipedia.org/wiki/Gestalt_psychology, the labels, which are 
currently closer to each other at the axis intersection than to the axes 
themselves become separated enough from one another so that they become 
visually associated with the axes in this region.

As an aside, I went looking for Matlab plotting examples and some appear 
to match the pad=4 padding whereas others are more like pad=6.

Of course I shall change this in my matplotlibrc file. I just thought 
I'd see if I could provoke a revolution,

Gary R.

--
Apps built with the Adobe(R) Flex(R) framework and Flex Builder(TM) are
powering Web 2.0 with engaging, cross-platform capabilities. Quickly and
easily build your RIAs with Flex Builder, the Eclipse(TM)based development
software that enables intelligent coding and step-through debugging.
Download the free 60 day trial. http://p.sf.net/sfu/www-adobe-com
___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users