diff --git a/plotly/plotlyfig.m b/plotly/plotlyfig.m index 240a7db1..72abeaa5 100644 --- a/plotly/plotlyfig.m +++ b/plotly/plotlyfig.m @@ -671,9 +671,8 @@ function validate(obj) updateData(obj,n); try - if (strcmp(obj.data{n}.type, 'bar') && update_opac(length(ax)-n)) - obj.data{1, n}.opacity = 0.9; - obj.data{1, n}.marker.color = 'rgb(0,113.985,188.955)'; + if update_opac(length(ax)-n) + % obj.data{1, n}.opacity = 0.9; end catch % TODO to the future diff --git a/plotly/plotlyfig_aux/core/updateData.m b/plotly/plotlyfig_aux/core/updateData.m index bcb87fb6..1d0c8327 100644 --- a/plotly/plotlyfig_aux/core/updateData.m +++ b/plotly/plotlyfig_aux/core/updateData.m @@ -15,6 +15,10 @@ updatePolarplot(obj, dataIndex); elseif strcmpi(obj.PlotOptions.TreatAs, 'contour3') updateContour3(obj, dataIndex); + elseif strcmpi(obj.PlotOptions.TreatAs, 'compass') + updateLineseries(obj, dataIndex); + elseif strcmpi(obj.PlotOptions.TreatAs, 'ezpolar') + updateLineseries(obj, dataIndex); end %-update plot based on plot call class-% diff --git a/plotly/plotlyfig_aux/handlegraphics/updateLineseries.m b/plotly/plotlyfig_aux/handlegraphics/updateLineseries.m index 28b35352..2e6728b2 100644 --- a/plotly/plotlyfig_aux/handlegraphics/updateLineseries.m +++ b/plotly/plotlyfig_aux/handlegraphics/updateLineseries.m @@ -66,23 +66,14 @@ function updateLineseries(obj,plotIndex) %-------------------------------------------------------------------------% %-if polar plot or not-% -ispolar = false; -x = plot_data.XData; -y = plot_data.YData; +treatas = obj.PlotOptions.TreatAs; +ispolar = strcmpi(treatas, 'compass') || strcmpi(treatas, 'ezpolar'); -if length(x)==5 && length(y)==5 && x(2)==x(4) && y(2)==y(4) - ispolar = true; -end +%-------------------------------------------------------------------------% -%-if ezpolar or not-% -len = length(obj.State.Axis.Handle.Children); -if len > 1 - for l = 1:len - if strcmpi(obj.State.Axis.Handle.Children(l).Type, 'Text') - ispolar = true; - end - end -end +%-getting data-% +x = plot_data.XData; +y = plot_data.YData; %-------------------------------------------------------------------------% diff --git a/plotly/plotlyfig_aux/helpers/extractLineMarker.m b/plotly/plotlyfig_aux/helpers/extractLineMarker.m index 41eb2542..3733a034 100644 --- a/plotly/plotlyfig_aux/helpers/extractLineMarker.m +++ b/plotly/plotlyfig_aux/helpers/extractLineMarker.m @@ -28,8 +28,10 @@ switch line_data.Marker case '.' marksymbol = 'circle'; + marker.size = 0.4*line_data.MarkerSize; case 'o' marksymbol = 'circle'; + marker.size = 0.4*line_data.MarkerSize; case 'x' marksymbol = 'x-thin-open'; case '+' diff --git a/plotly/plotlyfig_aux/helpers/extractPatchFace.m b/plotly/plotlyfig_aux/helpers/extractPatchFace.m index 08282fc1..57a9f695 100644 --- a/plotly/plotlyfig_aux/helpers/extractPatchFace.m +++ b/plotly/plotlyfig_aux/helpers/extractPatchFace.m @@ -50,6 +50,9 @@ end marker.color = ['rgb(' num2str(col(1)) ',' num2str(col(2)) ',' num2str(col(3)) ')']; + + case 'auto' + marker.color = 'rgb(0,113.985,188.955)'; end end @@ -57,7 +60,6 @@ %-------------------------------------------------------------------------% %-PATCH EDGE COLOR-% - if isnumeric(patch_data.EdgeColor) col = 255*patch_data.EdgeColor;