Ggplot2

Some ggplot2 Features

In this post, I am covering a few things that I didn’t touch upon in the class previously. For this we will use mpg data from ggplot2 package. If you want to know more about the data and the variables, run the following command in your R console: ?ggplot2::mpg Get structure of the mpg data head(mpg) ## # A tibble: 6 x 11 ## manufacturer model displ year cyl trans drv cty hwy fl class ## <chr> <chr> <dbl> <int> <int> <chr> <chr> <int> <int> <chr> <chr> ## 1 audi a4 1.

Extending ggplot2

There are numerous ways in which you can extend ggplot2 package. In this post, I am going to talk about 3 packages that are relevant to us immediately. Extrafont The first package is extrafont, which enables importing font files from your computer to R. You will have to do this only once after you install the package and then in future whenever you want to use different fonts, you can simply call them by name in ggplot2.

Celebrating India's Decriminalization of Homosexuality

I woke up to great news today! Five judges of the Supreme Court of India have unanimously decrimialized homosexuality. A few months back, I made a simple t-shirt design using R. That time, it was an R exercise for me and I didn’t share it with many people. This is my small gift to LGBTQ Indians. Although I have made this using “Om”, many religious symbol are possible if you know the correct character in Wingdings font.