[Matplotlib-users] Sigmoid Curve Fitting

2010-09-20 Thread Chris Spencer
Hi,

Does Matplotlib/Numpy/Scipy contain the ability to fit a sigmoid curve
to a set of data points?

Regards,
Chris

--
Start uncovering the many advantages of virtual appliances
and start using them to simplify application deployment and
accelerate your shift to cloud computing.
http://p.sf.net/sfu/novell-sfdev2dev
___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Re: [Matplotlib-users] Sigmoid Curve Fitting

2010-09-20 Thread Chris Spencer
Thank you. I'll try investigating Scipy further. I've already tried
applying some least-squares code for Numpy
(http://pingswept.org/2009/01/24/least-squares-polynomial-fitting-in-python/)
to my sigmoid data, but it only seems to fit parabolas.

I had already encountered zunzun.com while Googling the problem. I'm
not sure what to make of it, although it seems to be an online
curve-fitting service. Unfortunately, my usage requires the ability to
run the process locally.

Regards,
Chris

On Mon, Sep 20, 2010 at 6:35 PM, Gökhan Sever gokhanse...@gmail.com wrote:
 On Mon, Sep 20, 2010 at 3:36 PM, Chris Spencer chriss...@gmail.com wrote:

 Hi,

 Does Matplotlib/Numpy/Scipy contain the ability to fit a sigmoid curve
 to a set of data points?

 You could also experiment at zunzun.com. Choose 2D sigmoidal from the 2D
 function scroll list.
 --
 Gökhan


--
Start uncovering the many advantages of virtual appliances
and start using them to simplify application deployment and
accelerate your shift to cloud computing.
http://p.sf.net/sfu/novell-sfdev2dev
___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


[Matplotlib-users] Setting Relative Heights For Figure Rows

2010-01-11 Thread Chris Spencer
I wanted to display my figure legend below my figure in the second
row, so I used subplot(211) to create two rows.

However, this creates two rows of equal height, so my graph is crammed
into half the figure height in the first row, while my tiny legend
barely fills up any of the second row. How do you specify relative
heights of each row? For example, I'd like to specify the first row
takes 80% of the figure height, while the second takes 20%. I've
searched the docs, but I can't find anything. Is this possible?

Regards,
Chris

--
This SF.Net email is sponsored by the Verizon Developer Community
Take advantage of Verizon's best-in-class app development support
A streamlined, 14 day to market process makes app distribution fast and easy
Join now and get one step closer to millions of Verizon customers
http://p.sf.net/sfu/verizon-dev2dev 
___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Re: [Matplotlib-users] Stopping Legend From Overlapping the Graph

2009-06-28 Thread Chris Spencer
Awesome, thanks. That works perfectly.

Chris

On Sun, Jun 28, 2009 at 12:16 AM, Jae-Joon Leelee.j.j...@gmail.com wrote:
 sorry.
 As guillaume has mentioned, you need to install mpl from svn.

 Here is some workaround you can try. I guess it would work with 0.98.5.3.
 Basically, you create a separate axes for a legend.

 ax1 = axes([0.1, 0.2,0.8, 0.7])
 p1, = ax1.plot([1,2,3])
 p2, = ax1.plot([3,2,1])

 ax2 = axes([0.1, 0.1, 0.8, 0.01], frameon=False)
 ax2.xaxis.set_visible(False)
 ax2.yaxis.set_visible(False)
 l = ax2.legend([p1, p2], [Legend1, Legend2], mode=expand, ncol=2,
   borderaxespad=0.)


 -JJ



 On Sat, Jun 27, 2009 at 6:00 PM, Chris Spencerchriss...@gmail.com wrote:
 Thanks. Is that some sort of blending edge feature? I just installed
 0.98.5.3, but the sample code gives me the error:

 TypeError: __init__() got an unexpected keyword argument 'bbox_to_anchor'

 On Thu, Jun 25, 2009 at 10:20 PM, Jae-Joon Leelee.j.j...@gmail.com wrote:
 The linked page below shows how you put the legend above the graph.

 http://matplotlib.sourceforge.net/users/plotting/legend.html#legend-location

 You can put it below the axes by adjusting the bbox_to_anchor parameter.
 Try something like
  bbox_to_anchor=(0., -0.1, 1., -0.1), loc=1

 Make sure to adjust the suplot parameter (or axes location) to make
 enough room for the legend.

 -JJ



 On Thu, Jun 25, 2009 at 9:22 PM, Chris Spencerchriss...@gmail.com wrote:
 How do you show the legend below the graph, so it doesn't overlap at
 all with the graph? The docs for the legend() loc parameter only
 seem to specify where *on* the graph you want it to show, which is
 driving me nuts because even using best, it usually hides some of my
 data.

 I want to see *all* of my graph, as well as the legend. Is there any
 way to do this with pylab?

 Any help is appreciated.

 Chris

 --
 ___
 Matplotlib-users mailing list
 Matplotlib-users@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/matplotlib-users





--
___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Re: [Matplotlib-users] Stopping Legend From Overlapping the Graph

2009-06-27 Thread Chris Spencer
Thanks. Is that some sort of blending edge feature? I just installed
0.98.5.3, but the sample code gives me the error:

TypeError: __init__() got an unexpected keyword argument 'bbox_to_anchor'

On Thu, Jun 25, 2009 at 10:20 PM, Jae-Joon Leelee.j.j...@gmail.com wrote:
 The linked page below shows how you put the legend above the graph.

 http://matplotlib.sourceforge.net/users/plotting/legend.html#legend-location

 You can put it below the axes by adjusting the bbox_to_anchor parameter.
 Try something like
  bbox_to_anchor=(0., -0.1, 1., -0.1), loc=1

 Make sure to adjust the suplot parameter (or axes location) to make
 enough room for the legend.

 -JJ



 On Thu, Jun 25, 2009 at 9:22 PM, Chris Spencerchriss...@gmail.com wrote:
 How do you show the legend below the graph, so it doesn't overlap at
 all with the graph? The docs for the legend() loc parameter only
 seem to specify where *on* the graph you want it to show, which is
 driving me nuts because even using best, it usually hides some of my
 data.

 I want to see *all* of my graph, as well as the legend. Is there any
 way to do this with pylab?

 Any help is appreciated.

 Chris

 --
 ___
 Matplotlib-users mailing list
 Matplotlib-users@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/matplotlib-users



--
___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


[Matplotlib-users] Stopping Legend From Overlapping the Graph

2009-06-25 Thread Chris Spencer
How do you show the legend below the graph, so it doesn't overlap at
all with the graph? The docs for the legend() loc parameter only
seem to specify where *on* the graph you want it to show, which is
driving me nuts because even using best, it usually hides some of my
data.

I want to see *all* of my graph, as well as the legend. Is there any
way to do this with pylab?

Any help is appreciated.

Chris

--
___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


[Matplotlib-users] Unable to Plot Date Axis Due To TypeError: a float is required

2008-03-11 Thread Chris Spencer
I'm getting a nonsensical error when attempting to make a simple plot
with a date axis. Googling shows this similar errors, but none with a
date axis. What could be causing this?

 import datetime
 from pylab import figure, show
 fig = figure()
 ax = fig.add_subplot(111)
 dates = [datetime.date(2008, 1, 30),datetime.date(2008, 1, 31)]
 values = [10.25, 10.0]
 ax.plot_date(dates, values)#, '-')
Traceback (most recent call last):
  File stdin, line 1, in module
  File /usr/lib/python2.5/site-packages/matplotlib/axes.py, line
2585, in plot_date
ret = self.plot(x, y, fmt, **kwargs)
  File /usr/lib/python2.5/site-packages/matplotlib/axes.py, line 2535, in plot
for line in self._get_lines(*args, **kwargs):
  File /usr/lib/python2.5/site-packages/matplotlib/axes.py, line
428, in _grab_next_args
for seg in self._plot_3_args(remaining, **kwargs):
  File /usr/lib/python2.5/site-packages/matplotlib/axes.py, line
404, in _plot_3_args
func(x[:,j], y[:,j])
  File /usr/lib/python2.5/site-packages/matplotlib/axes.py, line
385, in makeline
axes=self.axes,
  File /usr/lib/python2.5/site-packages/matplotlib/lines.py, line
226, in __init__
self.set_data(xdata, ydata)
  File /usr/lib/python2.5/site-packages/matplotlib/lines.py, line
315, in set_data
self.recache()
  File /usr/lib/python2.5/site-packages/matplotlib/lines.py, line
320, in recache
x = ma.asarray(self.convert_xunits(self._xorig), Float)
  File /usr/lib/python2.5/site-packages/numpy/core/ma.py, line 2122,
in asarray
return array(data, dtype=dtype, copy=0)
  File /usr/lib/python2.5/site-packages/numpy/core/ma.py, line 573,
in __init__
self._data = c.astype(tc)
TypeError: a float is required

-
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
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