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 115115m = m + 3 ;
116116end
117117
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+
118144% -------------------------------------------------------------------------%
119145
120146% -quiver barbs-%
154180 for col = 1 : 4
155181 obj.data{quiverIndex }.x(end + 1 ) = barb(1 ,col ); % point 1
156182 obj.data{quiverIndex }.y(end + 1 ) = barb(2 ,col );
183+
184+ if flag3d
185+ obj.data{quiverIndex }.z(end + 1 ) = zdata(n );
186+ end
157187 end
158188 end
159189end
You can’t perform that action at this time.
0 commit comments