finis_long <- structure(list(tercil_SS = c("do 200 žáků", "do 200 žáků",
"mezi 200 a 400 žáky", "mezi 200 a 400 žáky", "nad 400 žáků",
"nad 400 žáků"), zrizovatel = structure(c(2L, 1L, 2L, 1L,
2L, 1L), .Label = c("veřejné", "soukromé/církevní"), class = "factor"),
pomer = c(1.01037483130724, 1.59056222846675, 2.86757887013722,
5.41665516204124, 5.19713582708909, 9.45677324152481), tercil = structure(c(1L,
1L, 2L, 2L, 3L, 3L), .Label = c("do 200 žáků", "mezi 200 a 400 žáky",
"nad 400 žáků"), class = "factor")), class = c("grouped_df",
"tbl_df", "tbl", "data.frame"), row.names = c(NA, -6L), groups = structure(list(
tercil_SS = c("do 200 žáků", "mezi 200 a 400 žáky",
"nad 400 žáků"), .rows = structure(list(1:2, 3:4, 5:6), ptype = integer(0), class = c("vctrs_list_of",
"vctrs_vctr", "list"))), row.names = c(NA, -3L), class = c("tbl_df",
library(ggplot2) "tbl", "data.frame"), .drop = TRUE))
plot <- ggplot(finis_long, aes(x=tercil_SS, y=pomer, fill=tercil_SS,
label = scales::comma(pomer, accuracy = 1, scale = 1, prefix = "", suffix = "",
big.mark = " ", decimal.mark = ","))) +
geom_col()+
geom_text(aes(label=scales::comma(pomer, accuracy = 0.1, decimal.mark = ","),
vjust=-1))+
scale_fill_manual(values=c("#F2CE6E", "#EF726B","#74496B", "#67A88F")) +
theme_minimal() +
theme(legend.position = 'none',
legend.title = element_blank(),
text = element_text(size=15),
plot.title = element_text(margin=margin(0,0,15,0)),
axis.title.x=element_blank(),
axis.title.y=element_blank(),
panel.spacing = unit(2, "lines"),
panel.grid.major.x = element_blank()
) +
scale_y_continuous(label=scales::comma_format(accuracy = 1, scale = 1, prefix = "", suffix = "",
big.mark = " ", decimal.mark = ","),
limits = c(0,10)) +
facet_grid(rows= vars(zrizovatel)) +
ggtitle("Průměrný počet nepedagogických zaměstnanců v SŠ")
plot