Re: [Matplotlib-users] problems installing matplotlib on OS X Lion

2011-09-03 Thread Bryan K Woods
I had a problem getting with Lion as well. I was able to work around it by:
1) unsuccessfully trying to install matplotlib for python 2.7 via macports
2) then using easy_install to install matplotlib

Bryan K. Woods, Ph.D.
Staff Scientist
Atmospheric & Environmental Research, Inc.
bwo...@aer.com

On Sep 4, 2011, at 1:06 AM, Lynn Oliver  wrote:

> After many unsuccessful attempts at getting matplotlib installed on OS X 
> Lion, I ran across this page:
> Installing Matplotlib on OS X 10.7 with Homebrew « Random Musings for the 
> Digital Age
> 
> Following these instructions got me the closest I have been:
> 
> $ brew install python
> $ brew install gfortran
> $ brew install pkg-config
> $ easy_install pip
> $ pip install numpy
> $ cd $HOME
> $ git clone https://github.com/matplotlib/matplotlib.git
> $ cd matplotlib
> $ python setup.py build
> $ python setup.py install
> 
> At the moment, I'm trying to get a script that was working on EPD 7.1 to work 
> on Python 2.7.2.  I'm using the TkAgg backend.
> 
> The first messages I see when running the script are:
> 
> objc[68962]: Class TKApplication is implemented in both 
> /Library/Frameworks/Tk.framework/Versions/8.5/Tk and 
> /Library/Frameworks/Tk.framework/Versions/8.6/Tk. One of the two will be 
> used. Which one is undefined.
> objc[68962]: Class TKMenu is implemented in both 
> /Library/Frameworks/Tk.framework/Versions/8.5/Tk and 
> /Library/Frameworks/Tk.framework/Versions/8.6/Tk. One of the two will be 
> used. Which one is undefined.
> objc[68962]: Class TKContentView is implemented in both 
> /Library/Frameworks/Tk.framework/Versions/8.5/Tk and 
> /Library/Frameworks/Tk.framework/Versions/8.6/Tk. One of the two will be 
> used. Which one is undefined.
> objc[68962]: Class TKWindow is implemented in both 
> /Library/Frameworks/Tk.framework/Versions/8.5/Tk and 
> /Library/Frameworks/Tk.framework/Versions/8.6/Tk. One of the two will be 
> used. Which one is undefined.
> 
> For both Tk and Tcl, ../Versions/Current points to 8.6.  
> 
> From there, everything is fine until it executes show(), when I get the 
> following messages:
> 
> Exception in Tkinter callback
> Traceback (most recent call last):
>   File 
> "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-tk/Tkinter.py",
>  line 1410, in __call__
> return self.func(*args)
>   File 
> "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/matplotlib/backends/backend_tkagg.py",
>  line 236, in resize
> self.show()
>   File 
> "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/matplotlib/backends/backend_tkagg.py",
>  line 240, in draw
> tkagg.blit(self._tkphoto, self.renderer._renderer, colormode=2)
>   File 
> "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/matplotlib/backends/tkagg.py",
>  line 19, in blit
> tk.call("PyAggImagePhoto", photoimage, id(aggimage), colormode, 
> id(bbox_array))
> TclError
> 
> Can anyone suggest how to resolve this problem?
> 
> Thanks,
> Lynn
> --
> Special Offer -- Download ArcSight Logger for FREE!
> Finally, a world-class log management solution at an even better 
> price-free! And you'll get a free "Love Thy Logs" t-shirt when you
> download Logger. Secure your free ArcSight Logger TODAY!
> http://p.sf.net/sfu/arcsisghtdev2dev
> ___
> Matplotlib-users mailing list
> Matplotlib-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/matplotlib-users
--
Special Offer -- Download ArcSight Logger for FREE!
Finally, a world-class log management solution at an even better 
price-free! And you'll get a free "Love Thy Logs" t-shirt when you
download Logger. Secure your free ArcSight Logger TODAY!
http://p.sf.net/sfu/arcsisghtdev2dev___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


[Matplotlib-users] problems installing matplotlib on OS X Lion

2011-09-03 Thread Lynn Oliver
After many unsuccessful attempts at getting matplotlib installed on OS X Lion, 
I ran across this page:
Installing Matplotlib on OS X 10.7 with Homebrew « Random Musings for the 
Digital Age

Following these instructions got me the closest I have been:

$ brew install python
$ brew install gfortran
$ brew install pkg-config
$ easy_install pip
$ pip install numpy
$ cd $HOME
$ git clone https://github.com/matplotlib/matplotlib.git
$ cd matplotlib
$ python setup.py build
$ python setup.py install

At the moment, I'm trying to get a script that was working on EPD 7.1 to work 
on Python 2.7.2.  I'm using the TkAgg backend.

The first messages I see when running the script are:

objc[68962]: Class TKApplication is implemented in both 
/Library/Frameworks/Tk.framework/Versions/8.5/Tk and 
/Library/Frameworks/Tk.framework/Versions/8.6/Tk. One of the two will be used. 
Which one is undefined.
objc[68962]: Class TKMenu is implemented in both 
/Library/Frameworks/Tk.framework/Versions/8.5/Tk and 
/Library/Frameworks/Tk.framework/Versions/8.6/Tk. One of the two will be used. 
Which one is undefined.
objc[68962]: Class TKContentView is implemented in both 
/Library/Frameworks/Tk.framework/Versions/8.5/Tk and 
/Library/Frameworks/Tk.framework/Versions/8.6/Tk. One of the two will be used. 
Which one is undefined.
objc[68962]: Class TKWindow is implemented in both 
/Library/Frameworks/Tk.framework/Versions/8.5/Tk and 
/Library/Frameworks/Tk.framework/Versions/8.6/Tk. One of the two will be used. 
Which one is undefined.

For both Tk and Tcl, ../Versions/Current points to 8.6.  

From there, everything is fine until it executes show(), when I get the 
following messages:

Exception in Tkinter callback
Traceback (most recent call last):
  File 
"/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-tk/Tkinter.py",
 line 1410, in __call__
return self.func(*args)
  File 
"/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/matplotlib/backends/backend_tkagg.py",
 line 236, in resize
self.show()
  File 
"/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/matplotlib/backends/backend_tkagg.py",
 line 240, in draw
tkagg.blit(self._tkphoto, self.renderer._renderer, colormode=2)
  File 
"/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/matplotlib/backends/tkagg.py",
 line 19, in blit
tk.call("PyAggImagePhoto", photoimage, id(aggimage), colormode, 
id(bbox_array))
TclError

Can anyone suggest how to resolve this problem?

Thanks,
Lynn--
Special Offer -- Download ArcSight Logger for FREE!
Finally, a world-class log management solution at an even better 
price-free! And you'll get a free "Love Thy Logs" t-shirt when you
download Logger. Secure your free ArcSight Logger TODAY!
http://p.sf.net/sfu/arcsisghtdev2dev___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Re: [Matplotlib-users] How do you Plot data generated by a python script?

2011-09-03 Thread C M
On Sat, Sep 3, 2011 at 7:32 PM, mdekauwe  wrote:
>
> So you do want a histogram then? I assume you have all of this sorted then,
> the histogram function is very good.

I don't think he's describing a histogram, because he is not plotting
frequency of observations on the y axis, but data values (means of
each bin).  I think what surfcast23 wants is just a bar graph.

So, surfcast23, I'd suggest you break it down into your two steps.
First, how will you average your values by bin?  You can probably
figure that out by writing it out on paper in pseudo-code and then
just putting it in Python. Then you'll have a list of means, and you
will pass that to the bar function in matplotlib, something like:

from pylab import *
ax = subplot(111)
x = arange(4)
your_list_of_means = [4,5,7,11] #computed earlier
bar(x, your_list_of_means)
xticks( x + 0.5,  ('Bin1', 'Bin2', 'Bin3', 'Bin4') )
show()

Che

--
Special Offer -- Download ArcSight Logger for FREE!
Finally, a world-class log management solution at an even better 
price-free! And you'll get a free "Love Thy Logs" t-shirt when you
download Logger. Secure your free ArcSight Logger TODAY!
http://p.sf.net/sfu/arcsisghtdev2dev
___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Re: [Matplotlib-users] How do you Plot data generated by a python script?

2011-09-03 Thread mdekauwe

So you do want a histogram then? I assume you have all of this sorted then,
the histogram function is very good.

Cheers,

Martin
-- 
View this message in context: 
http://old.nabble.com/How-do-you-Plot-data-generated-by-a-python-script--tp32328822p32394062.html
Sent from the matplotlib - users mailing list archive at Nabble.com.


--
Special Offer -- Download ArcSight Logger for FREE!
Finally, a world-class log management solution at an even better 
price-free! And you'll get a free "Love Thy Logs" t-shirt when you
download Logger. Secure your free ArcSight Logger TODAY!
http://p.sf.net/sfu/arcsisghtdev2dev
___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Re: [Matplotlib-users] How do you Plot data generated by a python script?

2011-09-03 Thread surfcast23

Hi Martin,
 
  Sorry I am just responding. I have been busy getting ready for the
semester. What I need to do is first sort the values contained in the column
and assign them to bins. I then have to plot the number of bins by the mean
value in each bin. 



mdekauwe wrote:
> 
> Can you describe what you want to do? So you now want a histogram?
> 
> 
> surfcast23 wrote:
>> 
>> Sorry everyone I totally missed something very important. What I need to
>> do is first bin the masses(which I don't know how to do). 
>> 
>> Chelonian wrote:
>>> 
>>> On Thu, Aug 25, 2011 at 10:01 PM, surfcast23 
>>> wrote:

 Hi,

   there is only one column. so I want a plot of y and x. With y taking
 values running from 0 to n  or 7 in my example and x as the average of
 the
 values that are contained in the rows in my example it was 5.57.
>>> 
>>> It seems to me that, as described, you want a plot that in which all
>>> the bars are the same height (or width if it is a sideways bar chart),
>>> in this case, 5.57.  That makes no sense.
>>> 
>>> What information is this plot is intended to provide the viewer?
>>> 
>>> --
>>> EMC VNX: the world's simplest storage, starting under $10K
>>> The only unified storage solution that offers unified management 
>>> Up to 160% more powerful than alternatives and 25% more efficient. 
>>> Guaranteed. http://p.sf.net/sfu/emc-vnx-dev2dev
>>> ___
>>> Matplotlib-users mailing list
>>> Matplotlib-users@lists.sourceforge.net
>>> https://lists.sourceforge.net/lists/listinfo/matplotlib-users
>>> 
>>> 
>> 
>> 
> 
> 

-- 
View this message in context: 
http://old.nabble.com/How-do-you-Plot-data-generated-by-a-python-script--tp32328822p32393079.html
Sent from the matplotlib - users mailing list archive at Nabble.com.


--
Special Offer -- Download ArcSight Logger for FREE!
Finally, a world-class log management solution at an even better 
price-free! And you'll get a free "Love Thy Logs" t-shirt when you
download Logger. Secure your free ArcSight Logger TODAY!
http://p.sf.net/sfu/arcsisghtdev2dev
___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users