Skip to content

Commit c10a7a3

Browse files
galvisgilbertoVolKa79
authored andcommitted
errorbar working for x-axis as well
1 parent 9e34d43 commit c10a7a3

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

plotly/plotlyfig_aux/handlegraphics/updateErrorbar.m

+7
Original file line numberDiff line numberDiff line change
@@ -26,11 +26,13 @@
2626

2727
%-errorbar visible-%
2828
obj.data{errorbarIndex}.error_y.visible = true;
29+
obj.data{errorbarIndex}.error_x.visible = true;
2930

3031
%-------------------------------------------------------------------------%
3132

3233
%-errorbar type-%
3334
obj.data{errorbarIndex}.error_y.type = 'data';
35+
obj.data{errorbarIndex}.error_x.type = 'data';
3436

3537
%-------------------------------------------------------------------------%
3638

@@ -41,27 +43,32 @@
4143

4244
%-errorbar value-%
4345
obj.data{errorbarIndex}.error_y.array = errorbar_data.YPositiveDelta;
46+
obj.data{errorbarIndex}.error_x.array = errorbar_data.XPositiveDelta;
4447

4548
%-------------------------------------------------------------------------%
4649

4750
%-errorbar valueminus-%
4851
obj.data{errorbarIndex}.error_y.arrayminus = errorbar_data.YNegativeDelta;
52+
obj.data{errorbarIndex}.error_x.arrayminus = errorbar_data.XNegativeDelta;
4953

5054
%-------------------------------------------------------------------------%
5155

5256
%-errorbar thickness-%
5357
obj.data{errorbarIndex}.error_y.thickness = errorbar_data.LineWidth;
58+
obj.data{errorbarIndex}.error_x.thickness = errorbar_data.LineWidth;
5459

5560
%-------------------------------------------------------------------------%
5661

5762
%-errorbar width-%
5863
obj.data{errorbarIndex}.error_y.width = obj.PlotlyDefaults.ErrorbarWidth;
64+
obj.data{errorbarIndex}.error_x.width = obj.PlotlyDefaults.ErrorbarWidth;
5965

6066
%-------------------------------------------------------------------------%
6167

6268
%-errorbar color-%
6369
col = 255*errorbar_data.Color;
6470
obj.data{errorbarIndex}.error_y.color = ['rgb(' num2str(col(1)) ',' num2str(col(2)) ',' num2str(col(3)) ')'];
71+
obj.data{errorbarIndex}.error_x.color = ['rgb(' num2str(col(1)) ',' num2str(col(2)) ',' num2str(col(3)) ')'];
6572

6673
%-------------------------------------------------------------------------%
6774

0 commit comments

Comments
 (0)