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

4 ビュー (過去 30 日間)
Simon Preuss
Simon Preuss 2020 年 10 月 27 日
編集済み: Sindar 2020 年 10 月 28 日
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 件のコメント
Simon Preuss
Simon Preuss 2020 年 10 月 28 日
The x_axis parameter worked in the plotareaerrebar function as the value for the x-axis
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 Center および File ExchangeLine Plots についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by