필터 지우기
필터 지우기

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 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