How to Plot 1D Graph?
Mostra commenti meno recenti
I want to plot a vertical or horizontal 1D graph. I have A = [22 23 24] and B = [5 6 7]. I want to represent these as discrete points along a single line, with the colors of points A and B different. Any suggestions please?
1 Commento
Dyuman Joshi
il 24 Nov 2023
Did you mean a 2D graph?
As a line is a 2D object.
Risposte (2)
KSSV
il 24 Giu 2016
A = [22 23 24] ;
B = [5 6 7] ;
plot(A,'-or') ;
hold on
plot(B,'-Ob') ;
legend({'A' ; 'B'})
3 Commenti
Jasnoor Singh
il 24 Giu 2016
KSSV
il 24 Giu 2016
How you can represent? If you want to show variation of A and B, you have to put other dimension. Do you have any rough idea in mind? Draw using paint and attach.
van hai dang
il 24 Dic 2019
thank you for your support. I do not make the x axis like this, I would like to change values x axis to X1 X2 X3 according to yaxis value. Do you know how to do it. thank you
Arooj
il 26 Feb 2023
0 voti
A=[22 23 24]; B=[5 6 7]; plot(A,'-or'); hold on plot(B,'-0b'); legend({'A';'B'})
1 Commento
Jens Peder Ulfkjær
il 24 Nov 2023
It is still a 2D plot
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!
