Borrar filtros
Borrar filtros

How to plot a dotplot with horizontal error bars and additional function?

32 visualizaciones (últimos 30 días)
Ego sum
Ego sum el 29 de En. de 2023
Respondida: Animesh el 10 de Mzo. de 2023
Dear community, I'm in the process of plotting a dotplot with horizontal error bars and an additional function, but I'm pretty new to MatLab and I'm pretty lost. It would be very nice if someone could help me with the necessary commands. Warm greetings

Respuestas (1)

Animesh
Animesh el 10 de Mzo. de 2023
Hi Ego,
I understand that you want to make a dotplot with horizontal error bars.
You can try the following implementation:
x= 1:10; %x-axis data vector
y = sin(x); %corresponding y-axis data vector
e = std(y)*ones(size(x)); %error margin for every datapoint in a vector
scatter(x,y); % This function plots a every data point as a dot
hold on; %simply hold the already plotted graph
errorbar(x, y, e,'horizontal','LineStyle','none'); % This function plots horizontal error bars into the graph.
xlabel("x");
ylabel("y");
Please refer to scatter for more information on scatter plots.
Please refer to errorbar for more information on errorbar and it’s variations

Categorías

Más información sobre Errorbars en Help Center y File Exchange.

Community Treasure Hunt

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

Start Hunting!

Translated by