R-CoderDotCom / Ggcats
Licence: other
The geom you always wished for adding cats to ggplot2
Stars: ✭ 34
Programming Languages
r
7636 projects
Projects that are alternatives of or similar to Ggcats
Gganimate
A Grammar of Animated Graphics
Stars: ✭ 1,744 (+5029.41%)
Mutual labels: ggplot2, ggplot-extension, rstats
Ggbernie
A ggplot2 geom for adding Bernie Sanders to ggplot2
Stars: ✭ 96 (+182.35%)
Mutual labels: ggplot2, ggplot-extension, rstats
Ggsignif
Easily add significance brackets to your ggplots
Stars: ✭ 322 (+847.06%)
Mutual labels: ggplot2, ggplot-extension, rstats
Ggpointdensity
📈 📊 Introduces geom_pointdensity(): A Cross Between a Scatter Plot and a 2D Density Plot.
Stars: ✭ 286 (+741.18%)
Mutual labels: ggplot2, ggplot-extension, rstats
Ggforce
Accelerating ggplot2
Stars: ✭ 640 (+1782.35%)
Mutual labels: ggplot2, ggplot-extension, rstats
Patchwork
The Composer of ggplots
Stars: ✭ 2,002 (+5788.24%)
Mutual labels: ggplot2, ggplot-extension, rstats
Ggalt
🌎 Extra Coordinate Systems, Geoms, Statistical Transformations & Scales for 'ggplot2'
Stars: ✭ 561 (+1550%)
Mutual labels: ggplot2, ggplot-extension, rstats
Econocharts
Microeconomics/macroeconomics charts in ggplot2
Stars: ✭ 161 (+373.53%)
Mutual labels: ggplot2, ggplot-extension, rstats
Calendr
Ready to print calendars with ggplot2
Stars: ✭ 161 (+373.53%)
Mutual labels: ggplot2, ggplot-extension, rstats
Hrbrthemes
🔏 Opinionated, typographic-centric ggplot2 themes and theme components
Stars: ✭ 899 (+2544.12%)
Mutual labels: ggplot2, ggplot-extension, rstats
Tidytuesday
📊 My contributions to the #TidyTuesday challenge
Stars: ✭ 410 (+1105.88%)
Mutual labels: ggplot2, rstats
Tidymv
Tidy Model Visualisation for Generalised Additive Models
Stars: ✭ 25 (-26.47%)
Mutual labels: ggplot2, rstats
Ggdag
↙️ ↘️ An R package for working with causal directed acyclic graphs (DAGs)
Stars: ✭ 317 (+832.35%)
Mutual labels: ggplot-extension, rstats
Ggpage
Creates Page Layout Visualizations in R 📄📄📄
Stars: ✭ 306 (+800%)
Mutual labels: ggplot2, rstats
Upsetr
An R implementation of the UpSet set visualization technique published by Lex, Gehlenborg, et al..
Stars: ✭ 531 (+1461.76%)
Mutual labels: ggplot2, rstats
Ggextra
📊 Add marginal histograms to ggplot2, and more ggplot2 enhancements
Stars: ✭ 299 (+779.41%)
Mutual labels: ggplot2, rstats
Moderndive book
Statistical Inference via Data Science: A ModernDive into R and the Tidyverse
Stars: ✭ 527 (+1450%)
Mutual labels: ggplot2, rstats
Tidyexplain
🤹♀ Animations of tidyverse verbs using R, the tidyverse, and gganimate
Stars: ✭ 558 (+1541.18%)
Mutual labels: ggplot2, rstats
ggcats
The geom you always wished for adding cats to ggplot2. This package is part of the memeverse. The source code of this package is based on geom_image from ggimage.
- Follow me on Twitter
- Follow me on Facebook
- Visit my R programming site
What is the memeverse?
A collection of funny packages which can be interesting to create plots to show on a first lesson to new R students in order to motivate them learning the language. The other package of the (small) memeverse is ggbernie. Statistics and programming can be fun!
Installation
# install.packages("remotes")
remotes::install_github("R-CoderDotCom/[email protected]")
Available cats
There are 15 cats available:
"nyancat" (default), "bongo", "colonel", "grumpy", "hipster", "lil_bub", "maru",
"mouth", "pop", "pop_close", "pusheen", "pusheen_pc", "toast", "venus" and "shironeko"
Some examples
grid <- expand.grid(1:5, 3:1)
df <- data.frame(x = grid[, 1],
y = grid[, 2],
image = c("nyancat", "bongo", "colonel", "grumpy", "hipster",
"lil_bub", "maru", "mouth", "pop", "pop_close",
"pusheen", "pusheen_pc", "toast", "venus", "shironeko"))
library(ggplot2)
ggplot(df) +
geom_cat(aes(x, y, cat = image), size = 5) +
xlim(c(0.25, 5.5)) +
ylim(c(0.25, 3.5))
ggplot(mtcars) +
geom_cat(aes(mpg, wt), cat = "nyancat", size = 5)
ggplot(mtcars) +
geom_cat(aes(mpg, wt, size = cyl), cat = "toast")
I took the most part of the following code from Jonathan Hersh.
library(Ecdat)
data(incomeInequality)
library(tidyverse)
library(ggcats)
library(gganimate)
dat <-
incomeInequality %>%
select(Year, P99, median) %>%
rename(income_median = median,
income_99percent = P99) %>%
pivot_longer(cols = starts_with("income"),
names_to = "income",
names_prefix = "income_")
dat$cat <- rep(NA, 132)
dat$cat[which(dat$income == "median")] <- "nyancat"
dat$cat[which(dat$income == "99percent")] <- rep(c("pop_close", "pop"), 33)
ggplot(dat, aes(x = Year, y = value, group = income, color = income)) +
geom_line(size = 2) +
ggtitle("ggcats, a core package of the memeverse") +
geom_cat(aes(cat = cat), size = 5) +
xlab("Cats") +
ylab("Cats") +
theme(legend.position = "none",
plot.title = element_text(size = 20),
axis.text = element_blank(),
axis.ticks = element_blank()) +
transition_reveal(Year)
Note that the project description data, including the texts, logos, images, and/or trademarks,
for each open source project belongs to its rightful owner.
If you wish to add or remove any projects, please contact us at [email protected].