Working with borehole data, attempting to plot the cross section with R. I'm rusty and am having trouble organizing the plot the way I want. From the image, my bar plot is not tracking with y axis values displaying the depth of the borehole, instead it tracks with the Layers (categorical data).
Very similar question was asked here but I could not get the code to work for my situation because my data is formatted differently.
Just to clarify, I want to put the y axis in increasing numerical order, starting at 0, with the categorical layer data mapped to the correct part of that depth.
my code:
g2 <- ggplot(data=df3,
mapping = aes(x=PointID,y=End_Depth,
fill=`Layer`)) +
geom_col(colour="black") +
labs(y="Depth")