Automatic placement of a text box? ie empty legend [matplotlib]

2011-04-26 Thread C Barrington-Leigh
The automatic placement functionality of legend() is nice. I'd like to make use of it to place a box with just a title or title and comment (ie, some text) but no lines or legend entries. Does anyone know a way to do this? -- http://mail.python.org/mailman/listinfo/python-list

Simple legend code no longer works after upgrade to Ubuntu 11.10

2011-12-12 Thread C Barrington-Leigh
rom pylab import * plot([0,0],[1,1],label='Ubuntu 11.10') Before I upgraded to 2.7.2+ / 4 OCt 2011, the following code added a comment line with a legend. Now, the same code makes the legend appear "off-screen", ie way outside the axes limits. Can anyone help? And/or is there a new way to add a ti

Simple legend code no longer works after upgrade to Ubuntu 11.10

2011-12-12 Thread C Barrington-Leigh
""" Before I upgraded to 2.7.2+ / 4 OCt 2011, the following code added a comment line to an axis legend using matplotlib / pylab. Now, the same code makes the legend appear "off-screen", ie way outside the axes limits. Can anyone help? And/or is there a new way to add a title and footer to the le

Bug in fixed_point?!

2010-12-20 Thread C Barrington-Leigh
I cannot figure out what I'm doing wrong. The following does not return a fixed point: from scipy import optimize xxroot= optimize.fixed_point(lambda xx: exp(-2.0*xx)/2.0, 1.0, args=(), xtol=1e-12, maxiter=500) print ' %f solves fixed point, ie f(%f)=%f ?'% (xxroot,xxroot,exp(-2.0*xxroot)/2.0) C

Re: Bug in fixed_point?!

2010-12-21 Thread C Barrington-Leigh
On Dec 21, 9:36 am, Robert Kern wrote: > When you do, please provide the information that Terry Reedy asked for. > Sorry; quite right. For completeness I'll post here as well as over on scipy. Here's the actual code: - from scipy import optimize from math import exp xxroot= o

weighted mean; weighted standard error of the mean (sem)

2010-09-09 Thread C Barrington-Leigh
I am looking for some reaally basic statistical tools. I have some sample data, some sample weights for those measurements, and I want to calculate a mean and a standard error of the mean. Here are obvious places to look: numpy scipy.stats statsmodels It seems to me that numpy's "mean" and "aver

Re: weighted mean; weighted standard error of the mean (sem)

2010-09-09 Thread C Barrington-Leigh
> The best place to ask about numpy related stuff is the numpy mailing list at: > > http://mail.scipy.org/mailman/listinfo/numpy-discussion > > This is also the best place to present a patch if you have code to > contribute. In my experience the numpy devs are always happy to have > new contributo

"pointlabel"-like function for Python: distribute text labels on a 2-d scatter plot to avoid overlapping labels

2010-09-12 Thread C Barrington-Leigh
Hello. There is a function for R (http://bm2.genes.nig.ac.jp/RGM2/ R_current/library/maptools/man/pointLabel.html) to help with placing/ locating text labels in an optimized way so as to minimise some measure of text overlap (or likely text overlap). Has anyone written or ported such a thing for

Re: "pointlabel"-like function for Python: distribute text labels on a 2-d scatter plot to avoid overlapping labels

2010-09-12 Thread C Barrington-Leigh
> measure of text overlap (or likely text overlap).  Has anyone written > or ported such a thing for Python? Hm (talking to myself)... the link I gave above has some references, and one of those includes some python code. Seems not packaged up yet for plots, but may be close: http://meta.wikimedi