Can I change axes of existing figure from linear to loglog in Matlab without redrawing all the data?
25 次查看(过去 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!