#collapse-hide suppressPackageStartupMessages(library(tidyverse)) df <- tribble( ~kelompok, ~jumlah, ~nilai, 'Unit', .02, .04, 'FITB', .07, .04, 'FMIPA', .19, .08, 'FSRD', .02, .01, 'FTI', .09, .05, 'FTMD', .06, .03, 'FTSL', .06, .06, 'FTTM', .04, .04, 'ITB Pusat', .04, .09, 'LPPM', .02, .04, 'P/PP', .02, .06, 'SAPPK', .08, .05, 'SBM', .02, .05, 'SF', .06, .02, 'SITH', .07, .02, 'SPS', .02, .23, 'STEI', .1, .08 ) %>% pivot_longer(-(kelompok)) df %>% ggplot() + geom_col(mapping = aes(x = reorder(kelompok, value), y = value), fill = '#a6a6a6') + geom_col(data = filter(df, kelompok == 'FMIPA'), mapping = aes(x = kelompok, y = value), fill = '#4f81bd') + geom_col(data = filter(df, kelompok %in% c('SPS', 'ITB Pusat', 'P/PP', 'Unit', 'LPPM')), mapping = aes(x = kelompok, y = value), fill = '#95b3d7') + scale_y_continuous(labels = scales::percent) + labs(x = '', y = '', title = 'Meski FMIPA memiliki jumlah kegiatan P2M paling besar (2x STEI),\nnilainya tak sampai 1/2 dari Sekolah Pascasarjana (SPS)', subtitle = 'Sekolah Pascasarjana memberikan nilai kontribusi paling besar', caption = 'Distribusi jumlah dan nilai kegiatan penelitian dan pengabdian kepada masyarakat (P2M) oleh ITB tahun 2015\nKode oleh @aliakbars') + coord_flip() + facet_grid(. ~ name) + theme_minimal(base_size = 12)