How to draw a curve on a polar plot
8 次查看(过去 30 天)
显示 更早的评论
Hello everyone,
I am not familiar with polar and polarplot, but I guess I got that I needed a theta and a rho. What I can't figure yet is how to connect my 3 black dots appearing on the following picture, and by a nice curve. What I manage to get so far is that half-circle. The idea would be to connect both ends to the two blacks dots on the side of the stereonet, while the curve would get through the third dot.
Here is the piece of code I am using so far (I have to use polar(), I know it's passed but it's required for the moment)
strikeFault = 100; %deg
dipFault = 45; %deg
B = cos(deg2rad(dipFault))*radiusPlot; %[0 1]
polar(deg2rad(strikeFault),1,'kO'); %from here
hold on
polar(deg2rad(strikeFault+180),1, 'kO');%to there
hold on
polar((deg2rad((strikeFault +strikeFault +180)/2)), B, 'kO' );% dip
hold on
theta2 = linspace(deg2rad(strikeFault), deg2rad(strikeFault+180), 50); %# divide circle by N points (length of data)
r2 = B; %# radius
x = r2.*cos(theta2); %# x-coordinate
y = r2.*sin(theta2); %# y-coordinate
plot(x, y, '-');
Cheers,
Flo
回答(1 个)
另请参阅
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!