Plotting the mean and variance

11 visualizaciones (últimos 30 días)
AB
AB el 23 de Ag. de 2016
Comentada: dpb el 23 de Ag. de 2016
Hello
I have a data set (500 by 1 matrix) and i want to plot a scatter plot. How can I add a bar corresponding to the mean of the data and what will be a good way to show the variance?
Also, when I plot the data with scatter command, I get are all the bubbles in one straight line corresponding to my index. Is there a way to make these bubbles a little more scattered rather in a single line on top of each other?
  1 comentario
dpb
dpb el 23 de Ag. de 2016
Normally, one would have an independent variable against which to plot--what's that for your data?
As for adding the mean, simply line will do; use hold on after scatter to add to the plot; see the doc and examples in Graphics section for more info.
If you just have observations, perhaps the better display might be a histogram (doc hist) instead of scatter plot??? Or, perhaps, boxplot (requires Statistics Toolbox)

Iniciar sesión para comentar.

Respuestas (0)

Categorías

Más información sobre Data Distribution Plots 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