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

4 次查看(过去 30 天)
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 个评论
Sindar
Sindar 2020-10-28
编辑:Sindar 2020-10-28
'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

请先登录,再进行评论。

回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Line Plots 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by