Borrar filtros
Borrar filtros

Plot a structure which has line width, and other defined settings for the plot

4 visualizaciones (últimos 30 días)
Hello folks,
i want to plot a figure with a structure.
I had following code, who worked fine with another prewritten function:
for i=1:5
options_Standardabweichung_p_Brems_VA6_20kmh{i} = struct('handle',figure(11),'color',color{i},'Linewidth',{0.5},'x_axis',{v_VA6{i}},'error','std');
end
plot_aereaerrorbar(var_std_VA6_20kmh(1).p_Brems',options_Standardabweichung_p_Brems_VA6_20kmh{1})
...
but i dont have any values for a standard deviation which was included in the graph with the plot_aereerrorbbar function.
So now i wanted to plot it with the plot function but still want to plot it with the structure.
But i get following error message if i try plot instead of plot_aereerrorbar:
Error using plot
Unrecognized property x_axis for class Line
Can someone explain to me how it works with a structure to define the Line specifications for the plot in a strcuture and plot it then?
I added the .mat files
  3 comentarios
Simon Preuss
Simon Preuss el 28 de Oct. de 2020
The x_axis parameter worked in the plotareaerrebar function as the value for the x-axis
Sindar
Sindar el 28 de Oct. de 2020
Editada: Sindar el 28 de Oct. de 2020
'XData' is what you want for plot, and likely most other builtin Matlab functions
Also, 'error' won't work with plot.
With the errorbar function, it looks like you need to put in error bar positions manually (i.e. not 'std'), with the options 'YNegativeDelta','YPositiveDelta', see here

Iniciar sesión para comentar.

Respuestas (0)

Categorías

Más información sobre Line 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