是否可以增大R条形图中边界框的大小?
考虑以下是否可以增大R条形图中边界框的大小?,r,R,考虑以下条形图代码 pdf("ThreadCreationLatency.pdf") B <- c(52.6,26.2,0.6) pp <- barplot(B, main="Thread Creation to First Instruction", ylab="Time (us)", names.arg=c("std::thread", "Goroutines", "Arachne"), cex.names=1.5, cex.axis=1.5,
条形图代码
pdf("ThreadCreationLatency.pdf")
B <- c(52.6,26.2,0.6)
pp <- barplot(B, main="Thread Creation to First Instruction", ylab="Time (us)",
names.arg=c("std::thread", "Goroutines", "Arachne"),
cex.names=1.5, cex.axis=1.5, cex.lab=1.5, cex.main=1.5, ylim=c(0,60))
text(x=pp , y=B+2, labels=as.character(B), xpd=TRUE, cex=1.5)
dev.off()
pdf(“ThreadCreationLatency.pdf”)
B(这是基本绘图世界,因此请务必研究?par
帮助页面。)记住par('mar')的默认值(或知道如何恢复它们)是很有帮助的:
因此,在左侧边距上加1,这是这些数字中的第二个:
pdf("ThreadCreationLatency.pdf")
B <- c(52.6,26.2,0.6); par(mar=par('mar')+c(0, 1,0,0) )
pp <- barplot(B, main="Thread Creation to First Instruction", ylab="Time (us)",
names.arg=c("std::thread", "Goroutines", "Arachne"),
cex.names=1.5, cex.axis=1.5, cex.lab=1.5, cex.main=1.5, ylim=c(0,60))
text(x=pp , y=B+2, labels=as.character(B), xpd=TRUE, cex=1.6)
dev.off()
pdf(“ThreadCreationLatency.pdf”)
B参见?par
-具体地说是par(mar=…)
,为了调整每一面的边距,请仔细阅读本页,我发现自己经常引用它:
pdf("ThreadCreationLatency.pdf")
B <- c(52.6,26.2,0.6); par(mar=par('mar')+c(0, 1,0,0) )
pp <- barplot(B, main="Thread Creation to First Instruction", ylab="Time (us)",
names.arg=c("std::thread", "Goroutines", "Arachne"),
cex.names=1.5, cex.axis=1.5, cex.lab=1.5, cex.main=1.5, ylim=c(0,60))
text(x=pp , y=B+2, labels=as.character(B), xpd=TRUE, cex=1.6)
dev.off()