"Warning: Negative data ignored" for title(), xlabel(), ylabel()
조회 수: 1 (최근 30일)
이전 댓글 표시
When I am plotting using the logarithmic scale, either semilogx() or set(gca,'xscale','log') will cause the title(), xlabel(), and ylabel() to generate Negative data ignored warning. The warning disappears when all of those are commented out or deleted, but a plot without title and labels just doesn't seem right. Anyone can help me with why this is happening and are there any ways to resolve this?
댓글 수: 0
답변 (1개)
Chunru
2021년 7월 23일
There is no problem except for the warning:
x=(-1:.1:10); semilogx(x, cos(x))
xlabel('x')
ylabel('y')
title('test')
댓글 수: 0
참고 항목
카테고리
Help Center 및 File Exchange에서 Annotations에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!