I'm making a polar-transformed barplot in which several of the x-axis labels overlap with the plot area. For context, I'm working on a shiny application that you can find a copy of here.
I've tried using theme(axis.text.x = element_text(vjust = -someNumber))
, but it doesn't seem to be doing anything.
Here is a reproducible example to demonstrate the problem:
## Tiny example plot
### Libraries
require(dplyr)
#> Loading required package: dplyr
#>
#> Attaching package: 'dplyr'
#> The following objects are masked from 'package:stats':
#>
#> filter, lag
#> The following objects are masked from 'package:base':
#>
#> intersect, setdiff, setequal, union
require(ggplot2)
#> Loading required package: ggplot2
### Data
categories <- c("foo", "bar", "baz", "biff", "zoop", "sesquipedalian")
values <- c(100, 150, 42, 135.45, 177, 182)
plotThis <- tibble(names = categories, values = values)
### Plot the plot
ggplot(plotThis, aes(x = names, y = values)) +
geom_bar(stat = "identity", color = "black", fill = "blue", width = 1) +
coord_polar(clip = "off") +
theme_minimal() +
scale_y_continuous(name = NULL, breaks = NULL) +
xlab(NULL)
Created on 2022-02-15 by the reprex package (v2.0.1)
How can I move the 'sesquipedalian' label (or, if necessary, all labels) further away from the centre so that it does not overlap with the plot?