Why do the lines break apart and crack in my plot?
Show older comments
clear
syms z r theta n m
% Define the hypergeometric function
X(z)=2*z*hypergeom([1, 1/n], 1/n+1, z^n)-z+(2*log(z^n-1)+z^n)/(n^2)-(2*pi*1i)/n^2
Y(z)=z-(1/n^2)*z^n
X(z)=subs(X,n,2*m)
Y(z)=subs(Y,n,2*m)
Z(z)=(1/2)*z*hypergeom([1, 1/m], 1/m+1, z^m)-(1/2)*z*hypergeom([1, 1/m], 1/m+1, -z^m)-(1/(2*m^2))*(atanh(z^m)-z^m)
% Display the result
X(r,theta)=subs(X,z,r*exp(1i*theta))
Y(r,theta)=subs(Y,z,r*exp(1i*theta))
Z(r,theta)=subs(Z,z,r*exp(1i*theta))
val = 1
figure
fsurf(real(subs(X,m,val)),imag(subs(Y,m,val)),2*imag(subs(Z,m,val)),[0 1 pi/24 2*pi+pi/24],'MeshDensity',10,'FaceAlpha',.75)
colormap(jet)
shading interp
%Adjust x, y and z axis limits according to the reference image
axis([-1 1 -1 1 -1 1])
set(gcf,'renderer','Painters')

I have this 3-D Plot, in which these lines scatter and break apart which makes the picture look absurd. How can i manually make the lines smooth and continuous by setting some changes in the plot code. i dont want to increase the meshdensity either . how can i do that?
10 Comments
Walter Roberson
on 11 Sep 2023
contour lines would never cross, so that is not a contour plot.
contour lines can break up if there is nan data.
simran
on 11 Sep 2023
William Rose
on 11 Sep 2023
@simran, please provide the data file and the command(s) used to make the plot. This will help others help you.
simran
on 11 Sep 2023
Walter Roberson
on 11 Sep 2023
The output looks fine on my Mac -- but not on MATLAB Online.
Walter Roberson
on 11 Sep 2023

and rotated a bit:

Dyuman Joshi
on 11 Sep 2023
The lines are broken for me as well - R2021a Update 5 Win 10 Pro
simran
on 11 Sep 2023
Sam Chak
on 11 Sep 2023
Can try the code in MATLAB R2023b Prerelease.
Accepted Answer
More Answers (0)
Categories
Find more on Lengths and Angles 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!


