You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
For functions representing 2D data points such as Chart.Scatter, Chart.Line, Chart.Bar etc., error bars are given by setting the ErrorX (for the error on x position) and ErrorY (for the error on y position).
openPlotly.NETopenPlotly.NET.TraceObjects
Chart.Scatter(x =[0;1;2], y =[6;10;2], mode = StyleParam.Mode.Lines_Markers)|> Chart.withYError (Error.init (Type = StyleParam.ErrorType.Percent, Value =50.))// value of error bar given as percentage of y value
openPlotly.NETopenSystemletx_theo=[-4...0.08..4.]letsincx=[for x in x_theo -> Math.Sin(Math.PI*x)/(Math.PI*x)]letx=[-3.8;-3.03;-1.91;-1.46;-0.89;-0.24;-0.0;0.41;0.89;1.01;1.91;2.28;2.79;3.56]lety=[-0.02;0.04;-0.01;-0.27;0.36;0.75;1.03;0.65;0.28;0.02;-0.11;0.16;0.04;-0.15][ Chart.Scatter(x = x_theo, y = sincx, mode = StyleParam.Mode.Lines, Name ="sinc(x)")
Chart.Scatter(x = x, y = y, mode = StyleParam.Mode.Markers, Name ="measured")|> Chart.withYError (
Error.init (
Type = StyleParam.ErrorType.Constant,
Value =0.1,
Color = Color.fromString "purple",
Thickness =1.5,
Width =3.))|> Chart.withXError (
Error.init (
Type = StyleParam.ErrorType.Constant,
Value =0.2,
Color = Color.fromString "purple",
Thickness =1.5,
Width =3.))|> Chart.withMarkerStyle (Size =8, Color = Color.fromString "purple")]|> Chart.combine