The plot disappears if I change xlim
조회 수: 5 (최근 30일)
이전 댓글 표시
Hello,
I have this simple example
K =
0.0000 0.5527
0.0003 0.4017
0.0040 0.2707
0.0210 0.1480
0.0646 0.0646
When I run plot(K) my graph is wrong. If I change the view like view([90 -90]) then I have the right plot.But now the axes is wrong and I have y as x.
First, can I avoid this command (view([90 -90])) and get immediately the right plot?
Second, if i try to change xlim plot disappears.Why this happens? In fact I want to change y limits to be from 0 to 1.
댓글 수: 0
답변 (1개)
Adam
2016년 6월 1일
plot( x, y )
is the normal form of the plot function so just use that as e.g.
plot( K(:,2), K(:,1) )
if you want the 2nd column on the x axis and the first on the y axis.
Personally I would always use the form with an explicit axes handle too, but that is a side issue!
댓글 수: 3
Steven Lord
2016년 6월 1일
Please post the exact code you used to create the plots and attach pictures from before and after changing the Y axis limits demonstrating the plot "disappearing." The button with a picture on it between the link of chain and the paper clip lets you attach images to your comment or answer.
참고 항목
카테고리
Help Center 및 File Exchange에서 Line Plots에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!