Re: [Matplotlib-users] variable line thickness in a plot

2008-03-11 Thread Steve Schmerler
On Tue, Mar 11, 2008 at 01:23:55PM -0700, eliss wrote: > On 3/11/08, Steve Schmerler <[EMAIL PROTECTED]> wrote: > > > > On Tue, Mar 11, 2008 at 12:45:21PM -0700, eliss wrote: > > > The API for the plot function states that the line thickness can only be > >

Re: [Matplotlib-users] variable line thickness in a plot

2008-03-11 Thread Steve Schmerler
On Tue, Mar 11, 2008 at 12:45:21PM -0700, eliss wrote: > The API for the plot function states that the line thickness can only be a > single floating point number. > Really? Try plot([1,2,3], lw=math.pi) cheers, steve

Re: [Matplotlib-users] problem with modules

2008-02-28 Thread Steve Schmerler
On Thu, Feb 28, 2008 at 05:40:00PM +, Davide Cellai wrote: > 1. To begin with, I've copied the lines: > > deb http://anakonda.altervista.org/debian packages/ > deb-src http://anakonda.altervista.org/debian sources/ > I'm sure matplotlib is in Ubuntu's official repos by now [1]. Same for Debia

Re: [Matplotlib-users] [OT] Confusion with mailing lists

2007-12-05 Thread Steve Schmerler
rex wrote: > massimo sandal <[EMAIL PROTECTED]> [2007-12-04 09:18]: >> On a related note, I *hate* that hitting "reply" uses the mail address >> of the parent poster, instead than that of the mailing list. The scipy >> and the gentoo mailing list (two other examples I know) behave more >> prop

Re: [Matplotlib-users] grayscale

2007-11-12 Thread Steve Schmerler
Johann Cohen-Tanugi wrote: > hello, > is there a quick way to get a figure in greyscale? You can do something like plot([1,2,3], color='0.9'), where the string '0.9' denotes the gray scale of the plotted line. See also `help plot`, `help colors`. -- cheers, steve Random number generation is th

[Matplotlib-users] mpl returns wrong revision number

2007-10-31 Thread Steve Schmerler
I installed svn r4071. `svn info ` and `svnversion ` report the correct rev number. But $ ipython -pylab In [1]: matplotlib.__version__ Out[1]: '0.90.1' In [2]: matplotlib.__revision__ Out[2]: '$Revision: 3975 $' If I'm right, this is because in matplotlib/__init__.py: __revision__ = '$Revision

Re: [Matplotlib-users] dual y scales

2007-09-12 Thread Steve Schmerler
Alan G Isaac wrote: > I need to make some dual y-scale plots: > on time series plotted against the left axis, > with a second plotted again the right axis (which has its > own scale). I think Matplotlib did not used to provide > dual scale plotting: is it now available? > You mean something lik

Re: [Matplotlib-users] Vector magnitude?

2007-09-07 Thread Steve Schmerler
Norbert Nemec wrote: > >> 2) Is there a way to calculate the magnitude (length) of a vector? > numpy.linalg.norm(X) > This makes more sense than len(). I've got confused by "length" :) -- cheers, steve I love deadlines. I like the whooshing sound they make as they fly by. -- Douglas Adams

Re: [Matplotlib-users] Vector magnitude?

2007-09-05 Thread Steve Schmerler
Robert Dailey wrote: > Hi, > > I have two questions: > > 1) Is there any way to represent vectors? Currently I'm using 'array' for > vectors. > I suppose you mean vectors in the Matlab way? Then you should have a look at http://scipy.org/NumPy_for_Matlab_Users#head-e9a492daa18afcd86e84e07cd2824

Re: [Matplotlib-users] Fitting a curve

2007-08-30 Thread Steve Schmerler
Wolfgang Kerzendorf wrote: > I know this is not completely matplotlib related but perhaps you can > help me none the less: > I want to fit a curve to a set of data. It's a very easy curve: y=ax+b. > But I want errors for a and b and not only the rms. Is that possible. > What tasks do you recommen

Re: [Matplotlib-users] Latex equations and SVG export

2007-07-06 Thread Steve Schmerler
Edin Salkovic wrote: > Hi kaushik, > > On 7/6/07, kaushik.ghose <[EMAIL PROTECTED]> wrote: >> Hi, >> >> When I do >> >> m.text(0,0,'$\sum_{n=1}^{100}$');m.axis('off');m.savefig('test.svg') > > Shouldn't that be: > r'$\sum_{n=1}^{100}$' # i.e. a "raw" string. > > or: > > '$\\sum_{n=1}^{100}$'

Re: [Matplotlib-users] Latex equations and SVG export

2007-07-06 Thread Steve Schmerler
kaushik.ghose wrote: > m.text(0,0,'$\sum_{n=1}^{100}$');m.axis('off');m.savefig('test.svg') > > matplotlib renders it fine, but won't save it to svg correctly - the > summation symbol doesn't show up. > > Is this a configuration issue on my part, or is svg support for latex > currently incompl

Re: [Matplotlib-users] Warning message

2007-06-25 Thread Steve Schmerler
Beha Online wrote: > I receive the following message when I import pylab with: "from pylab import > *": > > /usr/lib64/python2.4/site-packages/matplotlib/numerix/__init__.py:67: > DeprecationWarning: Numeric use as a numerix backed for matplotlib is > deprecated > DeprecationWarning, stacklevel=1

Re: [Matplotlib-users] Unexplained label on plot

2007-06-13 Thread Steve Schmerler
Stuart Yarrow wrote: > Hi All, > > An extra label is appearing on the plot I'm generating. I wonder if anyone > could explain what it means/how to get rid of it? > > The plot is available at http://test.outpost.org.uk/example.png - the > unexplained label is the '+4.05674e7' in the upper right ha

Re: [Matplotlib-users] figure dpi output problem

2007-05-26 Thread Steve Schmerler
Jeff Whitaker wrote: > [EMAIL PROTECTED] wrote: >> I'm trying to get matplotlib to make a 600x300 png, but matplotlib won't >> let me; it keeps making a 612x312 png instead. Here's a sample script >> that has the problem on my system: >> >> figure(figsize=(6., 3.)) >> plot(arange(10)) >> savefig('

Re: [Matplotlib-users] SVG vs PNG

2007-05-12 Thread Steve Schmerler
Fernando Perez wrote: > > Did you install pstoedit? If you do, you'll see that inkscape will > then be able to load .eps/.ps files in a fully editable format. I've > used it to fix decade-old plots for which the only thing around was > the eps file. > I tried to export an .svg from MPL (0.90.0

Re: [Matplotlib-users] how to plot

2007-04-02 Thread Steve Schmerler
massimo sandal wrote: > javi markez bigara ha scritto: >> hi everyone, >> i would like to know how to plot several linear regresions with the >> same group of points Don't understand exactly what you want to do ... > > what do you mean? > > however, if you dig the matplotlib and the scipy

Re: [Matplotlib-users] Iterate and save multiple plots

2007-03-20 Thread Steve Schmerler
Ana Paula Leite wrote: > Dear all, > > I have a list with about 300 elements like the following: > listNames = ['name1', 'name2', 'name3', ...] > > I want to iterate through this list, creating several figures where each > one will include two subplots. > The problem is that I want to label each

Re: [Matplotlib-users] Importing Binary files

2007-02-05 Thread Steve Schmerler
Kumar Appaiah wrote: > On Fri, Feb 02, 2007 at 05:14:37AM -0800, Vijay Kumar wrote: >> Hi, >> >> I want to import binary files generated from C/FORTRAN into matplotlib for >> plotting. >> Can this be done using 'load'? > > If you are using SciPy, scipy.io has a few functions which may > help. sci

Re: [Matplotlib-users] saving data to a file

2007-01-03 Thread Steve Schmerler
belinda thom wrote: > Hi, > > Is there a way for me to keep adding the next row of a 2d array to a > file via load? (matlab's save had a very useful -append option). > > I managed to get 2d laod/save working, e.g. > >import numpy as N >import pylab as P >import bthom.utils as U >

Re: [Matplotlib-users] error in simple plot command

2006-12-14 Thread Steve Schmerler
Brian Blais wrote: > > plot([1],[0],'o') > > I get a floating point/divide by zero error: > > > /usr/lib/python2.4/site-packages/matplotlib/ticker.py in scale_range(vmin, > vmax, n, > threshold) > 731 dv = abs(vmax - vmin) > 732 meanv = 0.5*(vmax+vmin) > --> 733 var = d

Re: [Matplotlib-users] *EGG* now freezes at this same place always....

2006-12-13 Thread Steve Schmerler
[EMAIL PROTECTED] wrote: > Thanks for help. Now it freezes always here... > > > GTK requires pygtk > GTKAgg requires pygtk > TKAgg requires TkInter I never used eggs, but I guess you need to install these libs by yourself. apt-cache search for this stuff and make sure you install the *-dev ve

Re: [Matplotlib-users] Problem with savefig and usetex

2006-12-11 Thread Steve Schmerler
Darren Dale wrote: > On Monday 11 December 2006 09:59, Nicolas Champavert wrote: >> Steve Schmerler a écrit : >>> Nicolas Champavert wrote: >>>> Hello, >>>> >>>> I have some problems when trying to save a figure with usetex=True. >>>

Re: [Matplotlib-users] Problem with savefig and usetex

2006-12-11 Thread Steve Schmerler
Nicolas Champavert wrote: > Hello, > > I have some problems when trying to save a figure with usetex=True. > Sometimes, it is not possible to save the figure when trying to put an > xlabel with LaTeX inside. > It works with pylab.xlabel('M$_\odot$') but not with > pylab.xlabel('10$^3$ M$_\odo

Re: [Matplotlib-users] Upgrade matplotlib [newbie]

2006-11-18 Thread Steve Schmerler
Frank Zwaard wrote: > Hi > > sorry for the stupid question but I have installed an RPM version of > matplotlib and now I would like to upgrade it. Unfortunately I would > like to install a version that doesn't have an RPM. > I downloaded the source and built it, but I don't know if I can just > in

Re: [Matplotlib-users] ZeroDivisionError in scale_range

2006-11-13 Thread Steve Schmerler
W Netzberg wrote: > I aggree it doesn't make much sense, but that's what I got and attached > a plot to prove it! > Seems that some sort of rounding takes place, but only when I use > numpy.random.normal(). It is strange. Can you post a short working and not-working (i.e. chopping off) example?

Re: [Matplotlib-users] ZeroDivisionError in scale_range

2006-11-13 Thread Steve Schmerler
W Netzberg wrote: > I can't find a 0.87.5 rpm for fc5, might have to build it from source to > see if this behavior goes away... Seems to be related to numpy. If I > replace: > numpy.random.normal(-0.37727, 0.1, size=10) > with an array normal() returns, the problem goes away. Strange. Again >

Re: [Matplotlib-users] ZeroDivisionError in scale_range

2006-11-11 Thread Steve Schmerler
W Netzberg wrote: > The following code throws ZeroDivisionError: > import numpy, pylab > z = numpy.random.normal(-0.37727, 0.1, size=10) > pylab.plot(z) > pylab.show () > The stack trace: > Traceback (most recent call last): > File "", line 3, in ? > File "/usr/lib/python2.4/site-packages/matpl

[Matplotlib-users] Debian etch binary

2006-11-06 Thread Steve Schmerler
Hi I installed python-matplotlib_0.87.5-2.1_amd64.deb (rev. 2761) on Debian etch (Python 2.4.4c0) and get this warning when trying to plot something: In [1]: plot([1,2,3]) /usr/lib/python2.4/site-packages/matplotlib/font_manager.py:989: UserWarning: Could not match sans-serif, normal, normal.

Re: [Matplotlib-users] legend outside of the plot

2006-08-04 Thread Steve Schmerler
Christian Meesters wrote: > Hi, > > As far I understand this a plot is per default covering the more or less > whole > space. Now, is it possible to position a legend outside of a plot, e.g. on > the right of the plot. "legend" offers to supply the loc-argument with a > tuple to do that, but t

Re: [Matplotlib-users] tick labeling question

2006-08-03 Thread Steve Schmerler
Alexander Michael wrote: On 8/3/06, *Steve Schmerler* <[EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]>> wrote: Hi all How can I change the default behavior of the tick labeling from say 1 2 3 4 x1e-5 to 1e-5 2e-5 3e-5 4e-5 ? My thesis supervisor w

Re: [Matplotlib-users] tick labeling question

2006-08-03 Thread Steve Schmerler
Darren Dale wrote: > On Thursday 03 August 2006 11:59, Alexander Michael wrote: >> On 8/3/06, Steve Schmerler <[EMAIL PROTECTED]> wrote: >>> Hi all >>> >>> How can I change the default behavior of the tick labeling from say >>> >>> 1

[Matplotlib-users] tick labeling question

2006-08-03 Thread Steve Schmerler
Hi all How can I change the default behavior of the tick labeling from say 1 2 3 4 x1e-5 to 1e-5 2e-5 3e-5 4e-5 ? My thesis supervisor wants it that way :( cheers, steve -- Random number generation is the art of producing pure gibberish as quickly as possible. ---

[Matplotlib-users] _mathtext_data.py uppercase greek

2006-07-13 Thread Steve Schmerler
In case there is some interest, I changed _mathtext_data.py to support nonslanted uppercase greek characters rather (\Omega & stuff, see .diff). BTW, in _mathtext_data.py there is a line font = FT2Font('/usr/local/share/matplotlib/cmr10.ttf') I think this is a obsolete location, right? (at le

Re: [Matplotlib-users] usetex: different fonts

2006-06-19 Thread Steve Schmerler
Ryan Krauss wrote: > Sorry, I didn't scroll down low enough in the message to see the png > you already attached. > > Ryan > The latest update (Darren's mail) makes the plots (exponents etc.) look just cool. Thanks! cheers, steve -- Random number generation is the art of producing pure gibber

[Matplotlib-users] usetex: different fonts

2006-06-18 Thread Steve Schmerler
With usetex mpl creates different fonts on the axes ticks and the $\times 10^$ labels. In [1]: matplotlib.__version__ Out[1]: '0.87.3' (from svn) -- Random number generation is the art of producing pure gibberish as quickly as possible. ___ Matplot

Re: [Matplotlib-users] How to close a figure ?

2006-06-06 Thread Steve Schmerler
leau2001 wrote: > I made some figure in a loop and i want to close after the figure show. > Not absolutely sure what you mean, but to produce some plots and save them in a loop I do f = figure() for i in range(..): plot(...) savefig(...) f.clf() # clear figure for re-use