SourceForge logo
SourceForge logo
Menu

matplotlib-users — Discussion related to using matplotlib

You can subscribe to this list here.

2003 Jan
Feb
Mar
Apr
May
(3)
Jun
Jul
Aug
(12)
Sep
(12)
Oct
(56)
Nov
(65)
Dec
(37)
2004 Jan
(59)
Feb
(78)
Mar
(153)
Apr
(205)
May
(184)
Jun
(123)
Jul
(171)
Aug
(156)
Sep
(190)
Oct
(120)
Nov
(154)
Dec
(223)
2005 Jan
(184)
Feb
(267)
Mar
(214)
Apr
(286)
May
(320)
Jun
(299)
Jul
(348)
Aug
(283)
Sep
(355)
Oct
(293)
Nov
(232)
Dec
(203)
2006 Jan
(352)
Feb
(358)
Mar
(403)
Apr
(313)
May
(165)
Jun
(281)
Jul
(316)
Aug
(228)
Sep
(279)
Oct
(243)
Nov
(315)
Dec
(345)
2007 Jan
(260)
Feb
(323)
Mar
(340)
Apr
(319)
May
(290)
Jun
(296)
Jul
(221)
Aug
(292)
Sep
(242)
Oct
(248)
Nov
(242)
Dec
(332)
2008 Jan
(312)
Feb
(359)
Mar
(454)
Apr
(287)
May
(340)
Jun
(450)
Jul
(403)
Aug
(324)
Sep
(349)
Oct
(385)
Nov
(363)
Dec
(437)
2009 Jan
(500)
Feb
(301)
Mar
(409)
Apr
(486)
May
(545)
Jun
(391)
Jul
(518)
Aug
(497)
Sep
(492)
Oct
(429)
Nov
(357)
Dec
(310)
2010 Jan
(371)
Feb
(657)
Mar
(519)
Apr
(432)
May
(312)
Jun
(416)
Jul
(477)
Aug
(386)
Sep
(419)
Oct
(435)
Nov
(320)
Dec
(202)
2011 Jan
(321)
Feb
(413)
Mar
(299)
Apr
(215)
May
(284)
Jun
(203)
Jul
(207)
Aug
(314)
Sep
(321)
Oct
(259)
Nov
(347)
Dec
(209)
2012 Jan
(322)
Feb
(414)
Mar
(377)
Apr
(179)
May
(173)
Jun
(234)
Jul
(295)
Aug
(239)
Sep
(276)
Oct
(355)
Nov
(144)
Dec
(108)
2013 Jan
(170)
Feb
(89)
Mar
(204)
Apr
(133)
May
(142)
Jun
(89)
Jul
(160)
Aug
(180)
Sep
(69)
Oct
(136)
Nov
(83)
Dec
(32)
2014 Jan
(71)
Feb
(90)
Mar
(161)
Apr
(117)
May
(78)
Jun
(94)
Jul
(60)
Aug
(83)
Sep
(102)
Oct
(132)
Nov
(154)
Dec
(96)
2015 Jan
(45)
Feb
(138)
Mar
(176)
Apr
(132)
May
(119)
Jun
(124)
Jul
(77)
Aug
(31)
Sep
(34)
Oct
(22)
Nov
(23)
Dec
(9)
2016 Jan
(26)
Feb
(17)
Mar
(10)
Apr
(8)
May
(4)
Jun
(8)
Jul
(6)
Aug
(5)
Sep
(9)
Oct
(4)
Nov
Dec
2017 Jan
(5)
Feb
(7)
Mar
(1)
Apr
(5)
May
Jun
(3)
Jul
(6)
Aug
(1)
Sep
Oct
(2)
Nov
(1)
Dec
2018 Jan
Feb
Mar
Apr
(1)
May
Jun
Jul
Aug
Sep
Oct
Nov
Dec
2020 Jan
Feb
Mar
Apr
May
(1)
Jun
Jul
Aug
Sep
Oct
Nov
Dec
2025 Jan
(1)
Feb
Mar
Apr
May
Jun
Jul
Aug
Sep
Oct
Nov
Dec
S M T W T F S




1
(17)
2
(3)
3
(2)
4
(11)
5
(8)
6
(22)
7
(16)
8
(9)
9
(14)
10
(1)
11
(8)
12
(5)
13
(7)
14
(10)
15
(28)
16
(8)
17
(20)
18
(6)
19
(5)
20
(15)
21
(8)
22
(7)
23
(14)
24
(10)
25
(6)
26
(8)
27
(9)
28
(11)
29
(13)
30
(20)

Showing 10 results of 10

From: Eric F. <ef...@ha...> - 2011年09月04日 22:40:54
On 09/04/2011 12:08 PM, Adam Davis wrote:
> Eric,
>
> Thank you for the reply.
>
> Yes, eliminating sharex and sharey does solve that problem. But then my
> plot axes (which are scatter plots of each orthogonal view of a vector
> space) are not correspondingly scaled.
>
> Is there a way to:
>
> - force scaling across specified axes without using sharex/y (and
> without disrupting imshow)?
You can manually get and set the axes limits with ax.get_ylim, 
ax.set_ylim, etc.
>
> - have subplots within subplots so that I can have the plot() calls in
> one set of axes within a subplot (using sharex/y) and the imshow() calls
> in another subplot?
You just need to create the subplots one-by-one instead of using the 
subplots convenience function:
fig = plt.figure()
ax1 = fig.add_subplot(2,2,1)
ax2 = fig.add_subplot(2,2,2, sharex=ax1, sharey=ax1)
ax3 = fig.add_subplot(2,2,3, sharex=ax1, sharey=ax1)
ax4 = fig.add_subplot(2,2,4)
Now the first three axes are locked together, and the 4th is independent.
Eric
>
> -Adam
>
> On Sun, Sep 4, 2011 at 10:34 PM, Eric Firing <ef...@ha...
> <mailto:ef...@ha...>> wrote:
>
> On 09/04/2011 11:12 AM, Adam Davis wrote:
> > I have a figure with a number of plots that analyze a source image. I
> > wish to show the plots along side the image. Unfortunately whichever
> > method I call last clobbers (leaves blank axes) for the previously
> > called method.
> >
> > To illustrate:
> >
> > fig, axs = pylab.subplots(10, 4, sharex=True, sharey=True)
> >
> > for i in range(10):
> >
> > axs[i,0].plot(some_data)
> > axs[i,1].plot(some_data)
> > axs[i,2].plot(some_data)
> >
> > axs[i,3].imshow(some_image)
> >
> > #=====
> >
> > The above shows only the images in the fourth column. If, however, I
> > call imshow() first, followed by the call to plot(), then only
> the plot
> > axes appear and the images disappear.
> >
> > Is there a way to both plot and display images in the same figure?
>
> I suspect the problem here is your sharex and sharey kwargs. Try
> leaving them out.
>
> Eric
>
> >
> > -Adam
>
> ------------------------------------------------------------------------------
> 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
> Mat...@li...
> <mailto:Mat...@li...>
> https://lists.sourceforge.net/lists/listinfo/matplotlib-users
>
>
From: Adam D. <ada...@gm...> - 2011年09月04日 22:08:32
Eric,
Thank you for the reply.
Yes, eliminating sharex and sharey does solve that problem. But then my plot
axes (which are scatter plots of each orthogonal view of a vector space) are
not correspondingly scaled.
Is there a way to:
- force scaling across specified axes without using sharex/y (and without
disrupting imshow)?
- have subplots within subplots so that I can have the plot() calls in one
set of axes within a subplot (using sharex/y) and the imshow() calls in
another subplot?
-Adam
On Sun, Sep 4, 2011 at 10:34 PM, Eric Firing <ef...@ha...> wrote:
> On 09/04/2011 11:12 AM, Adam Davis wrote:
> > I have a figure with a number of plots that analyze a source image. I
> > wish to show the plots along side the image. Unfortunately whichever
> > method I call last clobbers (leaves blank axes) for the previously
> > called method.
> >
> > To illustrate:
> >
> > fig, axs = pylab.subplots(10, 4, sharex=True, sharey=True)
> >
> > for i in range(10):
> >
> > axs[i,0].plot(some_data)
> > axs[i,1].plot(some_data)
> > axs[i,2].plot(some_data)
> >
> > axs[i,3].imshow(some_image)
> >
> > #=====
> >
> > The above shows only the images in the fourth column. If, however, I
> > call imshow() first, followed by the call to plot(), then only the plot
> > axes appear and the images disappear.
> >
> > Is there a way to both plot and display images in the same figure?
>
> I suspect the problem here is your sharex and sharey kwargs. Try
> leaving them out.
>
> Eric
>
> >
> > -Adam
>
>
> ------------------------------------------------------------------------------
> 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
> Mat...@li...
> https://lists.sourceforge.net/lists/listinfo/matplotlib-users
>
From: Eric F. <ef...@ha...> - 2011年09月04日 21:34:51
On 09/04/2011 11:12 AM, Adam Davis wrote:
> I have a figure with a number of plots that analyze a source image. I
> wish to show the plots along side the image. Unfortunately whichever
> method I call last clobbers (leaves blank axes) for the previously
> called method.
>
> To illustrate:
>
> fig, axs = pylab.subplots(10, 4, sharex=True, sharey=True)
>
> for i in range(10):
>
> axs[i,0].plot(some_data)
> axs[i,1].plot(some_data)
> axs[i,2].plot(some_data)
>
> axs[i,3].imshow(some_image)
>
> #=====
>
> The above shows only the images in the fourth column. If, however, I
> call imshow() first, followed by the call to plot(), then only the plot
> axes appear and the images disappear.
>
> Is there a way to both plot and display images in the same figure?
I suspect the problem here is your sharex and sharey kwargs. Try 
leaving them out.
Eric
>
> -Adam
From: Adam D. <ada...@gm...> - 2011年09月04日 21:12:55
I have a figure with a number of plots that analyze a source image. I wish
to show the plots along side the image. Unfortunately whichever method I
call last clobbers (leaves blank axes) for the previously called method.
To illustrate:
fig, axs = pylab.subplots(10, 4, sharex=True, sharey=True)
for i in range(10):
 axs[i,0].plot(some_data)
 axs[i,1].plot(some_data)
 axs[i,2].plot(some_data)
axs[i,3].imshow(some_image)
#=====
The above shows only the images in the fourth column. If, however, I call
imshow() first, followed by the call to plot(), then only the plot axes
appear and the images disappear.
Is there a way to both plot and display images in the same figure?
-Adam
From: Neal B. <ndb...@gm...> - 2011年09月04日 14:40:41
surfcast23 wrote:
> 
> I am fairly new to programing and have a question regarding matplotlib. I
> wrote a python script that reads in data from the outfile of another program
> then prints out the data from one column.
> 
> f = open( 'myfile.txt','r')
> for line in f:
> if line != ' ':
> line = line.strip() # Strips end of line character
> columns = line.split() # Splits into coloumn
> mass = columns[8] # Column which contains mass values
> print(mass)
> 
> What I now need to do is have matplotlib take the values printed in 'mass'
> and plot number versus mean mass. I have read the documents on the
> matplotlib website, but they don't really address how to get data from a
> script(or I just did not see it) If anyone can point me to some
> documentation that explains how I do this it would be really appreciated.
> Thanks in advance
> 
What I always do, is in my script I pickle the parameters used to run the 
script, and the results. Usually I save a pair of dicts, one of the parameters, 
and one of the results.
Then to plot, just unpickle them and have at it.
From: Michiel de H. <mjl...@ya...> - 2011年09月04日 07:55:13
What happens if you use the MacOSX backend instead of TkAgg? Or do you have to use TkAgg?
--Michiel.
--- On Sun, 9/4/11, Lynn Oliver <ray...@gm...> wrote:
From: Lynn Oliver <ray...@gm...>
Subject: Re: [Matplotlib-users] problems installing matplotlib on OS X Lion
To: "Bryan K Woods" <bw...@ae...>
Cc: "mat...@li..." <mat...@li...>
Date: Sunday, September 4, 2011, 3:38 AM
Bryan, thanks for the response.
I installed macports and the environment settings seem to be correct, but when I try "port help selfupdate" I get:/opt/local/bin/port: line 4: /usr/bin/tclsh: No such file or directory/opt/local/bin/port: line 4: exec: /usr/bin/tclsh: cannot execute: No such file or directory
I removed the installation of Tcl 8.6 and reinstalled ActiveTcl 8.5.10, but still get the same warnings. 
Matplotlib is now complaining about the missing Tcl8.6:
ImportError: dlopen(/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/matplotlib/backends/_tkagg.so, 2): Library not loaded: /Library/Frameworks/Tcl.framework/Versions/8.6/Tcl. 
I am assuming that your unsuccessful install via macports was after you had macports working; do you know what version of Tcl was installed?
Macports fails with the same warnings after putting a link to tclsh8.5 in /usr/bin/tchsh.
I still seem to be running in circles.
Lynn
On Sep 3, 2011, at 10:46 PM, Bryan K Woods wrote:
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 macports2) then using easy_install to install matplotlib
Bryan K. Woods, Ph.D.Staff ScientistAtmospheric & Environmental Research, Inc...@ae...
On Sep 4, 2011, at 1:06 AM, Lynn Oliver <ray...@gm...> 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 callbackTraceback (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
Mat...@li...
https://lists.sourceforge.net/lists/listinfo/matplotlib-users
-----Inline Attachment Follows-----
------------------------------------------------------------------------------
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
-----Inline Attachment Follows-----
_______________________________________________
Matplotlib-users mailing list
Mat...@li...
https://lists.sourceforge.net/lists/listinfo/matplotlib-users
From: Michiel de H. <mjl...@ya...> - 2011年09月04日 07:55:09
What happens if you use the MacOSX backend instead of TkAgg? Or do you have to use TkAgg?
--Michiel.
--- On Sun, 9/4/11, Lynn Oliver <ray...@gm...> wrote:
From: Lynn Oliver <ray...@gm...>
Subject: Re: [Matplotlib-users] problems installing matplotlib on OS X Lion
To: "Bryan K Woods" <bw...@ae...>
Cc: "mat...@li..." <mat...@li...>
Date: Sunday, September 4, 2011, 3:38 AM
Bryan, thanks for the response.
I installed macports and the environment settings seem to be correct, but when I try "port help selfupdate" I get:/opt/local/bin/port: line 4: /usr/bin/tclsh: No such file or directory/opt/local/bin/port: line 4: exec: /usr/bin/tclsh: cannot execute: No such file or directory
I removed the installation of Tcl 8.6 and reinstalled ActiveTcl 8.5.10, but still get the same warnings. 
Matplotlib is now complaining about the missing Tcl8.6:
ImportError: dlopen(/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/matplotlib/backends/_tkagg.so, 2): Library not loaded: /Library/Frameworks/Tcl.framework/Versions/8.6/Tcl. 
I am assuming that your unsuccessful install via macports was after you had macports working; do you know what version of Tcl was installed?
Macports fails with the same warnings after putting a link to tclsh8.5 in /usr/bin/tchsh.
I still seem to be running in circles.
Lynn
On Sep 3, 2011, at 10:46 PM, Bryan K Woods wrote:
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 macports2) then using easy_install to install matplotlib
Bryan K. Woods, Ph.D.Staff ScientistAtmospheric & Environmental Research, Inc...@ae...
On Sep 4, 2011, at 1:06 AM, Lynn Oliver <ray...@gm...> 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 callbackTraceback (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
Mat...@li...
https://lists.sourceforge.net/lists/listinfo/matplotlib-users
-----Inline Attachment Follows-----
------------------------------------------------------------------------------
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
-----Inline Attachment Follows-----
_______________________________________________
Matplotlib-users mailing list
Mat...@li...
https://lists.sourceforge.net/lists/listinfo/matplotlib-users
From: Lynn O. <ray...@gm...> - 2011年09月04日 07:38:26
Bryan, thanks for the response.
I installed macports and the environment settings seem to be correct, but when I try "port help selfupdate" I get:
/opt/local/bin/port: line 4: /usr/bin/tclsh: No such file or directory
/opt/local/bin/port: line 4: exec: /usr/bin/tclsh: cannot execute: No such file or directory
I removed the installation of Tcl 8.6 and reinstalled ActiveTcl 8.5.10, but still get the same warnings. 
Matplotlib is now complaining about the missing Tcl8.6:
ImportError: dlopen(/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/matplotlib/backends/_tkagg.so, 2): Library not loaded: /Library/Frameworks/Tcl.framework/Versions/8.6/Tcl. 
I am assuming that your unsuccessful install via macports was after you had macports working; do you know what version of Tcl was installed?
Macports fails with the same warnings after putting a link to tclsh8.5 in /usr/bin/tchsh.
I still seem to be running in circles.
Lynn
On Sep 3, 2011, at 10:46 PM, Bryan K Woods wrote:
> 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.
> bw...@ae...
> 
> On Sep 4, 2011, at 1:06 AM, Lynn Oliver <ray...@gm...> 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
>> Mat...@li...
>> https://lists.sourceforge.net/lists/listinfo/matplotlib-users
From: Lynn O. <ray...@gm...> - 2011年09月04日 05:06:16
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
From: C M <cmp...@gm...> - 2011年09月04日 03:58:56
On Sat, Sep 3, 2011 at 7:32 PM, mdekauwe <mde...@gm...> 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
1 message has been excluded from this view by a project administrator.

Showing 10 results of 10

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.
Thanks for helping keep SourceForge clean.
X





Briefly describe the problem (required):
Upload screenshot of ad (required):
Select a file, or drag & drop file here.
Screenshot instructions:

Click URL instructions:
Right-click on the ad, choose "Copy Link", then paste here →
(This may not be possible with some types of ads)

More information about our ad policies

Ad destination/click URL:

AltStyle によって変換されたページ (->オリジナル) /