Skip to content

Instantly share code, notes, and snippets.

@gkaramanis
Created December 24, 2020 11:21
Show Gist options
  • Save gkaramanis/513f7c738e92d354814d252d76df098c to your computer and use it in GitHub Desktop.
Save gkaramanis/513f7c738e92d354814d252d76df098c to your computer and use it in GitHub Desktop.
Text in polar coordinations with ggfittext
library(ggfittext)
library(ggplot2)
sensor_data = data.frame(
value = runif(8, min = 0, max = 120),
label = paste0("sensor", 1:8)
)
ggplot(sensor_data) +
geom_col(aes(x = label, y = value)) +
coord_polar() +
geom_fit_text(aes(x = label, ymin = 130, ymax = 150, label = label), min.size = 0, grow = TRUE) +
theme_minimal() +
theme(
axis.text = element_blank(),
axis.title = element_blank()
)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment