Effacer les filtres
Effacer les filtres

plots are not displaying with on double y-axis graph

1 vue (au cours des 30 derniers jours)
Muhammad Choudhury
Muhammad Choudhury le 5 Déc 2021
Réponse apportée : DGM le 5 Déc 2021
t = xlsread('ob1.xlsx','I4:I722')
Error using xlsread (line 136)
Unable to open file 'ob1.xlsx'.
File '/users/mss.system.Di4UXt/ob1.xlsx' not found.
P_sp = xlsread('ob1.xlsx','F4:F722')
P = xlsread('ob1.xlsx','E4:E722')
L_sp = xlsread('ob1.xlsx','C4:C722')
L = xlsread('ob1.xlsx','B4:B722')
yyaxis right
plot(t,P_sp)
plot(t,P)
yyaxis left
plot(t,L)
plot(t,L_sp)
i am trying to plot all 4 of these points however only 2 of them are being plotted, any idea on how to get all 4? Thank you

Réponse acceptée

DGM
DGM le 5 Déc 2021
Something like this:
t = 1:10;
P_sp = rand(1,10);
P = rand(1,10);
L_sp = rand(1,10);
L = rand(1,10);
hold on; % <-- this
yyaxis right
plot(t,P_sp)
plot(t,P)
yyaxis left
plot(t,L)
plot(t,L_sp)

Plus de réponses (0)

Catégories

En savoir plus sur 2-D and 3-D Plots dans Help Center et File Exchange

Tags

Produits


Version

R2021a

Community Treasure Hunt

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

Start Hunting!

Translated by