subplot features

Hi all,

Is it possible to rule the distance between subplots ?
How about the setting of x axis tic marks ? The default is not very promising
(see bsp5.py)

Any pointer or suggestion how to improve my example are welcome.

Thanks in advance.

        Nils

bsp5.py (803 Bytes)

Hi Nils,

Hi all,

Is it possible to rule the distance between subplots ?
How about the setting of x axis tic marks ? The default is not very
promising
(see bsp5.py)

Here is a function I use instead of the matplotlib subplot.

It has the same arguments as the matlab version except for the
figpos argument, which determines where in the figure your
array of plots goes, and the axpos argument, which determines where in each
panel the axes goes. It returns an axes object, which you can use
to set xticks etc.

Hope this helps,
Cheers,
Cory.

mysubplot.py (429 Bytes)

···

On Wed, 2005-02-02 at 12:22, Nils Wagner wrote:

Hola

When i try to fit a polynomial of order 4 to 5 data
points, I get an answer far from what I would expect.
Try and run the attached script an see if you can fit
the datapoints in x and y better than me.
When I run the script, the fit doesn't go through any
of the points.
The problem is also present for higher order pol.

Kristen

test.py (306 Bytes)

···

__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
http://mail.yahoo.com

kristen kaasbjerg wrote:

Hola

When i try to fit a polynomial of order 4 to 5 data
points, I get an answer far from what I would expect.

If I run your script and print out the polynomial coefficients, they are very large and alternate in sign:

In [166]: p
Out[166]:
array([ -1779.1645838 , 7613.24170642, -12137.79572888,
         8529.6429996 , -2239.34146635])

This means that the problem is ill posed. In general, high order polynomial fitting is a bad idea; if you just want an interpolant and don't care about coefficients, use a cubic spline.