Is it possible to rule the distance between subplots ?
How about the setting of x axis tic marks ? The default is not very
Any pointer or suggestion how to improve my example are welcome.
Thanks in advance.
On Wed, 2005-02-02 at 12:22, Nils Wagner wrote:
> 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
> (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,
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.
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
From: Stephen Walton <stephen.walton@cs...> - 2005-02-07 22:42:01
kristen kaasbjerg wrote:
>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 : p
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.
From: John Hunter <jdhunter@ac...> - 2005-02-02 14:39:11
>>>>> "Nils" == Nils Wagner <nwagner@...> writes:
Nils> Hi all, Is it possible to rule the distance between subplots
Nils> ? How about the setting of x axis tic marks ? The default
Nils> is not very promising (see bsp5.py)
For axes placement, see also the axes command, which gives you a finer
degree of control than subplot.
For the tick labeling, you are right, the default xticklabels in your
example are a mess. We'll take a look at this case to see where the
bug is. In my experience, getting default ticking and labeling right
is hard, and matplotlib has gotten a lot better at it since the bad
old days but there is a ways to go.
Until we get this fixed, you do have the option of using a custom
ticker, which is explained in the user's guide Chapter 5, and
illustrated in examples/custom_ticker1.py in the matplotlib src