Hi,
How can I make this scatterplot "wider" around the 0 (or better between -1.5 and +1.5) to see clearly if there is any trend? I would like to make a magnification of the area where all the points are overlapping without having to subset/select only those genes and plot it in again? is it possible to do in R (to be honest I am not sure even how to search for it)? here my code:
#scatterplot
library(ggplot2)
library(ggrepel)
#general graph no labels
ggplot(data = Dpg_TF, aes(x= log2FC, y= -1*log10(p_value)))+ ggtitle("Transcription factors genes Dpg dataset") +
geom_point() +
geom_point(data= dfdown, aes(x= log2FC, y= -1*log10(p_value)), color = "blue")+
geom_point(data= dfup, aes(x= log2FC, y= -1*log10(p_value)), color = "red")+
geom_hline(yintercept = -1*log10(0.05),linetype = "dashed") +
geom_hline(yintercept = -1*log10(0.01),linetype = "dashed", color = "black")+
geom_text(mapping=aes(x=-140,y=2.0),label=paste("0.01"), color = "black", size = 2.5, vjust=-0.5) +
geom_hline(yintercept = -1*log10(0.001),linetype = "dashed", color = "black") +
geom_text(mapping=aes(x=-140,y=3.0),label=paste("0.001"), color = "black", size = 2.5, vjust=-0.5)+
geom_vline(xintercept = 1.5,linetype = "dashed")+
geom_vline(xintercept = -1.5,linetype = "dashed")
thank you!!
Camilla
your code
+ coord_cartesian(xlim = c(-1.5,1.5))
zooms onto the coordinates.