Clear Filters
Clear Filters

How to set density of streamslice?

6 views (last 30 days)
The streamslice document says I can change density of the plot.
However I cannot find proper way to set density of the plot when using below syntax.
Is there a order when using below 3 syntaxes?
If so, how do I know the correct order with document?
% works
% not works (Added parameters in order stated in document)
Error using streamslice
Volume data arguments must be 3-D arrays.

Accepted Answer

Angelo Yeo
Angelo Yeo on 24 Mar 2024
Good question! I believe it's worth it to update the doc. Let me relay your request to doc writers. The correct order is
streamslice(X, Y, U, V, density, 'arrowsmode', 'method')
You can get helped with the "tips" from MATLAB editor like below. (Below is from R2024a)
You can also see the correct order of input arguments according to the order of descriptions of them in the doc. Does this make sense to you?

More Answers (0)


Find more on Environment and Settings in Help Center and File Exchange


Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!