I just started using 'ggplot2', and am running into some problems with the graphical usability.
I wanted to do a simple regression biplot. However, I am not quite convinced by the themes offered by 'ggplot2' and 'ggthemes'.
My code thus far is as follows:
ggplot(data, aes(APE.15N, APE.13C)) + geom_point(size=3) + geom_smooth(method="lm", se=F, col="black") + theme_light(base_size = 20) + annotate("text", x=.9, y=1.35, label="R²=0.3192, p<0.001", size=6.5) + coord_cartesian(xlim = c(.25, 1.1), ylim = c(1.05, 2.55)) + ylab(expression(paste('APE '^{13}, "C", sep = ""))) + xlab(expression(paste('APE '^{15}, "N", sep = ""))) ...which gives me the following plot:
Now, I would like to increase the axis-line thickness as well as the tick thickness to at least 2 points, add minor ticks, get rid of the background grid, and change the axis colour to black.
I just can't figure out how...
I would imagine the result as in the following graph:
Thank you, your help is very much appreciated
21 Answer
To increase the axis-line thickness and change the color to black:axis.line = element_line(colour = 'black', size = 2)
To increase the tick thickness:axis.ticks = element_line(colour = "black", size = 2)
To add minor ticks:
Minor ticks are not currently an option of ggplot2. There are many other stackoverflow questions about minor ticks that I would suggest looking at. You can try adding minor_breaks in scale_x_continuous, but that would require a knowing the actual minor ticks you want.
To remove the background grid:panel.grid.major = element_blank(), panel.grid.minor = element_blank()