How to adjust arrowheads in streamslice?
이전 댓글 표시
I would like to use streamslice but the arrowheads are way too big so you can't see them anymore (see first picture). At first I was not sure if really the arrowheads were the problem but when I remove them the plot looks normal (see second picture). As I want arrowheads in the plot - does anyone know how I can solve the problem or adjust the size of the arrowheads?
Thanks in advance!
Here is my code:
syms a r
r1 = 5*10^(-11);
r2 = 0.01;
r3 = 20;
r4 = 0.1;
r5 = 1.386;
r8 = 0.0723;
r10 = 0.5;
r11 = 0.0001;
n_alpha = 1*10^(3);
r6 = 0.045;
lo_a = 0;
up_a = 10000;
lo_r = 0;
up_r = 0.8;
[A,R] = meshgrid(lo_a:100:up_a,lo_r:0.08:up_r);
a_dot = -r6.*A + r4*n_alpha*r10*r11./(r10*r11+r1*r2*A.^2.*R.^2) + r3*n_alpha*r1*r2*A.^2.*R.^2./(r10*r11+r1*r2*A.^2.*R.^2);
r_dot = -r5.*R + r4*r10*r11./(r10*r11+r1*r2*A.^2.*R.^2) + r3*r1*r2*A.^2.*R.^2./(r10*r11+r1*r2*A.^2.*R.^2);
streamslice(A,R,a_dot,r_dot,2);
xlabel('a')
ylabel('r')
xlim([lo_a up_a])
ylim([lo_r up_r])


채택된 답변
추가 답변 (1개)
Gowthami
2023년 1월 27일
Hi,
There is no direct way to modify the arrowhead separately from the lines themselves in "streamslice".
As a workaround, you can parse through the individual lines that make up the arrowheads in the stream slice plot by checking for lines that only have 3 vertices and then modify the line properties of those line groups so that the arrowhead properties are modified. For example in the following code, I am modifying the line width of arrowheads to 0.05.
load fileName;
s = streamslice(x,y,z,u,v,w,[],[],5);
for i = 1:length(s)
% If line is part of arrowhead
if length(s(i).MarkerIndices) == 3
s(i).LineWidth = 0.05;
end
end
You can modify other arrowhead properties too by looking at a list of all available properties:
카테고리
도움말 센터 및 File Exchange에서 Descriptive Statistics에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!
