0

Below I am trying to plot latitude on the x axis and then growth data of specimen on the Y axis. The result of the code below orders the Y axis numerically, whereas I would prefer the x axis (latitude) is in numerical order.

Any thoughts on the best way to reorder the x axis?

viz_moss_data <- ggplot(data = merged_subsets_2, aes(x=Latitude,y=k))+
  geom_point(color= "darkblue")+
  labs(title = "'K' von Bertalanffy growth coefficient vs Mollusk Species",subtitle = "Mollusk Specimen sourced from Moss et al. 2016",y= "k growth coefficient",x="Latitude", color="New legend label")
viz_moss_data
  • 3
    Welcome to SO, Max! There's a bit of context missing here ... we don't see the image, and we have no idea what your data looks like (other than inferring a few column names). Can you [edit] your question and provide some sample representative data (perhaps via `dput(head(x))` or building data programmatically (e.g., `data.frame(...)`), possibly stochastically after `set.seed(1)`) and a small image of your plot? (You won't be able to *show* the image yet, just a link, but one of us can easily make it visible for you.) – r2evans Jun 06 '20 at 22:21
  • 3
    (One way to look at asking questions is to realize if we try to run your code, our first problem is `Error: object 'merged_subsets_2' not found`. Also, it helps when problems and the relevant data are *small* or present in R's `datasets` package (or some common package related to the question). Thanks! Some references for reproducible, self-contained questions: https://stackoverflow.com/q/5963269, [mcve], and https://stackoverflow.com/tags/r/info.) – r2evans Jun 06 '20 at 22:23

0 Answers0