I successfully plot my data using ggplot() in R. However, when I choose to have the y- and x- axis in log10 scaling, the first tick on the y-axis (0.01) is further apart for the intersection than the first tick on the x-axis (0.01). I need the x-axis to have the same "scaling" as the y-axis.
Here is my code. Also the data (use sep="\t"). And an image of how the graph looks for me. Im sorry the data is on an external link, I couldnt figure out how to give it to you as reproducible data otherwise!
FILE1 <- read.delim("example.txt", sep="\t", header = TRUE)
EXAMPLE_PLOT <- ggplot(FILE1, aes_string(x = colnames(FILE1)[1], y = colnames(FILE1)[2])) +
geom_point(size=4) +
ggtitle("EXAMPLE_PLOT") +
theme(plot.title = element_text(family="Calibri", color="black",
face="bold", size = 32, hjust=0)) +
theme(plot.background= element_blank(),
panel.grid.major = element_blank(),
panel.grid.minor = element_blank())+
theme(panel.background = element_blank())+
theme(axis.line.x = element_line(color="black", size = 1),
axis.line.y = element_line(color="black", size = 1))+
theme(axis.ticks = element_line(color="black", size = 1))+
theme(axis.ticks.length = unit(0.3,"cm"))+
theme(axis.title = element_text(family = "Calibri",
color="black", size=17, face="bold"))+
theme(axis.text.x = element_text(family = "Calibri", color="black",
size=14, face="bold"),
axis.text.y = element_text(family = "Calibri", color="black",
size=14, face="bold"))+
scale_x_log10(breaks=c(.01, .1, 1, 10, 100))+
scale_y_log10(breaks=c(.01, .1, 1, 10, 100))+
geom_smooth(method=lm)
EXAMPLE_PLOT

