[Matplotlib-users] problem using subplots with ion()

2009-07-16 Thread Louise Loudermilk
Hi.  I am trying to output multiple 2D graphs (subplots) in one figure
(using pylab) for each time-step that the python code runs - basically an
interactive graphs.  We use the 'ion()' and 'imshow()' functions for this.
I have many graphs to chose from, but say if I chose 4 graphs to output, all
4 will output for the 1st time step, but for every additional time step only
the last graph will update.  The first 3 will remain the same, as they were
in the 1st time step.  Has anyone has this problem?  Any suggestions?

A portion of the O-O code is below.  This function is called in another
file. I tried to add notes where I thought they were helpful.

def multi_display(self, n=4):

''' displaying multiple graphs '''

ion()
m = self.displayed_multi # four input graph names (provided when
function is called)
nsub = n  # no. of subgraphs/time step

for i in range(nsub): # for each subplot

p = i +1
exec ("self.subplot" + str(p) + " = subplot(2, 2, p)")   # OR
subplot(2,2,p)

self.displayed = m[i]
self.display_stand()   # this calls the function below  with
'self.displayed' in it.

def display_stand(self): # displays individual graphs

if self.displayed == 'ht': # this is only one of the four graphs (or
subplots)

vm = 0.0
vx = 40.0
t = 'Height (m)'
imshow(self.old_ht, vmin = vm, vmax = vx,
   interpolation = 'nearest')
title(t)

Thanks,
Louise
--
Enter the BlackBerry Developer Challenge  
This is your chance to win up to $100,000 in prizes! For a limited time, 
vendors submitting new applications to BlackBerry App World(TM) will have
the opportunity to enter the BlackBerry Developer Challenge. See full prize  
details at: http://p.sf.net/sfu/Challenge___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


[Matplotlib-users] Problems with GTK2 on win32 system

2009-07-16 Thread Domenico Nappo
Hi all,

I've installed environment following this installation instructions:
http://matplotlib.sourceforge.net/users/installing.html

I had already installed GTK 2 and PyGTK the day before (the most recent
versions) and then installed last version of numpy, matplotlib and ipython.
Everything was ok but when I tried a sample script I've found out that the
module _backend_gdk was missing.

The script failed on this import:
from matplotlib.backends.backend_gtk import FigureCanvasGTK as FigureCanvas

due a missing module that backend_gdk (imported by backend_gtk) tries to
import.
The missing module is _backend_gdk.

I commented that import statement (used to import pixbuf_get_pixels_array)
and the sample script run without any problems.

However, I guess that I need _backend_gdk module and something went wrong
during installation.

Can you help me in solving this issue? I did a googling but it seems that
few others have this problem (since most of users use linux, perhaps) and no
solution was reported.

Thanks in advance!

PS: python version is 2.5 so I installed all py2.5 of libs above.

-- 
DN
--
Enter the BlackBerry Developer Challenge  
This is your chance to win up to $100,000 in prizes! For a limited time, 
vendors submitting new applications to BlackBerry App World(TM) will have
the opportunity to enter the BlackBerry Developer Challenge. See full prize  
details at: http://p.sf.net/sfu/Challenge___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Re: [Matplotlib-users] centering axis ticks labels

2009-07-16 Thread Johann Cohen-Tanugi
hi there, I stumbled into yet another problem, see script attached. Now 
there are 10 pixels and 10 label values on each axis, but I get only 
half the ticks, and as a result half the labels get discarded... How can 
I specify the number of ticks it uses?
Note that I could use plt.pcolor(np.array(EMINS),np.array(ROIS),d) and 
at least the labelling would be correct, but the pixels are now more or 
less wide depending on the interval between values, which was not 
intended


thanks a lot in advance for your help,
Johann

Johann Cohen-Tanugi wrote:
Hello, how can I center axis tick labels, so that the labels ends up at 
the center between 2 ticks.


thanks in advance,
Johann

--
Enter the BlackBerry Developer Challenge  
This is your chance to win up to $100,000 in prizes! For a limited time, 
vendors submitting new applications to BlackBerry App World(TM) will have
the opportunity to enter the BlackBerry Developer Challenge. See full prize  
details at: http://p.sf.net/sfu/Challenge

___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users
  
import matplotlib.pyplot as plt
import numpy as np


d = np.array([[ 157.95277364,  153.43173695,  146.13158977,  141.54839658,
 144.52643315,  124.31540514,  121.25041319,   94.97418322,
  64.74824341,   27.69885997],
   [ 166.42505119,  161.6584763 ,  152.96285478,  149.94707942,
 148.95740797,  135.38872561,  131.60396144,  104.24714341,
  69.36953504,   28.22984027],
   [ 180.18354975,  175.80862266,  163.19215239,  161.79956642,
 157.49777483,  143.04049195,  144.89181555,  116.46328816,
  84.029379  ,   31.41834047],
   [ 189.67039827,  186.61746661,  177.39989771,  178.12248221,
 172.37834168,  152.80223899,  164.45528247,  141.6235974 ,
 115.46930152,   61.55211961],
   [ 157.09501131,  154.46700398,  145.35801984,  151.56479068,
 141.09453561,  130.09545669,  135.6759625 ,  120.79901256,
  98.09147933,   59.62847031],
   [ 141.05859093,  137.90739078,  128.05909052,  136.6963394 ,
 134.19701193,  129.56047371,  131.74742858,  119.75074075,
  98.92957831,   68.68764481],
   [ 125.13744117,  123.38731079,  123.93182985,  126.59952041,
 127.12588879,  124.92796151,  132.8109024 ,  133.95243655,
 121.58352334,   99.01494134],
   [  82.49855115,   82.5109548 ,   83.65697445,   85.33888768,
  83.28319399,   83.81724338,   93.04441865,   91.65137654,
  86.05573836,   75.8860952 ],
   [  55.3082678 ,   56.98568928,   54.49724808,   52.80536213,
  52.41055057,   56.78071926,   62.01649764,   65.72762368,
  56.78034563,   53.16029942],
   [  23.8194714 ,   24.16684446,   22.86100321,   23.87513858,
  22.2958795 ,   27.16573087,   28.94610545,   38.55528517,
  43.05176998,   41.46975149]])

ROIS=[1.0,0.9,0.8,0.7,0.6,0.5,0.4,0.3,0.2,0.1]
EMINS=[100,125,150,175,200,250,300,500,700,1000]
fig = plt.figure()
ax = fig.add_subplot(111)
plt.pcolor(d)
ax.set_xticklabels(EMINS)
plt.xlabel("Emin(MeV)")
ax.set_yticklabels(ROIS)
plt.ylabel("Roi(deg)")
plt.colorbar()
--
Enter the BlackBerry Developer Challenge  
This is your chance to win up to $100,000 in prizes! For a limited time, 
vendors submitting new applications to BlackBerry App World(TM) will have
the opportunity to enter the BlackBerry Developer Challenge. See full prize  
details at: http://p.sf.net/sfu/Challenge___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Re: [Matplotlib-users] Cannot build matplot on OS X: libfreetype.dylib and libiconv.2.dylib are not of the right architecture

2009-07-16 Thread Michael Lerner
Hi all,

I tried this again with a clean checkout from svn:

svn co
https://matplotlib.svn.sourceforge.net/svnroot/matplotlib/trunk/matplotlibmatplotlib
(checks out revision 7262)
cd matplotlib/release/osx/
unset PKG_CONFIG_PATH
make fetch_deps
cd bdist_mpkg-0.4.3
sudo python setup.py install
cd ..
make dependencies
cd ../..
python setup.py sdist
mv dist/matplotlib-0.98.6svn.tar.gz release/osx/
cd release/osx



make installers

and it fails. Here are the last couple of lines:

g++ -arch i386 -arch ppc -isysroot /Developer/SDKs/MacOSX10.4u.sdk -g
-L/usr/local/lib -L/Library/Frameworks/Python.framework/Versions/4.3.0/lib
-bundle -undefined dynamic_lookup -arch ppc -arch i386
-L/Users/mglerner/src/matplotlib/release/osx/zlib-1.2.3
-L/Users/mglerner/src/matplotlib/release/osx/libpng-1.2.33
-L/Users/mglerner/src/matplotlib/release/osx/freetype-2.3.7 -Os -arch ppc
-arch i386 -I/Users/mglerner/src/matplotlib/release/osx/zlib-1.2.3
-I/Users/mglerner/src/matplotlib/release/osx/libpng-1.2.33
-I/Users/mglerner/src/matplotlib/release/osx/freetype-2.3.7/include
build/temp.macosx-10.3-fat-2.5/src/ft2font.o
build/temp.macosx-10.3-fat-2.5/src/mplutils.o
build/temp.macosx-10.3-fat-2.5/CXX/cxx_extensions.o
build/temp.macosx-10.3-fat-2.5/CXX/cxxsupport.o
build/temp.macosx-10.3-fat-2.5/CXX/IndirectPythonInterface.o
build/temp.macosx-10.3-fat-2.5/CXX/cxxextensions.o -L/usr/local/lib
-L/usr/lib -L/usr/X11R6/lib -lfreetype -lz -lstdc++ -lm -o
build/lib.macosx-10.3-fat-2.5/matplotlib/ft2font.so
ld warning: in
/Developer/SDKs/MacOSX10.4u.sdk/Library/Frameworks/Python.framework/Versions/4.3.0/lib/libz.dylib,
file is not of required architecture
ld warning: in
/Developer/SDKs/MacOSX10.4u.sdk/usr/local/lib/libgcc_s.10.4.dylib, missing
required architecture ppc in file
ld: in
/Developer/SDKs/MacOSX10.4u.sdk/Library/Frameworks/Python.framework/Versions/4.3.0/lib/libz.1.dylib,
file is not of required architecture for architecture ppc
collect2: ld returned 1 exit status
lipo: can't open input file:
/var/folders/mr/mrDdnQgUEQWRcRe-wF1uFE+++TI/-Tmp-//ccAjnLEy.out (No such
file or directory)
error: command 'g++' failed with exit status 1
make: *** [installers] Error 1
laptop-36:osx mglerner$

as I mentioned before, I'm not intimately familiar with the OS X build
process, but I'd be happy to provide additional information/testing.

Thanks,

-michael

On Sat, Jul 11, 2009 at 4:31 PM, Michael Lerner  wrote:

>
>
> On Sat, Jul 11, 2009 at 9:05 AM, John Hunter  wrote:
>
>>
>> It looks like there is an incompatibility with the freetype supplied
>> in /sw (probably fink supplied).  Perhaps it is not configured as a
>> universal binary.
>>
>> You can build mpl from svn the way we do when we make a release, which
>> will automatically fetch and build the dependencies correctly.  First
>> see,
>>
>>
>> http://matplotlib.sourceforge.net/faq/installing_faq.html#which-python-for-osx
>>
>> then grab a copy of mpl from svn
>>
>>  http://matplotlib.sourceforge.net/faq/installing_faq.html#install-svn
>>
>> and cd into the releases/osx directory and follow the instructions in
>> the README there.
>>
>
> Hi,
>
> I get the same errors when I follow those instructions. I have a very new
> 17" MacBook Pro running 10.5.7. I've installed the Enthought Python
> Distribution. These commands worked correctly:
>
> unset PKG_CONFIG_PATH
> make fetch_deps
> cd bdist_mpkg-0.4.3
> sudo python setup.py install
> cd ..
> make dependencies
> cd ../..
> python setup.py sdist
> mv dist/matplotlib-0.98.6svn.tar.gz release/osx/
> cd release/osx
>
> I then edit the Makefile and change
>
> MPLVERSION=0.98.5.3
>
> to
>
> MPLVERSION=0.98.6svn
>
> but the next command,
>
> make installers
>
> produces the error:
>
> ... < blah blah untarring > ...
>
> 
> BUILDING MATPLOTLIB
> matplotlib: 0.98.6svn
> python: 2.5.4 |EPD_Py25 4.3.0| (r254:67916, May 17 2009,
> 20:07:12)  [GCC 4.0.1 (Apple Computer, Inc. build
> 5370)]
>   platform: darwin
>
> REQUIRED DEPENDENCIES
>  numpy: 1.3.0
>  freetype2: found, but unknown version (no pkg-config)
>
> OPTIONAL BACKEND DEPENDENCIES
> libpng: found, but unknown version (no pkg-config)
>Tkinter: Tkinter: 67737, Tk: 8.4, Tcl: 8.4
>   wxPython: 2.8.7.1
> * WxAgg extension not required for wxPython >= 2.8
>   Gtk+: no
> * Building for Gtk+ requires pygtk; you must be
> able
> * to "import gtk" in your build/install environment
>Mac OS X native: yes
> Qt: no
>Qt4: no
>  Cairo: no
>
> OPTIONAL DATE/TIMEZONE DEPENDENCIES
>   datetime: present, version unknown
>   dateutil: matplotlib will provide
>   

[Matplotlib-users] Problems with autofmt_xdate()

2009-07-16 Thread Domenico Nappo
Whenever I try to use autofmt_xdate() on a Figure(), dates on x axis
disappear...I guess this is related with something concerning font
management...
Anyone experienced this kind of issues?

I use most recent versions of matplotlib, numpy, gtk2, pygtk on a Python 2.5
platform (installed via binaries on a window xp machine).
--
Enter the BlackBerry Developer Challenge  
This is your chance to win up to $100,000 in prizes! For a limited time, 
vendors submitting new applications to BlackBerry App World(TM) will have
the opportunity to enter the BlackBerry Developer Challenge. See full prize  
details at: http://p.sf.net/sfu/Challenge___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Re: [Matplotlib-users] strange contour plot

2009-07-16 Thread Michael Droettboom
You might be running into one of the path simplification bugs in the 
0.98.x series.  Have you tried with the rcParam path.simplify turned 
off?  If you can sent me a self contained script and data off-list, I 
can test this against the SVN version to see if this has already been 
addressed.

Cheers,
Mike

Jeffrey Fogel wrote:
> I'm having a strange problem with my contour plots and I'm hoping 
> someone here will be able to help.  I had a dataset that was plotting 
> fine until I decided I wanted to create plots with the data mirrored 
> over the x-axis.  This seems to work fine most of the time, but every 
> now and then I get a plot that seems to just ignore a couple of data 
> points when creating the contours.  I've attached a plot of what I 
> mean.  Looking at the arrays the contour plot is created from doesn't 
> show any obvious problems (there are values there that should be 
> plotted).  It's very strange, any ideas?
>
> matplotlib 0.98.5.2
> numpy 1.2.1
> python 2.5.1
>
> -Jeffrey
> 
>
> 
>
> --
> Enter the BlackBerry Developer Challenge  
> This is your chance to win up to $100,000 in prizes! For a limited time, 
> vendors submitting new applications to BlackBerry App World(TM) will have
> the opportunity to enter the BlackBerry Developer Challenge. See full prize  
> details at: http://p.sf.net/sfu/Challenge
> 
>
> ___
> Matplotlib-users mailing list
> Matplotlib-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/matplotlib-users
>   

-- 
Michael Droettboom
Science Software Branch
Operations and Engineering Division
Space Telescope Science Institute
Operated by AURA for NASA


--
Enter the BlackBerry Developer Challenge  
This is your chance to win up to $100,000 in prizes! For a limited time, 
vendors submitting new applications to BlackBerry App World(TM) will have
the opportunity to enter the BlackBerry Developer Challenge. See full prize  
details at: http://p.sf.net/sfu/Challenge
___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Re: [Matplotlib-users] strange contour plot

2009-07-16 Thread Michael Droettboom
It looks like this bug has been fixed on the SVN trunk.  Unfortunately, 
these changes were pretty major surgery, so they don't easily apply to 
0.98.5.x.  Unfortunately, for the time being, it looks like you'll need 
to wait until the next release, or compile matplotlib from SVN 
yourself.  I haven't heard any concrete plans about the next release yet.

Cheers,
Mike

Jeffrey Fogel wrote:
> I haven't tried that as I didn't realize there was an issue there.  
> I'm fairly new to matplotlib and am definitely still learning how to 
> use it.  Thanks for your help with this, I've attached 3 data files 
> and the test script.  Please let me know what you find (and feel free 
> to comment on the code if there is an easier way to do something). 
>
> -Jeffrey
>
> On Thu, Jul 16, 2009 at 12:00 PM, Michael Droettboom  > wrote:
>
> You might be running into one of the path simplification bugs in
> the 0.98.x series.  Have you tried with the rcParam path.simplify
> turned off?  If you can sent me a self contained script and data
> off-list, I can test this against the SVN version to see if this
> has already been addressed.
>
> Cheers,
> Mike
>
> Jeffrey Fogel wrote:
>
> I'm having a strange problem with my contour plots and I'm
> hoping someone here will be able to help.  I had a dataset
> that was plotting fine until I decided I wanted to create
> plots with the data mirrored over the x-axis.  This seems to
> work fine most of the time, but every now and then I get a
> plot that seems to just ignore a couple of data points when
> creating the contours.  I've attached a plot of what I mean.
>  Looking at the arrays the contour plot is created from
> doesn't show any obvious problems (there are values there that
> should be plotted).  It's very strange, any ideas?
>
> matplotlib 0.98.5.2
> numpy 1.2.1
> python 2.5.1
>
> -Jeffrey
> 
> 
>
> 
> 
>
> 
> --
> Enter the BlackBerry Developer Challenge  This is your chance
> to win up to $100,000 in prizes! For a limited time, vendors
> submitting new applications to BlackBerry App World(TM) will have
> the opportunity to enter the BlackBerry Developer Challenge.
> See full prize  details at: http://p.sf.net/sfu/Challenge
> 
> 
>
> ___
> Matplotlib-users mailing list
> Matplotlib-users@lists.sourceforge.net
> 
> https://lists.sourceforge.net/lists/listinfo/matplotlib-users
>  
>
>
> -- 
> Michael Droettboom
> Science Software Branch
> Operations and Engineering Division
> Space Telescope Science Institute
> Operated by AURA for NASA
>
>

-- 
Michael Droettboom
Science Software Branch
Operations and Engineering Division
Space Telescope Science Institute
Operated by AURA for NASA


--
Enter the BlackBerry Developer Challenge  
This is your chance to win up to $100,000 in prizes! For a limited time, 
vendors submitting new applications to BlackBerry App World(TM) will have
the opportunity to enter the BlackBerry Developer Challenge. See full prize  
details at: http://p.sf.net/sfu/Challenge
___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Re: [Matplotlib-users] dynamically add subplots to figure

2009-07-16 Thread Tom Vaughan
On Tue, Jun 2, 2009 at 07:33, John Hunter wrote:
> On Tue, Jun 2, 2009 at 9:03 AM, Tom Vaughan  wrote:
>> Is it possible to add subplots to a figure if I don't know in advance
>> how many subplots I need to add?
>>
>> What I do now is I call add_subplot like add_subplot(i, 1, i) where i
>> is 1 initially, and just increases by 1 on each call. This almost
>> works. Except the first plot takes up the whole figure, the second
>> plot is placed on top of the bottom half of the first plot, etc. Is
>> there a way to "resize" the plots when a subplot is added? Or how
>> would I "re-plot" the previous subplots?
>
> See the Axes.change_geometry command
>
>  http://matplotlib.sourceforge.net/api/axes_api.html#matplotlib.axes.SubplotBase.change_geometry

twinx() does not return an axes that contains the change_geometry
method. How then can I do the equivalent on this axes? Calling twinx()
again on the original axes after change_geometry() has been called
does not do the trick. Thanks.

-Tom

--
Enter the BlackBerry Developer Challenge  
This is your chance to win up to $100,000 in prizes! For a limited time, 
vendors submitting new applications to BlackBerry App World(TM) will have
the opportunity to enter the BlackBerry Developer Challenge. See full prize  
details at: http://p.sf.net/sfu/Challenge
___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


[Matplotlib-users] [OT] Question about the SVN repo

2009-07-16 Thread Gökhan SEVER
Hello,

I have a little of the topic question. We have a project (
http://sourceforge.net/projects/adpaa/) setup in SF using the CVS.

There when I look at the code submit logs: for instance:

gsever  committed patchset
219of module src
to the Airborne
Data Processing and Analysis  CVS

when I click the patchset link it transfers me into the main src folder not
directly to the modified file as in matplotlib's :

heeres  committed revision
7260to
the
matplotlib  SVN repository,
changing 1 files

here revision nicely transfers me into the right place. So that I can follow
changes easily.

Is this an SVN feature or should we enable something somewhere in the
project proterties?

Thank.

-- 
Gökhan
--
Enter the BlackBerry Developer Challenge  
This is your chance to win up to $100,000 in prizes! For a limited time, 
vendors submitting new applications to BlackBerry App World(TM) will have
the opportunity to enter the BlackBerry Developer Challenge. See full prize  
details at: http://p.sf.net/sfu/Challenge___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Re: [Matplotlib-users] dynamically add subplots to figure

2009-07-16 Thread Jae-Joon Lee
One work around is to call

  self.figure.subplots_adjust()

after geometry changed. After this call, the twinx-ed axes will have
the same axes position as the original one.

Another option is to use mpl_toolkits.axes_grid
(http://matplotlib.sourceforge.net/mpl_toolkits/axes_grid/users/overview.html#parasiteaxes).
But the previous solution seems to be much easier for you.
Regards,

-JJ


On Thu, Jul 16, 2009 at 1:16 PM, Tom Vaughan wrote:
> On Tue, Jun 2, 2009 at 07:33, John Hunter wrote:
>> On Tue, Jun 2, 2009 at 9:03 AM, Tom Vaughan  wrote:
>>> Is it possible to add subplots to a figure if I don't know in advance
>>> how many subplots I need to add?
>>>
>>> What I do now is I call add_subplot like add_subplot(i, 1, i) where i
>>> is 1 initially, and just increases by 1 on each call. This almost
>>> works. Except the first plot takes up the whole figure, the second
>>> plot is placed on top of the bottom half of the first plot, etc. Is
>>> there a way to "resize" the plots when a subplot is added? Or how
>>> would I "re-plot" the previous subplots?
>>
>> See the Axes.change_geometry command
>>
>>  http://matplotlib.sourceforge.net/api/axes_api.html#matplotlib.axes.SubplotBase.change_geometry
>
> twinx() does not return an axes that contains the change_geometry
> method. How then can I do the equivalent on this axes? Calling twinx()
> again on the original axes after change_geometry() has been called
> does not do the trick. Thanks.
>
> -Tom
>
> --
> Enter the BlackBerry Developer Challenge
> This is your chance to win up to $100,000 in prizes! For a limited time,
> vendors submitting new applications to BlackBerry App World(TM) will have
> the opportunity to enter the BlackBerry Developer Challenge. See full prize
> details at: http://p.sf.net/sfu/Challenge
> ___
> Matplotlib-users mailing list
> Matplotlib-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/matplotlib-users
>

--
Enter the BlackBerry Developer Challenge  
This is your chance to win up to $100,000 in prizes! For a limited time, 
vendors submitting new applications to BlackBerry App World(TM) will have
the opportunity to enter the BlackBerry Developer Challenge. See full prize  
details at: http://p.sf.net/sfu/Challenge
___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Re: [Matplotlib-users] strange contour plot

2009-07-16 Thread Michael Droettboom
This is caused by an interaction between antialiasing and filled areas 
with perfectly aligned edges.  Both Agg and Cairo suffer from this 
"problem".  There has been a discussion on the devel a few times about 
ways around it, none of which have really panned out, if I recall 
correctly.  Though this isn't a regression, as far as I can tell.  
0.98.5.x produces the same lines as SVN (at least for me).

Sorry I don't have an easy answer to this.

Mike

Jeffrey Fogel wrote:
> Last question, I promise.  The new contourf seems to include faint 
> lines for the contours.  I would like to remove these, but the 
> docstring doesn't seem to have a kwarg to do so.  Do you know how to 
> remove them?
>
> -Jeffrey
>
> On Thu, Jul 16, 2009 at 2:01 PM, Jeffrey Fogel 
> mailto:matplot...@jeffreyfogel.com>> wrote:
>
> nevermind, I just re-ran the setup.py script and now it's
> working.  Strange, but oh well.  The contour plot is also working
> now.  Thanks for all your help with this.
>
> -Jeffrey
>
>
> On Thu, Jul 16, 2009 at 1:55 PM, Jeffrey Fogel
> mailto:matplot...@jeffreyfogel.com>>
> wrote:
>
> Quick question.  I thought the compiling from source went
> smoothly, but when I try "from pylab import *" I get the
> following error:
>
>
> 
> /Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/matplotlib/dates.py
> in ()
>  85 import re, time, math, datetime
>  86
> ---> 87 import pytz
>  88
>  89 # compatability for 2008c and older versions
>
> ImportError: No module named pytz
>
>
> Do you have any idea why?  I thought pytz was supposed to be
> included in matplotlib (that's what the setup.py script seems
> to imply).  I'm running OS X 10.4.11.  Thanks.
>
> -Jeffrey
>
>
> On Thu, Jul 16, 2009 at 1:15 PM, Jeffrey Fogel
>  > wrote:
>
> Thanks for looking into it and glad to hear that it was
> fixed.  Depending on whether this shows up for the plots
> I'm making for the paper I'm writing, I may hold off on
> compiling from source until the paper is done.  Were there
> any other major changes/problems in the svn version?
>
> -Jeffrey
>
>
> On Thu, Jul 16, 2009 at 12:20 PM, Michael Droettboom
> mailto:md...@stsci.edu>> wrote:
>
> It looks like this bug has been fixed on the SVN
> trunk.  Unfortunately, these changes were pretty major
> surgery, so they don't easily apply to 0.98.5.x.
>  Unfortunately, for the time being, it looks like
> you'll need to wait until the next release, or compile
> matplotlib from SVN yourself.  I haven't heard any
> concrete plans about the next release yet.
>
>
> Cheers,
> Mike
>
> Jeffrey Fogel wrote:
>
> I haven't tried that as I didn't realize there was
> an issue there.  I'm fairly new to matplotlib and
> am definitely still learning how to use it.
>  Thanks for your help with this, I've attached 3
> data files and the test script.  Please let me
> know what you find (and feel free to comment on
> the code if there is an easier way to do something).
> -Jeffrey
>
> On Thu, Jul 16, 2009 at 12:00 PM, Michael
> Droettboom    >> wrote:
>
>You might be running into one of the path
> simplification bugs in
>the 0.98.x series.  Have you tried with the
> rcParam path.simplify
>turned off?  If you can sent me a self
> contained script and data
>off-list, I can test this against the SVN
> version to see if this
>has already been addressed.
>
>Cheers,
>Mike
>
>Jeffrey Fogel wrote:
>
>I'm having a strange problem with my
> contour plots and I'm
>hoping someone here will be able to help.
>  I had a dataset
>that was plotting fine until I decided I
> wanted to create
>plots with the data mirrored over the
> x-axis.  This seems to
>work fine most of the time, but every now
> and then I get a
>   

[Matplotlib-users] formatting help with legend for stacked bar graph with many categories

2009-07-16 Thread Chuck Pepe-Ranney
Hello Users,

I need some help with formatting a legend for a stacked bar graph.  Each bar
is segmented into ~35 categories so my legend ends up being a long mess
overlapping my plot.  How can I position my legend outside of the plot and
reduce the spacing and fontsize for the text?

Thanks,

- Chuck
--
Enter the BlackBerry Developer Challenge  
This is your chance to win up to $100,000 in prizes! For a limited time, 
vendors submitting new applications to BlackBerry App World(TM) will have
the opportunity to enter the BlackBerry Developer Challenge. See full prize  
details at: http://p.sf.net/sfu/Challenge___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


[Matplotlib-users] grouping several line types together in legend of plots

2009-07-16 Thread per freem
hi all,

suppose i have am plotting several lines using 'plot', some are dashed
(using '--') and some are ordinary solid lines. i am plotting several solid
and several dashed lines, all in different colors, as in:

for n in num_lines:
  # plot dashed line
  plot(line_x[n], line_y[n], '--', color=line_color[n], label="line %d"
%(n))
  # plot ordinary line in different color
  plot(line_x[n], line_y[n], color=other_line_color[n], label="line %d"
%(n))
  ...

If i plot n lines, i don't want the legend to show n-items, giving a
separate key for each line. rather, i want it to display a legend containing
a label for the dashed lines and a label for the solid lines, as in:

Legend:
[-- line of type A
 -  line of type B]

so 2 entries rather than as many entries as i have lines. how can i do this?

finally, how can i make it so the legend does not interfere with the plot?
right now the lines appear "behind" the legend. it'd be great if the legend
could be made to be in the background of the line (i.e. be transparent.)

thank you.
--
Enter the BlackBerry Developer Challenge  
This is your chance to win up to $100,000 in prizes! For a limited time, 
vendors submitting new applications to BlackBerry App World(TM) will have
the opportunity to enter the BlackBerry Developer Challenge. See full prize  
details at: http://p.sf.net/sfu/Challenge___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


[Matplotlib-users] Build issue under windows

2009-07-16 Thread william ratcliff
I have recently been trying to build matplotlib from source under Vista
using mingw32.  I have downloaded the win32static library from the
matplotlib page.   Here is the error:
writing build\temp.win32-2.5\Release\src\ft2font.def
c:\Program Files\pythonxy\mingw\bin\g++.exe -mno-cygwin -mdll -static
--entry _dllm...@12 --output-lib
build\temp.win32-2.5\Release\src\libft2font.a --def
build\temp.win32-2.5\Release\src\ft2font.def -s
build\temp.win32-2.5\Release\src\ft2font.o
build\temp.win32-2.5\Release\src\mplutils.o
build\temp.win32-2.5\Release\cxx\cxxsupport.o
build\temp.win32-2.5\Release\cxx\cxx_extensions.o
build\temp.win32-2.5\Release\cxx\indirectpythoninterface.o
build\temp.win32-2.5\Release\cxx\cxxextensions.o -Lwin32_static\lib
-Lc:\python25\libs -Lc:\python25\PCBuild -lfreetype -lz -lpython25 -lmsvcr71
-o build\lib.win32-2.5\matplotlib\ft2font.pyd
g++: build\temp.win32-2.5\Release\src\libft2font.a: No such file or
directory
error: command 'g++' failed with exit status 1


It would seem that somehow it is attempting to link with libft2font.a
instead of creating it.  Any ideas?

Thanks,
William
--
Enter the BlackBerry Developer Challenge  
This is your chance to win up to $100,000 in prizes! For a limited time, 
vendors submitting new applications to BlackBerry App World(TM) will have
the opportunity to enter the BlackBerry Developer Challenge. See full prize  
details at: http://p.sf.net/sfu/Challenge___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users