The Hitchhiker’s Guide to Ggplot2 + The Hitchhiker’s Guide to Plotnine

[This article was first published on Pachá, and kindly contributed to R-bloggers]. (You can report issue about the content on this page here)
Want to share your content on R-bloggers? click here if you have a blog, or here if you don't.

About the bundle

Jodie Burchell and yours truly have published two books, The Hitchhiker’s Guide to Ggplot and The Hitchhiker’s Guide to Plotnine, on graphing in both R and Python using ggplot2 and plotnine, which are cross-language equivalents.

You can get the two books together for a special price if you buy The Hitchhiker’s Guide to Ggplot2 + The Hitchhiker’s Guide to Plotnine.

If you’d like to create highly customised plots, including replicating the styles of XKCD and also learning Python by doing what you do in R or viceversa, this is your combo!

This combo includes the R Markdown and Jupyter notebooks with all the exercises from the books.

Here’s a part of the steps to create the covers:

library(dplyr)
library(ggplot2)
library(grid)
library(datasauRus)

g <- ggplot() +
  geom_point(
    data = filter(datasaurus_dozen, dataset == "dino"),
    aes(x = x, y = y), color = "#9ccbc7", size = 4
  ) +
  theme_minimal() + 
  theme(
    plot.background = element_rect(fill = "#007d73"),
    axis.line = element_line(color = "#007d73"),
    panel.grid.minor = element_blank(),
    axis.ticks = element_line(color = "#007d73"),
    axis.text = element_text(color = "#9ccbc7",
                             family = "DecimaMonoPro",
                             size = 16),
    axis.title = element_text(color = "#9ccbc7",
                              family = "DecimaMonoPro",
                              size = 24)
  )

print(
  g, 
  vp = viewport(
    angle = 15,
    width = unit(.75, "npc"),
    height = unit(.75, "npc")
  )
)

To leave a comment for the author, please follow the link and comment on their blog: Pachá.

R-bloggers.com offers daily e-mail updates about R news and tutorials about learning R and many other topics. Click here if you're looking to post or find an R/data-science job.
Want to share your content on R-bloggers? click here if you have a blog, or here if you don't.

Never miss an update!
Subscribe to R-bloggers to receive
e-mails with the latest R posts.
(You will not see this message again.)

Click here to close (This popup will not appear again)