File tree Expand file tree Collapse file tree 1 file changed +11
-6
lines changed
plotly/plotlyfig_aux/handlegraphics Expand file tree Collapse file tree 1 file changed +11
-6
lines changed Original file line number Diff line number Diff line change @@ -65,13 +65,18 @@ function updateLineseries(obj,plotIndex)
6565
6666% -------------------------------------------------------------------------%
6767
68- % -if compass or not-%
69- iscompass = false ;
68+ % -if polar plot or not-%
69+ ispolar = false ;
7070x = plot_data .XData ;
7171y = plot_data .YData ;
7272
7373if length(x )==5 && length(y )==5 && x(2 )==x(4 ) && y(2 )==y(4 )
74- iscompass = true ;
74+ ispolar = true ;
75+ end
76+
77+ % -if polar ezplot or not-%
78+ if abs(x(1 )-x(end ))<1e- 10 && abs(y(1 )-y(end ))<1e- 10
79+ ispolar = true ;
7580end
7681
7782% -------------------------------------------------------------------------%
@@ -89,7 +94,7 @@ function updateLineseries(obj,plotIndex)
8994% -scatter type-%
9095obj.data{plotIndex }.type = ' scatter' ;
9196
92- if iscompass
97+ if ispolar
9398 obj.data{plotIndex }.type = ' scatterpolar' ;
9499end
95100
@@ -102,7 +107,7 @@ function updateLineseries(obj,plotIndex)
102107
103108% -scatter x-%
104109
105- if iscompass
110+ if ispolar
106111 r = sqrt(x .^ 2 + y .^ 2 );
107112 obj.data{plotIndex }.r = r ;
108113else
@@ -112,7 +117,7 @@ function updateLineseries(obj,plotIndex)
112117% -------------------------------------------------------------------------%
113118
114119% -scatter y-%
115- if iscompass
120+ if ispolar
116121 theta = atan2(x ,y );
117122 obj.data{plotIndex }.theta = -(rad2deg(theta ) - 90 );
118123else
You can’t perform that action at this time.
0 commit comments