File:Geomcolviridis.png: Revision history

Jump to navigation Jump to search

Diff selection: Mark the radio buttons of the revisions to compare and hit enter or the button at the bottom.
Legend: (cur) = difference with latest revision, (prev) = difference with preceding revision, m = minor edit.

30 August 2022

  • curprev 11:5011:50, 30 August 2022Brb talk contribs 806 bytes +806 Modify the example from https://datavizpyr.com/re-ordering-bars-in-barplot-in-r/ to allow filled colors and facet. <pre> library(tidyverse) library(gapminder) library(viridis) theme_set(theme_bw(base_size=16)) pop_df <- gapminder %>% filter(year==2007)%>% group_by(continent) %>% summarize(pop_in_millions=sum(pop)/1e06) pop_df2 <- tibble(class=rbinom(nrow(pop_df), 1, .5), pop_df) pop_df2 <- pop_df2 |> mutate(pop_in_millions = pop_in_millions-1900) pop_df2 %>% ggplot(aes...