HI all,
I am new to matlab and I would like to write a code to create a plot similar to this one:
2020-01-06.png
Basically for each of my sample I have the data relative to the label in the x axis. Is there any way to create such a plot? I want to list those letters (La, Ce, Pr....) in the x axis and the corrisponding value in the Y axis (it is a semilog plot). Also I want to plot a vertical error bar! I have the data in an excel spreadsheet.
Thank you
A.

 Akzeptierte Antwort

Adam Danz
Adam Danz am 6 Jan. 2020
Bearbeitet: Adam Danz am 7 Jan. 2020

0 Stimmen

To plot the errorbars, use errorbar(x,y,neg,pos). Check out that link to get started (see examples within).
To specify the x axis ticks, follow this example
xlab = {'La','Ce', . . . , 'Lu'};
set(gca, 'XTick', 1:numel(xlab), 'XTickLabel', xlab)
% ^--axis handle
If you get stuck, show us your updated code and let us know where we can help.

Weitere Antworten (0)

Kategorien

Mehr zu Data Distribution Plots finden Sie in Hilfe-Center und File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by