File tree Expand file tree Collapse file tree 1 file changed +30
-0
lines changed
plotly/plotlyfig_aux/handlegraphics Expand file tree Collapse file tree 1 file changed +30
-0
lines changed Original file line number Diff line number Diff line change 115
115
m = m + 3 ;
116
116
end
117
117
118
+ % ------------------------------------------------------------------------%
119
+
120
+ % -quiver z-%
121
+
122
+ % check for 3D plot
123
+ flag3d = ~isempty(quiver_data .ZData );
124
+
125
+ if flag3d
126
+
127
+ % -format data-%
128
+ zdata = quiver_data .ZData(: );
129
+ wdata = quiver_data .WData(: )*scalefactor ;
130
+
131
+ % -set 3d data-%
132
+ m = 1 ;
133
+ for n = 1 : length(ydata )
134
+ obj.data{quiverIndex }.z(m ) = zdata(n );
135
+ obj.data{quiverIndex }.z(m + 1 ) = zdata(n ) + wdata(n );
136
+ obj.data{quiverIndex }.z(m + 2 ) = nan ;
137
+ m = m + 3 ;
138
+ end
139
+
140
+ % -scatter 3d type-%
141
+ obj.data{quiverIndex }.type = ' scatter3d' ;
142
+ end
143
+
118
144
% -------------------------------------------------------------------------%
119
145
120
146
% -quiver barbs-%
154
180
for col = 1 : 4
155
181
obj.data{quiverIndex }.x(end + 1 ) = barb(1 ,col ); % point 1
156
182
obj.data{quiverIndex }.y(end + 1 ) = barb(2 ,col );
183
+
184
+ if flag3d
185
+ obj.data{quiverIndex }.z(end + 1 ) = zdata(n );
186
+ end
157
187
end
158
188
end
159
189
end
You can’t perform that action at this time.
0 commit comments