I have a dataset with y-axis = diversity indices and x-axis = depth. I am looking at how diversity changes with depth (increases/decreases). It is informative to visualize these changes over depth (so transforming isn't helpful), however it is difficult with the disparity between number of samples for different depths (more samples at shallower versus deeper depths. With the following code:
breaks_depth=c(0,50,100,150,250,350,450,500,1200) ggplot(data=df, aes(x=Depth, y=Diversity)) + geom_line()+ scale_y_continuous(breaks=seq(0,1400,200), limits=c(0,1400))+ scale_x_continuous(breaks=breaks_depth, limits=c(0,1200)) I get the following plot:
I would like to get a plot such that the distance between 500m and 1200m depth is smaller and the distance between the shallower depths (0-150m) is greater. Is this possible? I have tried expand and different break and limit variations. The dput() of this dataset can be found here. The rownames are the sample IDs and the columns I am using for the plot are: y-axis=invsimpson_rd, and x-axis=Depth_rd. TIA.
****EDIT***** Winner code and plot modified from Calum's answer below.
ggplot(data=a_div, aes(x=Depth_rd, y=invsimpson_rd)) + geom_line()+ scale_y_continuous(breaks=seq(0,1400,200), limits=c(0,1400))+ scale_x_continuous(trans="log10",breaks = c(0, 15,25,50,100,150,200,250,300,350,400,450, seq(600, 1200, by = 200))) 



transargument toscale_x_continuous. Can youdput()your data so we can play around?