# How to draw a curve on a polar plot

15 views (last 30 days)
Flo brd on 20 Nov 2018
Answered: Flo brd on 21 Nov 2018
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
hold on
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)
x = r2.*cos(theta2); %# x-coordinate
y = r2.*sin(theta2); %# y-coordinate
plot(x, y, '-');
Cheers,
Flo
Flo brd on 21 Nov 2018
I think I've found a way:
y = [1 1 B];
yi=interp1(x,y,xi,'spline');
polar(xi,yi);

Flo brd on 21 Nov 2018
Hi again people,
I've got the same question, but with a polarplot this time. As you can see on the picture, the curve of the line isn't quite right. I also attach my code:
polarplot([0 2*pi],[90 0]);
hold on
dipFault = 30;
y = [90 dipFault 90];
y1 = interp1(x, y, x1, 'spline');
polarplot((x1), (y1), 'k-');
Thank you