turn off yyaxis mode
56 views (last 30 days)
Jakob Seifert on 19 Mar 2021
i tried to solve my problem but could not find any solutions.
The problem: If i plot two data sets with two different y axes, the subsequent plots also have two y axes. Example:
x = 1:10;
y1 = x.^2;
y2 = x;
I tried to insert the hold command on different positions but everytime the next plot isn't working as i want it to:
So my question is, how do i get a "normal" plot after yyaxis was used.
The answer is probably very easy, but I'm not very into MatLab yet, so sorry in advance for this question ._.
If the question was already asked and answered a link to that discussion would be helpful as well :)
Walter Roberson on 19 Mar 2021
You are using LiveScript, which has its own rules for deciding when to plot things or not.
Experiment with using
at the point that you want to switch back to single axes.
More Answers (1)
Achilleas Vortselas on 19 Mar 2021
Instead of clf, you can also use:
The benefit of that is if the axis is inside a GUI and not a Matlab figure, or if the figure has additional children aside from the axis.