Doug's MATLAB Video Tutorials

Using Datetick with Plotyy in MATLAB 2

Posted by Doug Hull,

Recently, I needed to plot two different sets of time series data on the same axes, but they were at different scales. In this simplified example, I show how you can change the x-labels to display the month name. This requires you capture the handles of the axes created by plotyy, then send them to datetick explicitly.

2 CommentsOldest to Newest

Thank you so much for the great videos Doug! I was wondering how you knew the number of input arguments in this video in order to grab the axis handle. I seem to have trouble understanding how to understand the documentation on plotting handles. Any direction you can provide is appreciated. Thank you again!

Add A Comment

What is 2 + 10?

Preview: hide

These postings are the author's and don't necessarily represent the opinions of MathWorks.