Different right and left axes in a MATLAB plot?

后端 未结 6 823
我在风中等你
我在风中等你 2020-12-05 15:28

I plot a single trace in MATLAB with plot(). I\'d like to add a right-y axis with a different set of tick marks (scaled linearly). Is this possible?

6条回答
  •  时光取名叫无心
    2020-12-05 16:12

    From matlab 2016 and onwards there is an option to define on what axis one plots:

    yyaxis left
    plots...
    yyaxis right
    plots...
    

    source: https://se.mathworks.com/help/matlab/ref/yyaxis.html

提交回复
热议问题