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
Mostra commenti meno recenti
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
Torsten
il 30 Set 2022
Not clear what you are asking for.
Voss
il 30 Set 2022
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).
Risposte (0)
Categorie
Scopri di più su Line Plots in Centro assistenza e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!