How do I add a left/right axis to a plot in older versions of matlab r2015a?
5 views (last 30 days)
Show older comments
MathWorks Support Team
on 4 Apr 2018
Answered: MathWorks Support Team
on 4 Apr 2018
I would like to create another axis on my plot in MATLAB R2015a. It appears the the "yyaxis" function does this, but only exists after MATLAB R2016a.
The "plotyy" function does not work for me as there are limitations in customization of the axes.
Is there any better and simple way to create another axis?
Accepted Answer
MathWorks Support Team
on 4 Apr 2018
The following link details how multiple axes can be created:
These axes are the same as any other axes you use and do not have limitations on editing properties. One property you may want to change is the XColor property, which can be set to none if you do not want an extra x-axis, only a y-axes.
>> ax2.XColor = 'none'
There is also a blog on this topic, which goes through some File Exchange functions that may also be of use:
0 Comments
More Answers (0)
See Also
Categories
Find more on Two y-axis in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!