plot x label like plot(x, y) in boxplot

Hello,
I need to use boxplot, but how to plot boxplot like plot(x,y), because the x-label (position) for my boxplot is unified
like
load data.mat
x=[1,2,5,10,16]
boxplot(x, data)
Thanks

 Réponse acceptée

data = magic(5);
x=[1,2,5,10,16];
boxplot(data,x);

4 commentaires

Miraboreasu
Miraboreasu le 11 Mar 2023
Thanks, I mean like there are 3 more distance bigger between 2 5 than 1 and 2
Voss
Voss le 11 Mar 2023
Modifié(e) : Voss le 11 Mar 2023
data = magic(5);
x=[1,2,5,10,16];
boxplot(data,x,'Positions',x);
Miraboreasu
Miraboreasu le 11 Mar 2023
Thank you
Voss
Voss le 11 Mar 2023
Modifié(e) : Voss le 11 Mar 2023

You're welcome!

Connectez-vous pour commenter.

Plus de réponses (0)

Produits

Version

R2022a

Community Treasure Hunt

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

Start Hunting!

Translated by