I have a plot with a logarithmic scale:
png("test.png")
set.seed(20)
x = 1:100
y = sample(100)
plot(x,y,log="x",xaxt='n',cex.axis=2)
axis(1,cex.axis=4)
dev.off()
test.png
yields:
I want 2 things,
Thank you.
Something like this? We can use mapply()
which calls axis()
once for each tick location returned by axTicks()
. Doing this allows you to keep the missing values that are not shows to avoid over plotting. Also, I threw in some padding with padj
so your values aren't entering into the plot itself.
png("test.png")
set.seed(20)
x = 1:100
y = sample(100)
plot(x,y,log="x",xaxt='n',cex.axis=2)
mapply(axis,
side = 1,
at = axTicks(1),
labels = axTicks(1),
cex.lab=4,
cex.axis=4,
cex.main=4,
cex.sub=4,
padj = 0.5)