Can I change axes of existing figure from linear to loglog in Matlab without redrawing all the data?
조회 수: 17 (최근 30일)
이전 댓글 표시
I have a given Matlab figure, but not the original data. Can I change axes of existing figure from linear to loglog in Matlab without redrawing all the data?
댓글 수: 0
채택된 답변
Sean de Wolski
2014년 7월 10일
set(gca,'XScale','log','YScale','log')
댓글 수: 3
Chad Greene
2014년 7월 10일
편집: Chad Greene
2014년 7월 10일
You can change what's printed on the axes to anything you want, regardless of the actual numbers being plotted with xtick and xticklabel.
x=[1 1.5 4];
y=[1 2 3];
plot(x,y)
set(gca,'XTick',[1.1 2 3])
set(gca,'XTickLabel',str2mat('1.00','400','2'))
set(gca,'YTick',y)
set(gca,'YTickLabel',str2mat('1.00','2.00','pants'))
추가 답변 (0개)
참고 항목
카테고리
Help Center 및 File Exchange에서 Interactive Control and Callbacks에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!