Hi,(adsbygoogle = window.adsbygoogle || []).push({});

I am plotting 3 graphs in matlab using plotyy as

[ax h1 h2] = plotyy(x1,Ftemp,x2,Fsnow);

hold(ax(2), 'on');

h3 = plot(ax(2),x1,Fprec);

I am thus adding the third graph to the right hand y-axis. I then set the limits and tickmarks for the right hand y axis as

set(ax(2), 'xlim', [1999.5 2010.5]);

set(ax(2), 'ylim', [0 50], 'YTick', 0:10:50);

This however only sets the y-axis for h2, the graph I originally plotted using plotyy. The added graph h3 has its own tickmarks and limits. Does anyone know how to handle the axis of h3, the added graph? I want the tickmarks of h2 and h3 to sync and be in the same range.

Thanks, Tim

**Physics Forums - The Fusion of Science and Community**

Join Physics Forums Today!

The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

# Setting axis limits in MatLab

Can you offer guidance or do you also need help?

Draft saved
Draft deleted

Loading...

Similar Threads - Setting axis limits | Date |
---|---|

Mathematica Chisquare fit to multiple data sets | Aug 4, 2017 |

Matlab How to Set a Variable in Matlab as an Integer Only? | Jan 13, 2017 |

Maple - Explicit Set Definition & Natural Number Symbol | Oct 31, 2016 |

LaTeX MatLab2tikz Customize axis | May 20, 2016 |

Matlab How to set zero value boxes transparent in 3D plots? | May 17, 2016 |

**Physics Forums - The Fusion of Science and Community**