Created
December 24, 2020 11:21
-
-
Save gkaramanis/513f7c738e92d354814d252d76df098c to your computer and use it in GitHub Desktop.
Text in polar coordinations with ggfittext
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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