XtickLabels on plots or scatters
3 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
Tiago Dias
am 10 Sep. 2018
Kommentiert: Tiago Dias
am 10 Sep. 2018
Hello,
I got a cell A = {'A','B','C'} and B = [3, 6, 9]
my objective is to plot the values of X, with Xticklabel of A. I know that bar chart work fine, but I would prefer plot with markers
Thanks for your time
This is what i tried
A = [2,3,4,5,6]
figure
scatter(1:5,A)
set(gca,'XTickLabel',{'a','b','c','d','e'})
2 Kommentare
Akzeptierte Antwort
jonas
am 10 Sep. 2018
Something like this?
x = 1:5
A = [2,3,4,5,6]
figure
scatter(x,A)
set(gca,'xtick',x,'XTickLabel',{'a','b','c','d','e'})
Weitere Antworten (0)
Siehe auch
Kategorien
Mehr zu Axes Appearance finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!