[Matplotlib-users] matplotlib does not install properly when built with bdist_mpkg

2007-12-20 Thread listservs
I was not sure on which list to post this, but perhaps someone here  
can point me in the right direction. I maintain a few installers of  
scientific python packages for OSX, one of which being matplotlib. I  
generate mpkg installers with bdist_mpkg, and for the most part it  
works fine. However, for matplotlib, many users report the following  
error after installing and importing:

backend = matplotlib.rcParams[’backend’]
AttributeError: ‘module’ object has no attribute ‘rcParams’

By context, I assume this has something to do with the matplotlibrc   
setup. This does not happen, by the way, when installing directly (ie.  
using python setup.py install) or via eggs. If anyone knows why this  
may be happening, I would appreciate some feedback.

I'm also wondering if it may ultimately be easier to build eggs, then  
perhaps wrap in a nice applescript for a point-and-click installer.

Thanks,
cf



-
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2005.
http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/
___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


[Matplotlib-users] log-log errorbar plots with errorbars including zero

2007-12-20 Thread Dan Christensen
I regularly make log-log errorbar plots where the errors are larger than
the y values.  This means that the error bar goes a finite distance
upwards, but should go infinitely far downwards.  In Debian's 0.87.7-0.3
package, just the top portion is drawn, which seems like a reasonable
solution.  But in Ubuntu's 0.90.1-2ubuntu1 package, trying to do a
plot like this causes an error.  Any ideas?

Dan

$ python
Python 2.5.1 (r251:54863, Oct  5 2007, 13:36:32) 
[GCC 4.1.3 20070929 (prerelease) (Ubuntu 4.1.2-16ubuntu2)] on linux2
Type help, copyright, credits or license for more information.
 from pylab import *
 errorbar([1],[1],[2])
(matplotlib.lines.Line2D instance at 0xb5ac024c, [matplotlib.lines.Line2D 
instance at 0xb5ac00cc, matplotlib.lines.Line2D instance at 0xb5ac00ec], 
[matplotlib.collections.LineCollection instance at 0xb5abdfac])
 gca().set_yscale('log')
 show()
Exception in Tkinter callback
Traceback (most recent call last):
  File lib-tk/Tkinter.py, line 1406, in __call__
return self.func(*args)
  File /usr/lib/python2.5/site-packages/matplotlib/backends/backend_tkagg.py, 
line 151, in resize
self.show()
  File /usr/lib/python2.5/site-packages/matplotlib/backends/backend_tkagg.py, 
line 154, in draw
FigureCanvasAgg.draw(self)
  File /usr/lib/python2.5/site-packages/matplotlib/backends/backend_agg.py, 
line 392, in draw
self.figure.draw(renderer)
  File /usr/lib/python2.5/site-packages/matplotlib/figure.py, line 601, in 
draw
for a in self.axes: a.draw(renderer)
  File /usr/lib/python2.5/site-packages/matplotlib/axes.py, line 1286, in draw
a.draw(renderer)
  File /usr/lib/python2.5/site-packages/matplotlib/collections.py, line 700, 
in draw
transoffset)
ValueError: Domain error on transOffset-operator in draw_line_collection


-
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2005.
http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/
___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Re: [Matplotlib-users] matplotlib does not install properly when built with bdist_mpkg

2007-12-20 Thread John Hunter
On Dec 20, 2007 10:09 AM,  [EMAIL PROTECTED] wrote:
 I was not sure on which list to post this, but perhaps someone here
 can point me in the right direction. I maintain a few installers of
 scientific python packages for OSX, one of which being matplotlib. I
 generate mpkg installers with bdist_mpkg, and for the most part it
 works fine. However, for matplotlib, many users report the following
 error after installing and importing:

 backend = matplotlib.rcParams['backend']
 AttributeError: 'module' object has no attribute 'rcParams'

 By context, I assume this has something to do with the matplotlibrc
 setup. This does not happen, by the way, when installing directly (ie.
 using python setup.py install) or via eggs. If anyone knows why this
 may be happening, I would appreciate some feedback

My guess is that you're installing basemap or some other
matplotlib.toolkits package with the setuptools namespace code (or you
users are), and this is wreaking havoc and causing the mpl __init__.py
code to not be read.  The latest svn has the namespace code commented
out in matplotlib.toolkits.  You can try building from svn, and your
uses will probably need to clean all the setuptools, namespace-ified
matplotlib and matplotlib.toolkits from their systems.

JDH

-
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2005.
http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/
___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


[Matplotlib-users] pylab axis query and possible bug

2007-12-20 Thread Gary Ruben
Hi listees,

I often generate plots using the pylab interface plot() function to 
overlay an imshow() image. The minimal script below demonstrates a 
problem, which may be a bug, or may be a deliberate change introduced 
into mpl 0.91.1. It works fine with mpl 0.90.1 but gives a traceback 
with 0.91.1 - it seems not to be happy with the subplot limits. 
Commenting out the note 1 line lets it run and demonstrates my real 
question. With scatter(), the first subplot doesn't rescale, but if line 
note 2 is commented out and note 3 is uncommented, it rescales. How 
do I prevent the rescaling? I prefer plot() instead of scatter() in this 
case because of the plot origin.

thanks,
Gary R.

--

from pylab import *

rcFig = {'figsize': (2,1),
  'dpi': 256,
  'subplot.hspace': 0.0,
  'subplot.wspace': 0.0,
  'subplot.bottom': 0.0,
  'subplot.left':   0.0,
  'subplot.right':  1.0,
  'subplot.top':1.0,
  }
rc('figure', **rcFig)# note 1

subplot(121)
axis('off')
imshow(rand(20,20))
subplot(122)
axis('off')
imshow(rand(20,20))
subplot(121)
scatter([5,10],[5,10])# note 2
#~ plot([5,10],[5,10], 'o') # note 3
show()

--


-
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2005.
http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/
___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


[Matplotlib-users] pylab axis query and possible bug

2007-12-20 Thread Gary Ruben
Retrying. Sorry if this appears twice.

Hi listees,

I often generate plots using the pylab interface plot() function to
overlay an imshow() image. The minimal script below demonstrates a
problem, which may be a bug, or may be a deliberate change introduced
into mpl 0.91.1. It works fine with mpl 0.90.1 but gives a traceback
with 0.91.1 - it seems not to be happy with the subplot limits.
Commenting out the note 1 line lets it run and demonstrates my real
question. With scatter(), the first subplot doesn't rescale, but if line
note 2 is commented out and note 3 is uncommented, it rescales. How
do I prevent the rescaling? I prefer plot() instead of scatter() in this
case because of the plot origin.

thanks,
Gary R.

--

from pylab import *

rcFig = {'figsize': (2,1),
  'dpi': 256,
  'subplot.hspace': 0.0,
  'subplot.wspace': 0.0,
  'subplot.bottom': 0.0,
  'subplot.left':   0.0,
  'subplot.right':  1.0,
  'subplot.top':1.0,
  }
rc('figure', **rcFig)# note 1

subplot(121)
axis('off')
imshow(rand(20,20))
subplot(122)
axis('off')
imshow(rand(20,20))
subplot(121)
scatter([5,10],[5,10])# note 2
#~ plot([5,10],[5,10], 'o') # note 3
show()

--



-
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2005.
http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/
___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users