I have the following plot in 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)
It is almost perfect for me, but I just want to tweak it according to the following things:
-
The left y axis and the x axis – they are bolder, but for some reason, the bold part is not stretching all over the axes.
-
I want to make the font of the numbers and the labels a bit bigger, and maybe in bold font face.
-
I may even want to change the font to Times, but it sounds to me like a lot of hassle, from what I have seen online.
Thanks!
As mentionned by @thelatemail in the comment above, your first question can be answered by the function
box:If you want only the sides with the axes to be bold, then you want to add a
btyparameter:To change the font and the size of the labels you have to use parameters
fontandcex.laborcex.axisin yourplotandaxisstatements:And finaly for the font, you can use argument
family, however it will work differently with all kinds of output device. You will find more information on that subject in section “Fonts” of?x11and in this answer.Here is your plot with

cex.axisset up at 1.1, bold fonts and bold U-shaped box and in Times font: