Azzera filtri
Azzera filtri

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

4 visualizzazioni (ultimi 30 giorni)
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 Commenti
Simon Preuss
Simon Preuss il 28 Ott 2020
The x_axis parameter worked in the plotareaerrebar function as the value for the x-axis
Sindar
Sindar il 28 Ott 2020
Modificato: Sindar il 28 Ott 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

Accedi per commentare.

Risposte (0)

Categorie

Scopri di più su Line Plots in Help Center e File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by