【发布时间】:2018-04-17 02:16:49
【问题描述】:
我无法弄清楚如何使我的 x 轴更大并且我的所有点都适合。对于 x 轴,我的分数范围从 5.2 到 57.9。我想让我的 x 轴从 0 到可能 60。
这是我的代码和我在下面看到的图片:
library(RColorBrewer)
my.colors <- brewer.pal(7, "RdBu")
plot(x=log(ScatPlot$ownership..pct.),
y=ScatPlot$firearm.law.stringency,
+ cex=(ScatPlot$death.rate),
+ col=my.colors[ScatPlot$state],
+ main="Death Rate given % Ownership and Law
Stringency Per State",
+ xlab="% Ownership", ylab="Death Rate")
【问题讨论】:
-
试试
xlim = c(0, 60) -
@Tung 她正在使用 x 值的对数。所以,
xlim不会有帮助。
标签: r graph axis scatter-plot percentage