xtick overlapped in plotyy.
  Home FAQ Contact Sign in
comp.softsys.matlab only
 
Advanced search
POPULAR GROUPS

more...

comp.softsys.matlab Profile…
 Up
xtick overlapped in plotyy.         


Author: Mike
Date: May 6, 2008 20:58

Hi

I use plotyy to plot two y1 and one y2(on the right).
The xtick are not the same. Hence they are overlapped.
How to solve this problem.
Thank you in advance.
Mike
4 Comments
Re: xtick overlapped in plotyy.         


Author: Mike
Date: May 6, 2008 21:00

On May 7, 11:58 am, Mike gmail.com> wrote:
> Hi
>
> I use plotyy to plot two y1 and one y2(on the right).
> The xtick are not the same.  Hence they are overlapped.
> How to solve this problem.
> Thank you in advance.
> Mike

Sorry. Basically I use:
[AX,H1,H2] = plotyy(x,[y1,y2],x,y3);
legend([H1;H2],'y1',y2',y3');

Mike
no comments
Re: xtick overlapped in plotyy.         


Author: Mike
Date: May 6, 2008 21:25

On May 7, 12:00 am, Mike gmail.com> wrote:
> On May 7, 11:58 am, Mike gmail.com> wrote:
>
>> Hi
>
>> I use plotyy to plot two y1 and one y2(on the right).
>> The xtick are not the same.  Hence they are overlapped.
>> How to solve this problem.
>> Thank you in advance.
>> Mike
>
> Sorry.  Basically I use:
> [AX,H1,H2] = plotyy(x,[y1,y2],x,y3);
> legend([H1;H2],'y1',y2',y3');
>
> Mike

I've found the solution:
set(AX,'xlim',[min(x) max(x)])
Show full article (0.57Kb)
no comments
Re: xtick overlapped in plotyy.         


Author: helper
Date: May 6, 2008 21:38

Mike gmail.com> wrote in message 4a58-9126-bd5bdc4b64aa@u36g2000prf.googlegroups.com>...
> I've found the solution:
> set(AX,'xlim',[min(x) max(x)])

You might also want to check out "axis tight"
> But I want to set the lines to black and with markers.
> How to do it please?
>
>
> Mike

Try

set([H1;H2],'Color','k','marker','o')
no comments
Re: xtick overlapped in plotyy.         


Author: Mike
Date: May 6, 2008 22:16

On May 7, 12:38 pm, "helper " nospam.com> wrote:
> Mike gmail.com> wrote in message >
> 4a58-9126-bd5bdc4b6...@u36g2000prf.googlegroups.com>...
>
>> I've found the solution:
>> set(AX,'xlim',[min(x) max(x)])
>
> You might also want to check out "axis tight"
>
>> But I want to set the lines to black and with markers.
>> How to do it please?
>
>> Mike
>
> Try
>
> set([H1;H2],'Color','k','marker','o')
Show full article (0.54Kb)
no comments