如何完善下面的R图?

如何完善下面的R图?,r,plot,R,Plot,我在R中有以下曲线图: x = c(0, 1e-10, 1e-08, 1e-06, 1e-05, 0.001, 0.1); y = c(22000, 21490, 17252, 9204, 6118, 5092, 4998); z = c(85.59, 85.59, 85.58, 85.49, 85.29, 85.29, 85.29); x1 = c(0, 1e-10, 1e-08, 1e-06, 1e-05, 0.001, 0.1); y2 = c(22000, 20039, 15185,

我在R中有以下曲线图:

x = c(0, 1e-10, 1e-08, 1e-06, 1e-05, 0.001, 0.1);
y = c(22000, 21490, 17252, 9204, 6118, 5092, 4998);
z = c(85.59, 85.59, 85.58, 85.49, 85.29, 85.29, 85.29);

x1 = c(0, 1e-10, 1e-08, 1e-06, 1e-05, 0.001, 0.1);
y2 = c(22000, 20039, 15185, 7705, 5436, 5223, 4933);
z2 = c(85.59, 85.59, 85.58, 85.53, 85.46, 85.49, 85.49);

y = y / 60;

y2 = y2 / 60;


x = log(x);

par("mar")
par(mar = c(par("mar")[1:3], 5.1))

plot(x,y, type="n", lwd=4, ylab="", xlab="threshold", xaxt="n",yaxt="n")

axis(1,lwd=4)
axis(2,lwd=4)

points(x, y, type = "l", lwd=4)

points(x, y, col="red", cex=2, pch=19)

points(x, y2, lwd=4, type="o", lty=2, col="black");

points(x, y2, col="red", cex=2, pch=19);

par("usr")
par(usr = c(par("usr")[1:2], 84,86))

axis(4, lwd=4)
points(x, z, type="l", lwd=4)

points(x, z, col="blue", cex=2, pch=15)

points(x, z2, type="l", col="black", lty=2, lwd=4)

points(x, z2, col="blue", cex=2, pch=15)


mtext("Measure1", side = 4, col = "blue",line=3)
mtext("Measure2", side = 2, col = "red",line=3)
这对我来说几乎是完美的,但我只想根据以下几点调整它:

左y轴和x轴-它们更粗体,但由于某些原因,粗体部分没有延伸到所有轴上

我想把数字和标签的字体调大一点,也许用粗体字体

我甚至想把字体改成Times,但从我在网上看到的情况来看,这听起来很麻烦


谢谢

正如@thelatemail在上面的评论中提到的,您的第一个问题可以通过功能框回答:

如果只希望轴的边为粗体,则需要添加bty参数:

box(lwd=4, bty="u") # For all the different kind of boxes see ?par.
要更改标签的字体和大小,必须在绘图和轴语句中使用参数font和cex.lab或cex.axis:

axis(1, font=2, cex.axis=1.1) #font=2 correspond to bold face. See ?par for more information
最后,对于字体,您可以使用参数族,但是它在各种输出设备上的工作方式不同。您将在?x11的字体部分和中找到有关该主题的更多信息

以下是cex.axis设置为1.1、粗体字体和粗体U形框以及Times字体的绘图:

1。框是您的朋友-如果您添加lwd=4和type=l作为选项。2.帕尔是你的朋友。我认为,axis语句中的cex.lab和cex.axis将解决这个问题。3.我不太清楚。
axis(1, font=2, cex.axis=1.1) #font=2 correspond to bold face. See ?par for more information
axis(1, family="Times") #This will work with Cairo devices for example.