How to increase the length and thickness of the arrows in the EHfields plot
    6 views (last 30 days)
  
       Show older comments
    
    Biplob
 on 2 Jun 2023
  
    
    
    
    
    Commented: Biplob
 on 3 Jun 2023
            Hi, I am plotting the E and H field vector on a plane using EHfields(name,freq). The size and thickness of the arrows drawn inside the plot is too small and cannot be seen properly. How do I increase the size and thickness of these arrows.
Attaching a screenshot for your reference.
SCREENSHOT:

Thanks,
Biplob Biswas
0 Comments
Accepted Answer
  Constantino Carlos Reyes-Aldasoro
      
 on 2 Jun 2023
        Hello
Changing the thickness is not too difficult, but changing the length may be rather complicated. Let me illustrate. You can generate your plot, say I do this
h = spiralArchimedean;
EHfields(h,4e9)
Then, you can grab the handles of your plot 
h1=gca;
h1 is the handles of the fields and should have among many other fields, one called children, which will have 2 quivers, grab that again
h2=h1.Children;
>> h2
h2 = 
2×1 Quiver array:
Quiver    (H)
Quiver    (E)
>> h2(1)
ans = 
Quiver (H) with properties:
Color: [0.8500 0.3250 0.0980]
LineStyle: '-'
LineWidth: 0.5000
XData: [0 -0.0163 -0.0321 -0.0472 -0.0611 -0.0736 -0.0842 … ]
YData: [0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0.0050 … ]
ZData: [-0.1040 -0.1027 -0.0989 -0.0927 -0.0842 -0.0736 … ]
UData: [0.0126 0.0122 0.0113 0.0098 0.0080 0.0062 0.0044 … ]
VData: [0.0123 0.0121 0.0114 0.0103 0.0089 0.0073 0.0057 … ]
WData: [2.6980e-09 -0.0020 -0.0037 -0.0051 -0.0060 -0.0065 … ]
Show all properties
So you can directly modify the  linewidth or the marker size
>> h2(1).LineWidth=2;
But to change the length, you would have to change the actual coordinates from where it starts and where it finishes. That will not be that easy. Hope this helps!
3 Comments
More Answers (0)
See Also
Categories
				Find more on Vector Fields 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!
