Skip to content

Commit

Permalink
errorbar working for x-axis as well
Browse files Browse the repository at this point in the history
  • Loading branch information
galvisgilberto authored and VolKa79 committed Jul 26, 2021
1 parent 9e34d43 commit c10a7a3
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions plotly/plotlyfig_aux/handlegraphics/updateErrorbar.m
Original file line number Diff line number Diff line change
Expand Up @@ -26,11 +26,13 @@

%-errorbar visible-%
obj.data{errorbarIndex}.error_y.visible = true;
obj.data{errorbarIndex}.error_x.visible = true;

%-------------------------------------------------------------------------%

%-errorbar type-%
obj.data{errorbarIndex}.error_y.type = 'data';
obj.data{errorbarIndex}.error_x.type = 'data';

%-------------------------------------------------------------------------%

Expand All @@ -41,27 +43,32 @@

%-errorbar value-%
obj.data{errorbarIndex}.error_y.array = errorbar_data.YPositiveDelta;
obj.data{errorbarIndex}.error_x.array = errorbar_data.XPositiveDelta;

%-------------------------------------------------------------------------%

%-errorbar valueminus-%
obj.data{errorbarIndex}.error_y.arrayminus = errorbar_data.YNegativeDelta;
obj.data{errorbarIndex}.error_x.arrayminus = errorbar_data.XNegativeDelta;

%-------------------------------------------------------------------------%

%-errorbar thickness-%
obj.data{errorbarIndex}.error_y.thickness = errorbar_data.LineWidth;
obj.data{errorbarIndex}.error_x.thickness = errorbar_data.LineWidth;

%-------------------------------------------------------------------------%

%-errorbar width-%
obj.data{errorbarIndex}.error_y.width = obj.PlotlyDefaults.ErrorbarWidth;
obj.data{errorbarIndex}.error_x.width = obj.PlotlyDefaults.ErrorbarWidth;

%-------------------------------------------------------------------------%

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

%-------------------------------------------------------------------------%

Expand Down

0 comments on commit c10a7a3

Please sign in to comment.