From c10a7a3354facf6ca431d1720817b406918d0545 Mon Sep 17 00:00:00 2001 From: Gilberto Galvis Date: Mon, 26 Jul 2021 15:51:59 -0400 Subject: [PATCH] errorbar working for x-axis as well --- plotly/plotlyfig_aux/handlegraphics/updateErrorbar.m | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/plotly/plotlyfig_aux/handlegraphics/updateErrorbar.m b/plotly/plotlyfig_aux/handlegraphics/updateErrorbar.m index 98d7cdd..9544b06 100644 --- a/plotly/plotlyfig_aux/handlegraphics/updateErrorbar.m +++ b/plotly/plotlyfig_aux/handlegraphics/updateErrorbar.m @@ -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'; %-------------------------------------------------------------------------% @@ -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)) ')']; %-------------------------------------------------------------------------%