From 5bf88c2dbeea3f0f4097049089c78bd2aeb0edc2 Mon Sep 17 00:00:00 2001 From: Gilberto Galvis Date: Mon, 2 Aug 2021 21:00:10 -0400 Subject: [PATCH] fix issue #257 --- plotly/plotlyfig_aux/handlegraphics/updateStem.m | 8 ++++++++ plotly/plotlyfig_aux/helpers/extractLineMarker.m | 4 +++- 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/plotly/plotlyfig_aux/handlegraphics/updateStem.m b/plotly/plotlyfig_aux/handlegraphics/updateStem.m index 4971f603..a75fea4a 100644 --- a/plotly/plotlyfig_aux/handlegraphics/updateStem.m +++ b/plotly/plotlyfig_aux/handlegraphics/updateStem.m @@ -61,4 +61,12 @@ obj.data{dataIndex} = stem_temp_data; +%------------------------------------------------------------------------% + +%-put y-zeroline-% +[~, ysource] = findSourceAxis(obj,dataIndex); +eval(['obj.layout.yaxis' num2str(ysource) '.zeroline = true;']); + +%------------------------------------------------------------------------% + end \ No newline at end of file diff --git a/plotly/plotlyfig_aux/helpers/extractLineMarker.m b/plotly/plotlyfig_aux/helpers/extractLineMarker.m index ad139740..06fec854 100644 --- a/plotly/plotlyfig_aux/helpers/extractLineMarker.m +++ b/plotly/plotlyfig_aux/helpers/extractLineMarker.m @@ -55,7 +55,9 @@ end marker.symbol = marksymbol; - marker.maxdisplayed=length(line_data.MarkerIndices)+1; + if isfield(line_data, 'MarkerIndices') + marker.maxdisplayed=length(line_data.MarkerIndices)+1; + end end %-------------------------------------------------------------------------%