I\'m looking for a way to use long variable names on the x axis of a plot. Of course I could use a smaller font or rotate them a little but I would like keep them vertical a
If you don't want a break at each space, you could alternatively use the \n (new line) within the call to scale_x_continuous:
my.labels <- c("Ambystoma\nmexicanum",
"Daubentonia madagascariensis",
"Psychrolutes marcidus") # first create labels, add \n where appropriate.
myplot +
scale_x_discrete(labels= my.labels)
Note that only the first name (Ambystoma mexicanum) will break using the new line command (\n).