2D plot with linked Nan values
이전 댓글 표시
I have one vector with 32 latitude points, and another vector with sodium values for each point, but the point number 10 is a Nan value. So, I have to plot them as x=latitude and y=sodium, and I do not want the gap betwen point 9 and 11, but a connection.
I already tried this code
plot(latitude,sodium)
ln=plot(latitude,sodium);
ln.Color=[0 0 0];
ln.LineWidth=1.5;
ln.Marker="o";
ln.MarkerFaceColor=[0 0 0];
x = [latitude 9, latitude 11];
y = [sodium 9, sodium 11];
plot(latitude,sodium,"k",x,y,"k")
it worked but at one point it did not work anymore (I have a 2D line but without marker).
So I changed the last three lines and tried with this code
y1=sodium(~isnan(sodium);
x1=latitude(~isnan(sodium));
Also in this case in worked at the beginning, but now it doesn't work anymore.
How is ti possible that they stopped to work and how can I connect the gap?
채택된 답변
추가 답변 (0개)
카테고리
도움말 센터 및 File Exchange에서 Polar Plots에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!

