Re: [Matplotlib-users] Unable to make sequential calls to functions with create matplotlib graphs ... second gets jumbled

2010-08-09 Thread Rob Schneider

Eric,

thanks for follow-up! No, I didn't miss it.  Saw it Sunday night my time and 
spent time with my son getting him ready for start of university istead.

Re the setup of Python ... I will do that this week. 

Here's the code extract:

#!/usr/bin/env python
# −*− coding: UTF−8 −*−

import matplotlib
matplotlib.use('Agg') # before importing pyplot per docs
import matplotlib.pyplot as plt
import numpy as np

[snipped the import of Python and Django libraries]

###
def CreateAllWebSite():
# whichever of these is called first is done fine.  Second flawed.  calling 
one at at time, each works ok
CreateMemberStatCategoryFigure()
CreateMemberStatFigure()
###
def CreateMemberStatFigure():
"""
This function creates the member statistics bar chart that is published 
multiple locations.
"""

membertypes=Membertype.objects.filter(active=True).order_by('emailorder').exclude(typecode='EXEC')
mtypes=[]
barchartcolor=[]
mtypecodes=[]
for i in membertypes:
mtypecodes.append(i.typecode)
mtypes.append(i.description)
barchartcolor.append(i.barchartcolor)
memberstatsm=MemberStatistics.monthly_objects.all()
memberstatsp=MemberStatistics.monthlypivotbytype_objects.all()
for i in memberstatsm:
monthend=i['Date']

# this section in development. a more generic way; but can't get the calls 
to p=plt to work. 
# proably needs version 1.0 of Matplotlib or something.  As it works, 
optimise and fix later.
#print mtypes,mtypecodes,barchartcolor
#width=24
#month=[]
#for j in memberstatsp:
#month.append(None2Zero(j['month']))
#N=len(month)
#base=np.zeros(N,int)# start off the base with zeros
#for i in membertypes:
#array1=[]
#for j in memberstatsp:
#array1.append(None2Zero(j[i.typecode]))
#array1=np.array(array1)
#p=plt.bar(month,array1,width,bottom=base,linewidth=0)
#base=base+array1
#plt.yticks(np.arange(0,200,20))
#plt.title(ORG_NAME+' Membership by Month')
#plt.ylabel('Count')
#plt.show()
#return

#


corp1=[]
corp2=[]
corp3=[]
ordm=[]
ordr=[]
ordh=[]
month=[]
for i in memberstatsp:
month.append(None2Zero(i['month']))
corp1.append(None2Zero(i['CORP1']))
corp2.append(None2Zero(i['CORP2']))
corp3.append(None2Zero(i['CORP3']))
ordm.append(None2Zero(i['ORM']))
ordr.append(None2Zero(i['ORMR']))
ordh.append(None2Zero(i['HON']))
N=len(month)
corp1=np.array(corp1)
corp2=np.array(corp2)
corp3=np.array(corp3)
ordm=np.array(ordm)
ordr=np.array(ordr)
ordh=np.array(ordh)

base=np.zeros(N,int)
base1=base+ordh
base2=base1+corp3
base3=base2+corp2
base4=base3+corp1
base5=base4+ordm

width = 24# the width of the bars: can also be len(x) sequence

p1 = plt.bar(month, ordh, width, color=barchartcolor[0],linewidth=0)
p2 = plt.bar(month, corp3, width, 
color=barchartcolor[1],bottom=base1,linewidth=0)
p3 = plt.bar(month, corp2, width, 
color=barchartcolor[2],bottom=base2,linewidth=0)
p4 = plt.bar(month, corp1, width, 
color=barchartcolor[3],bottom=base3,linewidth=0)
p5 = plt.bar(month, ordm, width, 
color=barchartcolor[4],bottom=base4,linewidth=0)
p6 = plt.bar(month, ordr, width, 
color=barchartcolor[5],bottom=base5,linewidth=0)

plt.yticks(np.arange(0,200,20))
plt.title(ORG_NAME+' Membership by Month')
plt.ylabel('Count')
plt.legend( (p1[0], p2[0], p3[0], p4[0], p5[0], p6[0]),mtypes,loc='best') 
plt.show()

matplotlib.rcParams['figure.figsize']=(3,2)

fn=TEMP_DIR+SOC_MEMBER_STAT_BARCHART_FIGURE
print "CreateMemberStatFigure(): Saving ",fn,"..."
plt.savefig(fn)

return

###
def CreateMemberStatCategoryFigure():
"""
This function creates the member statistics category bar chart that is 
published multiple locations.
"""
dt=strftime("%d %B %Y", gmtime())
membercategories=Membercategory.objects.all()
mcats=[]
cnt=[]
for i in membercategories:
mcats.append(i.category)

cnt.append(Member.Active_objects.filter(membercategory__category=i.category).count())

xlocations = np.array(range(len(mcats)))+0.5

print mcats
print cnt
p1 = plt.bar(xlocations,cnt)
plt.figtext(0.15,0.85,dt)
plt.xticks(xlocations+0.4, mcats,rotation=17)
plt.title(ORG_NAME+' Membership by Member Category')
plt.ylabel('Count')
plt.show()

matplotlib.rcParams['figure.figsize']=(3,2)

fn=TEMP_DIR+SOC_MEMBER_STAT_BARCHART_CAT_FIGURE
print "CreateMemberStatCategoryFigure(): Saving ",fn,"..."
plt.savefig(fn)
print "CreateMemberStatCategoryFigure(): 
",SOC_MEMBER_

Re: [Matplotlib-users] Confusion Matrix

2010-08-09 Thread Friedrich Romstedt
2010/8/9 John Hunter :
> On Sun, Aug 8, 2010 at 8:03 PM, Friedrich Romstedt
>  wrote:
>> P.S.: You can also try
>> http://matplotlib.sourceforge.net/examples/pylab_examples/alignment_test.html
>> , I believe there was some other manual around also covering the
>> baseline option, but I cannot find it now.
>
> The "codex" option on the search page helps with this; you can easily
> search for "codex baseline"::
>
>  * the default  search page: http://matplotlib.sourceforge.net/search.html
>
>  * what is codex?:
> http://matplotlib.sourceforge.net/faq/howto_faq.html#search-examples
>
>  * an example using "codex baseline":
> http://matplotlib.sourceforge.net/search.html?q=codex+baseline

Thanks, that will be very useful.  Actually the page I was looking for was:

http://matplotlib.sourceforge.net/examples/pylab_examples/demo_text_rotation_mode.html?highlight=codex%20baseline

So far,
Friedrich

--
This SF.net email is sponsored by 

Make an app they can't live without
Enter the BlackBerry Developer Challenge
http://p.sf.net/sfu/RIM-dev2dev 
___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Re: [Matplotlib-users] installation of matplotlib on OS X 10.5 with python.org Python 2.6

2010-08-09 Thread Friedrich Romstedt
2010/8/7 Russell E. Owen :
> In article ,
>  Stephen T. 
>  wrote:
>
>> Hi, I am having trouble installing matplotlib. I have OS X 10.5 with Python
>> 2.6
>>  downloaded and installed from python.org.
>>  (10.5 came with Apple
>>  Python 2.5). I've also installed NumPy and SciPy for Python 2.6.
>
> I encourage you to try the matplotlib 1.0.0 binary installer. It was
> built to use the python.org Python (versions are available for Python
> 2.5 and 2.6; the latter did have a known problem with permissions on the
> icon files; you can fix that manually or a new installer with that
> problem fixed should be up now or shortly).

I agree trying that will be an option.

> Another option is to wade through the build instructions. I've got some
> here:
> 

Hmm, as I see it this instructions are for building a binary
distribution package of matplotlib, I think this is not what Stephen
wants?

Dear Stephen, did the mpl-1.0.0 thingy work for you, do you have
problems with the icon files, if yes, the instruction inspired by
Russell:

$ chmod -R a+r [wherever they're living]

will fix it I believe.  The -R option can be left alone when there is
only one level of file hierarchy to fix, but I'm not sure what
applies.

I really hope we don't have to go through the /opt stuff, because I'm
really unsure about how to fix this.  Maybe check your
$LD_LIBRARY_PATH or similar (I don't recall precisely), if it contains
the /opt stuff, we're happy, because it's easy to fix.  Say easier.  I
believe it will be a pain at all anyway.  Best would probably be to
start with a new, fresh and empty mpl build directory and to go
through each step with feedback from the list ... because I don't know
precisely what will happen.

Friedrich

P.S.: I've been busy the past few days, please excuse me.

--
This SF.net email is sponsored by 

Make an app they can't live without
Enter the BlackBerry Developer Challenge
http://p.sf.net/sfu/RIM-dev2dev 
___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


[Matplotlib-users] New subplots from 1.0 + shared axis

2010-08-09 Thread Filipe Fernandes
Hello list,

I enjoyed the new feature:
fig, axarr = plt.subplots(2, 2)

However, I failed to understand how to use the shared axis option with 
this new feature.

The docstring for sunplots has the "sharex(y) option", but my "ax" are 
being created now!? Is that a chicken and egg problem? Or I'm failing to 
understand the logic here.

Thanks, Filipe.

--
This SF.net email is sponsored by 

Make an app they can't live without
Enter the BlackBerry Developer Challenge
http://p.sf.net/sfu/RIM-dev2dev 
___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Re: [Matplotlib-users] installation of matplotlib on OS X 10.5 with python.org Python 2.6

2010-08-09 Thread Russell Owen
On Aug 9, 2010, at 8:17 AM, Friedrich Romstedt wrote:

> 2010/8/7 Russell E. Owen :
>> In article ,
>>  Stephen T. 
>>  wrote:
>>
>>> Hi, I am having trouble installing matplotlib. I have OS X 10.5  
>>> with Python
>>> 2.6
>>>  downloaded and installed from python.org.
>>>  (10.5 came with Apple
>>>  Python 2.5). I've also installed NumPy and SciPy for Python 2.6.
>>
>> I encourage you to try the matplotlib 1.0.0 binary installer. It was
>> built to use the python.org Python (versions are available for Python
>> 2.5 and 2.6; the latter did have a known problem with permissions  
>> on the
>> icon files; you can fix that manually or a new installer with that
>> problem fixed should be up now or shortly).
>
> I agree trying that will be an option.
>
>> Another option is to wade through the build instructions. I've got  
>> some
>> here:
>> > >
>
> Hmm, as I see it this instructions are for building a binary
> distribution package of matplotlib, I think this is not what Stephen
> wants?

The instructions are indeed geared towards building a binary  
installer, but the final result is a build, plus it is possible to  
weed out the installer-specific elements.

-- Russell


--
This SF.net email is sponsored by 

Make an app they can't live without
Enter the BlackBerry Developer Challenge
http://p.sf.net/sfu/RIM-dev2dev 
___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Re: [Matplotlib-users] New subplots from 1.0 + shared axis

2010-08-09 Thread Fernando Perez
On Mon, Aug 9, 2010 at 8:48 AM, Filipe Fernandes  wrote:
>
> The docstring for sunplots has the "sharex(y) option", but my "ax" are
> being created now!? Is that a chicken and egg problem? Or I'm failing to
> understand the logic here.

Don't worry: when you indicate that you want to share axes (x or y),
subplots() tracks that and enables it as it creates the axis objects.
Give it a try and see if it works :)

Cheers,

f

--
This SF.net email is sponsored by 

Make an app they can't live without
Enter the BlackBerry Developer Challenge
http://p.sf.net/sfu/RIM-dev2dev 
___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


[Matplotlib-users] matplotlib v1.0.0: mac installation issue

2010-08-09 Thread Antonino Cucchiara
Hello,
I am running a MacOS Snow leopard and I recently istalled the python 2.6 
via Enthought.
I wanted to upgrade the matplotlib 1.0 but when I run the .mpkg the 
installation don't start because
it seems not recognizing the python 2.6 is installed (I do have now 2.6.6).

Any suggestions?

Thanks,
Nino

-- 

Antonino Cucchiara, PhD
Postdoctoral Scholar
Lawrence Berkeley National Lab
UC Berkeley
website: www.astro.psu.edu/~cucchiara/


--
This SF.net email is sponsored by 

Make an app they can't live without
Enter the BlackBerry Developer Challenge
http://p.sf.net/sfu/RIM-dev2dev 
___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


[Matplotlib-users] GTk backend problem

2010-08-09 Thread Antonino Cucchiara

Hello,
I recently upgraded to Enthought python 2.6 an so I have now matplotlib 
0.99.3
My scripts now no longer seem to find the pyGTK since when I run them I 
got this message:


Traceback (most recent call last):
  File "./sed_plotb_v2.py", line 14, in 
from pylab import *
  File 
"/Library/Frameworks/Python.framework/Versions/6.2/lib/python2.6/site-packages/pylab.py", 
line 1, in 

from matplotlib.pylab import *
  File 
"/Library/Frameworks/Python.framework/Versions/6.2/lib/python2.6/site-packages/matplotlib/pylab.py", 
line 247, in 

from matplotlib.pyplot import *
  File 
"/Library/Frameworks/Python.framework/Versions/6.2/lib/python2.6/site-packages/matplotlib/pyplot.py", 
line 78, in 

new_figure_manager, draw_if_interactive, show = pylab_setup()
  File 
"/Library/Frameworks/Python.framework/Versions/6.2/lib/python2.6/site-packages/matplotlib/backends/__init__.py", 
line 25, in pylab_setup

globals(),locals(),[backend_name])
  File 
"/Library/Frameworks/Python.framework/Versions/6.2/lib/python2.6/site-packages/matplotlib/backends/backend_gtkagg.py", 
line 10, in 
from matplotlib.backends.backend_gtk import gtk, FigureManagerGTK, 
FigureCanvasGTK,\
  File 
"/Library/Frameworks/Python.framework/Versions/6.2/lib/python2.6/site-packages/matplotlib/backends/backend_gtk.py", 
line 11, in 

raise ImportError("Gtk* backend requires pygtk to be installed.")
ImportError: Gtk* backend requires pygtk to be installed.


is any way to help matplotlib to point the where pyGTK is or go around 
the problem with another backend?


Thanks,
Nino Hello,
I recently upgraded to Enthought python 2.6 an so I have now matplotlib 
0.99.3
My scripts now no longer seem to find the pyGTK since when I run them I 
got this message:


Traceback (most recent call last):
  File "./sed_plotb_v2.py", line 14, in 
from pylab import *
  File 
"/Library/Frameworks/Python.framework/Versions/6.2/lib/python2.6/site-packages/pylab.py", 
line 1, in 

from matplotlib.pylab import *
  File 
"/Library/Frameworks/Python.framework/Versions/6.2/lib/python2.6/site-packages/matplotlib/pylab.py", 
line 247, in 

from matplotlib.pyplot import *
  File 
"/Library/Frameworks/Python.framework/Versions/6.2/lib/python2.6/site-packages/matplotlib/pyplot.py", 
line 78, in 

new_figure_manager, draw_if_interactive, show = pylab_setup()
  File 
"/Library/Frameworks/Python.framework/Versions/6.2/lib/python2.6/site-packages/matplotlib/backends/__init__.py", 
line 25, in pylab_setup

globals(),locals(),[backend_name])
  File 
"/Library/Frameworks/Python.framework/Versions/6.2/lib/python2.6/site-packages/matplotlib/backends/backend_gtkagg.py", 
line 10, in 
from matplotlib.backends.backend_gtk import gtk, FigureManagerGTK, 
FigureCanvasGTK,\
  File 
"/Library/Frameworks/Python.framework/Versions/6.2/lib/python2.6/site-packages/matplotlib/backends/backend_gtk.py", 
line 11, in 

raise ImportError("Gtk* backend requires pygtk to be installed.")
ImportError: Gtk* backend requires pygtk to be installed.


is any way to help matplotlib to point the where pyGTK is or go around 
the problem with another backend?

Changing the matplotlibrc to TKAgg works fine though.

Thanks,
Nino

--

Antonino Cucchiara, PhD
Postdoctoral Scholar
Lawrence Berkeley National Lab
UC Berkeley
website: www.astro.psu.edu/~cucchiara/

--
This SF.net email is sponsored by 

Make an app they can't live without
Enter the BlackBerry Developer Challenge
http://p.sf.net/sfu/RIM-dev2dev ___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


[Matplotlib-users] Stickplot (quiver) at the gallery

2010-08-09 Thread Filipe Fernandes
Hello list,

Some time ago Stephane Raynaud answered my question on how to produce a 
stickplot using quiver:

http://www.mail-archive.com/matplotlib-users@lists.sourceforge.net/msg15314.html

Since then, I have been forwarding that to several people interested in 
producing such a plot.

Maybe it is a good idea to add an example at the Gallery with the quiver 
as "stickplot"? Or it is too obvious?

Anyway, here is my suggestion:

# -*- coding: utf-8 -*-
""" Stephane Raynaud """
import matplotlib.pyplot as plt
import numpy as np
import datetime as dtime
from matplotlib.dates import date2num

""" fake dates starting now """
x = np.arange(100, 110, 0.1)
start = dtime.datetime.now()
dates = [start + dtime.timedelta(days=n) for n in range(len(x))]
""" dummy u, v """
u = np.sin(x)
v = np.cos(x)

fig, ax = plt.subplots(1, 1, figsize=(16,6))
qiv = ax.quiver(date2num(dates), [[0]*len(x)], u, v, headlength=0, 
headwidth=0, headaxislength=0 )
key = ax.quiverkey(qiv, 0.25, 0.75, 0.5, "0.5 N m$^{-2}$", labelpos='N', 
coordinates='axes' )
plt.setp( ax.get_yticklabels(), visible=False)
plt.gca().xaxis_date()
plt.show()

--
This SF.net email is sponsored by 

Make an app they can't live without
Enter the BlackBerry Developer Challenge
http://p.sf.net/sfu/RIM-dev2dev 
___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Re: [Matplotlib-users] New subplots from 1.0 + shared axis

2010-08-09 Thread Filipe Pires Alvarenga Fernandes
On Mon, Aug 9, 2010 at 12:22, Fernando Perez  wrote:
> On Mon, Aug 9, 2010 at 8:48 AM, Filipe Fernandes  wrote:
>>
>> The docstring for sunplots has the "sharex(y) option", but my "ax" are
>> being created now!? Is that a chicken and egg problem? Or I'm failing to
>> understand the logic here.
>
> Don't worry: when you indicate that you want to share axes (x or y),
> subplots() tracks that and enables it as it creates the axis objects.
> Give it a try and see if it works :)
>
> Cheers,
>
> f
>


Great, just now I realized that the option is sharex(y)=True/False and
no longer sharex=ax1.
It sacrifice a more fine control, but simplify the processes for the
majority of the plots that I produce.

Thanks!

--
This SF.net email is sponsored by 

Make an app they can't live without
Enter the BlackBerry Developer Challenge
http://p.sf.net/sfu/RIM-dev2dev 
___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Re: [Matplotlib-users] New subplots from 1.0 + shared axis

2010-08-09 Thread Fernando Perez
On Mon, Aug 9, 2010 at 11:49 AM, Filipe Pires Alvarenga Fernandes
 wrote:
>
> It sacrifice a more fine control, but simplify the processes for the
> majority of the plots that I produce.

Yes, that was the idea.  We figured that if you need very fine-grained
control over axis sharing in complex ways, you're probably OK using
the manual API.  But for the vast majority of users this seemed like a
decent solution.

It could in the long run be extended to allow passing of a list of
axis indices to activate sharing for x/y on, though.  Patches welcome
:)

Cheers,

f

--
This SF.net email is sponsored by 

Make an app they can't live without
Enter the BlackBerry Developer Challenge
http://p.sf.net/sfu/RIM-dev2dev 
___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Re: [Matplotlib-users] Problem getting math symbols into text

2010-08-09 Thread Michael Hannon




- Original Message 
> From: Michael Droettboom 
> To: Michael Hannon ; 
>matplotlib-users@lists.sourceforge.net
> Sent: Thu, August 5, 2010 6:24:58 AM
> Subject: Re: [Matplotlib-users] Problem getting math symbols into text

> It looks like you're configured for the STIX fonts (the rcParam
> mathtext.fontset = stix), but they are not installed on your system.
> 
> Do you have the file "STIXGeneral.ttf" on your system?  Perhaps you need to
> install an additional package.

Hi, Mike.  I've thrashed around a bit more with this.  It appears that if I
use the matplotlib from Fedora 13 (version 0.99) I get the correct behavior
for math text if I also install the stix* packages AND set
rcParams[mathtext.fontset] to "stix".  (There are four stix packages in Fedora
13, all small, and I just installed all of them, so I don't know what the
minimum requirement is).

I also got the appropriate math text when I installed the latest matplotlib
from source and used all the default settings.  I've now reverted to the
standard Fedora packages and stix, so I can't easily compare the two sets of
rcParams.

Thanks for your help.

-- Mike


  

--
This SF.net email is sponsored by 

Make an app they can't live without
Enter the BlackBerry Developer Challenge
http://p.sf.net/sfu/RIM-dev2dev 
___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Re: [Matplotlib-users] Win7. Why Don't Matplotlib, ... Show up in Control Panel Add-Remove?

2010-08-09 Thread Friedrich Romstedt
2010/8/9 Wayne Watson :
> See Subject. I use matplotlib, scipy, numpy and possibly one other
> module. If I go to the control panel, I only see numpy listed. Why? I
> use a search and find only numpy and Python itself. How can matplotlib
> and scipy be uninstalled?

I think it should suffice to delete the:
-  matplotlib
-  mpl_toolkits
-  and scipy (for scipy I don't know if there are more packages)
directories from C:\Python\Lib\site-packages.  There is no more the
uninstaller can do.  Sometimes the packages also place a RemoveXXX.exe
in the Python toplevel directory, but since it doesn't show up in the
registry, I think this will not work.  When your registry is clean, if
I really would like to finally get "rid" of it, I would delete if it
were my own machine.

But I also would not like to "uninstall", but rather "hide", i.e., you
can rename it to some sensible name, e.g. matplotlib ->
matplotlib-10-08-09.  Then you can reinstall the library with another
version without interference, and the files are not lost until the
installation is working finally.

Finally, there may be some matplotlib-blahblahblah.egg-info and
scipy-foobar.egg-info files in site-packages, where I don't know what
they do precisely.  They are just plain text files, containing
meta-data about the package installed.

Friedrich

--
This SF.net email is sponsored by 

Make an app they can't live without
Enter the BlackBerry Developer Challenge
http://p.sf.net/sfu/RIM-dev2dev 
___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Re: [Matplotlib-users] Building matplotlib from source with libpng (png.h) installed via fink on Mac OS X

2010-08-09 Thread Friedrich Romstedt
2010/8/9 Markus Baden :
> On my Macbook Pro I use Python 2.6 as provided by the Enthought Python
> Distribution. I ran into some problem with Axes3D so I decided to
> upgrade to the latest version from source. While trying that I got a
> similiar error message as discussed in
>
> http://www.mail-archive.com/matplotlib-users@lists.sourceforge.net/msg12938.html
>
> i.e. error: png.h: No such file or directory
>
> In short matplotlib could not find libpng (or png.h from that). I had
> libpng installed via fink in the usual place /sw/include etc. This
> seems to be a quite natural choice, so I wondered why matplotlib does
> not find that out of the box. Following the tips in the above post I
> looked at basedir in setupext.py For some reason the basedirs for
> darwin where commented out. Uncommenting the basedirs did the trick
> for me [1] and matplotlib happily installed with the libpng from fink.
>
> Hope this will help other mac users. Thanks for the great work on
> matplotlib!

Thanks for reporting finally a working pure-setup.py installation!

But are you sure it really works, because mixing binary-distributed
and self-compiled packages often leads to import refusal, when the
external libraries (as freetype) are compiled with a different
compiler than Python.

Friedrich

--
This SF.net email is sponsored by 

Make an app they can't live without
Enter the BlackBerry Developer Challenge
http://p.sf.net/sfu/RIM-dev2dev 
___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Re: [Matplotlib-users] Sequential calls to functions to draw graphs results in flawed graphs on second call.

2010-08-09 Thread Friedrich Romstedt
2010/8/8 Rob Schneider :
> Running 0.98.5.3
> (would upgrade to 1.0 but having trouble installing it on Mac OS X as it 
> doesn't appear to like the version of Python Apple provides).

What's your problem with 1.0?

Friedrich

--
This SF.net email is sponsored by 

Make an app they can't live without
Enter the BlackBerry Developer Challenge
http://p.sf.net/sfu/RIM-dev2dev 
___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Re: [Matplotlib-users] GTk backend problem

2010-08-09 Thread Friedrich Romstedt
2010/8/9 Antonino Cucchiara :
> Hello,
> I recently upgraded to Enthought python 2.6 an so I have now matplotlib
> 0.99.3
> My scripts now no longer seem to find the pyGTK since when I run them I got
> this message:
>
> [...]

Where was your original pygtk installed, and what was your previous
Python version (and installation location, if you can provide)?  I
think pygtk is compiled against Python, so it cannot be simply copied
over.  How did you install pyGTK before?

Friedrich

--
This SF.net email is sponsored by 

Make an app they can't live without
Enter the BlackBerry Developer Challenge
http://p.sf.net/sfu/RIM-dev2dev 
___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Re: [Matplotlib-users] Building matplotlib from source with libpng (png.h) installed via fink on Mac OS X

2010-08-09 Thread Markus Baden

On Aug 10, 2010, at 5:34 AM, Friedrich Romstedt wrote:

> 2010/8/9 Markus Baden :
>> On my Macbook Pro I use Python 2.6 as provided by the Enthought  
>> Python
>> Distribution. I ran into some problem with Axes3D so I decided to
>> upgrade to the latest version from source. While trying that I got a
>> similiar error message as discussed in
>>
>> http://www.mail-archive.com/matplotlib-users@lists.sourceforge.net/msg12938.html
>>
>> i.e. error: png.h: No such file or directory
>>
>> In short matplotlib could not find libpng (or png.h from that). I had
>> libpng installed via fink in the usual place /sw/include etc. This
>> seems to be a quite natural choice, so I wondered why matplotlib does
>> not find that out of the box. Following the tips in the above post I
>> looked at basedir in setupext.py For some reason the basedirs for
>> darwin where commented out. Uncommenting the basedirs did the trick
>> for me [1] and matplotlib happily installed with the libpng from  
>> fink.
>>
>> Hope this will help other mac users. Thanks for the great work on
>> matplotlib!
>
> Thanks for reporting finally a working pure-setup.py installation!
>
> But are you sure it really works, because mixing binary-distributed
> and self-compiled packages often leads to import refusal, when the
> external libraries (as freetype) are compiled with a different
> compiler than Python.

Thanks for the warning. Not really sure. So far I have seen no  
problems, i.e. can happily plot. How can I make sure that I don't ran  
into those problems? I usually don't mix packages and just hope that  
the EPD guys update to Matplotlib 1.0 soon.

Markus


--
This SF.net email is sponsored by 

Make an app they can't live without
Enter the BlackBerry Developer Challenge
http://p.sf.net/sfu/RIM-dev2dev 
___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users