File tree Expand file tree Collapse file tree
plotly/plotlyfig_aux/handlegraphics Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1515 wDataRaw = get(plotData , ' WData' );
1616
1717 % -one arrow per element: vector inputs pair up x/y/u/v directly,
18- % -matrix inputs are full grids of matching shape-%
18+ % -matrix inputs are full grids of matching shape. MATLAB's
19+ % -no-coords quiver (quiver(u,v)) stores scalar defaults (YData = 1)
20+ % -that the primitive broadcasts internally - replicate that here.-%
1921 if isvector(xData ) && isvector(uDataRaw )
2022 nArrows = numel(uDataRaw );
23+ if numel(xData ) == 1
24+ xData = xData * ones(size(uDataRaw ));
25+ end
26+ if numel(yData ) == 1
27+ yData = yData * ones(size(uDataRaw ));
28+ end
29+ if numel(zData ) == 1
30+ zData = zData * ones(size(uDataRaw ));
31+ end
2132 else
2233 if isvector(xData )
2334 [xData , yData ] = meshgrid(xData , yData );
You can’t perform that action at this time.
0 commit comments