MATLAB爱好者论坛-LabFans.com

MATLAB爱好者论坛-LabFans.com (https://www.labfans.com/bbs/index.php)
-   资料存档 (https://www.labfans.com/bbs/forumdisplay.php?f=72)
-   -   自定义轴刻度-“反向”对数? (https://www.labfans.com/bbs/showthread.php?t=26692)

poster 2019-12-14 20:46

自定义轴刻度-“反向”对数?
 
不好意思的标题;)

我正在尝试重新创建在其他工作中遇到的Matlab图,但我不太了解他们使用的比例尺。 y轴增量如下(从顶部[+ ve y]开始):

0.9999、0.999、0.99、0.9、0

我可以使用符号学来绘制对数图,但这是一种错误的方法。我的增量去

1,0.1,0.01,0.001等

实际上是1- [I]i[/I] ,其中[I]i[/I]是我实际想要的增量!无论如何,我并不完全理解如何描述这种情节。有人可以帮忙吗?



[B]回答:[/B]

要以所需方式绘制轴,必须执行三个步骤:(1)绘制1-y,(2)反转轴(3)重新标记轴

y = [0.4 0.8 0.99 0.9999]; %# plot 1-y plot(1-y) %# alternatively use semilog, then you won't have to adjust 'yscale' below %# reverse y-axis set(gca,'ydir','reverse','yscale','log') %# if necessary, set the axis limits here %# relabel y-axis set(gca,'yticklabel',num2str(1-10.^str2num(get(gca,'yticklabel')))) [IMG]https://i.stack.imgur.com/fgRNA.png[/IMG]



[url=https://stackoverflow.com/questions/5395554]更多&回答...[/url]


所有时间均为北京时间。现在的时间是 23:20

Powered by vBulletin
版权所有 ©2000 - 2025,Jelsoft Enterprises Ltd.