On Tue, Jun 10, 2008 at 8:51 AM, Johan Mazel <[EMAIL PROTECTED]> wrote:
> Hi
> I display two data vectors : the first is in the subplot 2,1,1 and the
> second in the subplot 2,1,2. Each of the data vectors have an x vector of
> dates to display values on x axis.
> The 2 data vectors are correlated in time and I want to show the
> correlation.
>
> But the two data vectors are not aligned as I wanted them to be since the
> data vector of subplot 2,1,2 have less element than the other one.
>
> I can't use the same x vector for both curves since it would force me to add
> empty values in the second data vector. And I don't want to do that since it
> would add useless points in my curve.
>
> So I need to find a way to allow me to align both data vectors on the
> different subplots without adding point to the data vector with a smaller
> number of elements.

Does this do what you want?

  ax1 = subplot(211)
  ax1.plot(x1, y1)
  ax2 = subplot(212, sharex=ax1)
  ax2.plot(x2, y2)

ditto for sharey if you want to share the same y axes...


I

-------------------------------------------------------------------------
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://sourceforge.net/services/buy/index.php
_______________________________________________
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users

Reply via email to