When plotting two things y-axis goes from 0-1, then 0-1 again for the second plot instead of doing both as 0-1

I'm trying to plot 3 things on a plot of Date by Proportion (i.e the y axis should go from 0-1). Instead of doing them overlapping, matlab is seperating the plot into sections on the same graph and having the y-axis go from 0-1, then starts again and goes from 0-1. Attached is the code ive been runnig (table1 is the name of the column in the chart with the date, it is a datetime and ('RO2/HO2 Pathway') is a number from 0-1)
plt13 = figure;
yyaxis right
plot(AP.table1, AP.('RO2/HO2 Pathway'))
hold on
title('RO2/HO2 Oxidation Across All Sites')
plot(Odem.table1, Odem.('RO2/HO2 Pathway'))
hold on
plot(Holly.table1, Holly.('RO2/HO2 Pathway'))
hold off
legend('AP', 'Odem', 'Holly')
legend('Location', 'best')

3 Commenti

Is there some code not shown here that sets the YTickLabels of the right y-axis?
Agree w/ @Voss; the code shown on its own would not produce such a plot; nothing anybody here will be able to do to diagnose what went wrong w/o all the code--and without the data to go along with it, that also may not be sufficient.
Attach a complete, runnable MWE (minimum working example) that produces the symptom, including the data, and post it. (In trying to produce it, you'll probably uncover the cause of the problem).

Accedi per commentare.

Risposte (0)

Categorie

Richiesto:

il 30 Set 2022

Modificato:

dpb
il 30 Set 2022

Community Treasure Hunt

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

Start Hunting!

Translated by