dreamRs / esquisse

RStudio add-in to make plots interactively with ggplot2
https://dreamrs.github.io/esquisse
Other
1.77k stars 229 forks source link

stat = "identity" #43

Closed ablack3 closed 5 years ago

ablack3 commented 5 years ago

Is it possible to use esquisse to create a barplot similar to the output of this code that uses the stat = "identity" argument?

library(dplyr)
library(ggplot2)

df <- data.frame(age_group = c("0-18", "19-65", "65+"), n = c(100000, 101000, 103000))

ggplot(df, aes(x = age_group, y = n)) + 
     geom_bar(stat = "identity")
ablack3 commented 5 years ago

Nevermind I figured it out. Should have played around with it a bit more before opening the issue. I was able to easily get this which is perfect.

ggplot(data = df) +
  aes(x = skin_color, weight = n) +
  geom_bar(fill = '#0c4c8a') +
  theme_minimal()