How do I plot a secondary y-axis in log scale?

6 views (last 30 days)
Collin Simek
Collin Simek on 11 Jul 2016
Answered: dpb on 11 Jul 2016
I am unsure how to plot my secondary y-axis in log scale? I only want the secondary y-axis in the log scale not my primary y-axis or x-axis.

Answers (1)

dpb
dpb on 11 Jul 2016
>> help plotyy
plotyy Graphs with y tick labels on the left and right
plotyy(X1,Y1,X2,Y2) plots Y1 versus X1 with y-axis labeling
on the left and plots Y2 versus X2 with y-axis labeling on
the right.
...
plotyy(X1,Y1,X2,Y2,FUN1,FUN2) uses FUN1(X1,Y1) to plot the data for
the left axes and FUN2(X2,Y2) to plot the data for the right axes.
...
Ergo,
hA=plotyy(X1,Y1,X2,Y2,@plot,@semilogy)

Community Treasure Hunt

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

Start Hunting!