in my research I'm plotting relative yields (Y) to the availability of a nutrient (TestValue) in soil measured by different methods/tests (Test). As I want a separate plot for each of the methods/tests used, I made use of 'facet_wrap' within ggplot. This is working fine, BUT the problem is that I don't manage to have an equal amount of ticks on the x axis of each of the plots. I've already tried with 'pretty_breaks' or writing my own function to calculate the position of the breaks but this hasn't been succesfull... Hopefully one of you can help me out or redirect me to the solution here on stackOverflow.
In order to illustrate my question, I place underneath an example of my problem:
TestValue<-c(0.03,2.5,5.0,7.5,10,3,20,30,40,60,20,500,750,1000,1250)
Test<-c("A","A","A","A","A","B","B","B","B","B","C","C","C","C","C")
Y<-c(50,80,80,95,105,50,80,80,95,105,50,80,80,95,105)
df<-data.frame(TestValue,Test,Y)
plot_curve<-ggplot(df,aes(x=TestValue,y=Y,Test))+
geom_point()+
facet_wrap(~Test,ncol=2,scales="free")+
scale_x_continuous(expand=c(0,0))
plot_curve
This results in three figures but with different amount of ticks. Preferably I have have the same amount of ticks on each of the x axes and if possible on the same position.
thanks in advance!