Set limit for secondary y-axis

Primary Y-axis limits can be set with ylim command.how to set limits for secondary Y-axis??(when ploted with plotyy command)

 Accepted Answer

Use the handle to the second y-axis:
[ax h1 h2] = plotyy(1:10,1:10,1:10,10:-1:1);
ylim(ax(2),[0 pi]);

2 Comments

Thank You sir.
Hello, could you please tell me how to fix the 'ticks' of the right y-axis in this plot?

Sign in to comment.

More Answers (0)

Categories

Tags

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!