2186 search results for "ggplot2"

Spaghetti plots with ggplot2 and ggvis

August 19, 2015
By
Spaghetti plots with ggplot2 and ggvis

This post was motivated by this article that discusses the graphics and statistical analysis for a two treatment, two period, two sequence (2x2x2) crossover drug interaction study of a new drug versus the standard. I wanted to write about implementing those graphics and the statistical analysis in R. This post is devoted to the different

Read more »

Visualising thefts using heatmaps in ggplot2

August 17, 2015
By
Visualising thefts using heatmaps in ggplot2

This is a continuation of my previous article, where I gave a basic overview of how to construct heatmaps in R. Here, I will show you how to use R packages to build a heatmap on top of the map of Chicago to see which areas have the most amount of crime. We will require

Read more »

A Path Towards Easier Map Projection Machinations with ggplot2

July 24, 2015
By
A Path Towards Easier Map Projection Machinations with ggplot2

The $DAYJOB doesn’t afford much opportunity to work with cartographic datasets, but I really like maps and tinker with shapefiles and geo-data when I can, plus answer a ton of geo-questions on StackOverflow. R makes it easy—one might even say too easy—to work with maps. All it takes to make a map of the continental

Read more »

This is one of my favorite ggplot2 plots I’ve ever made, but it…

July 21, 2015
By
This is one of my favorite ggplot2 plots I’ve ever made, but it…

This is one of my favorite ggplot2 plots I’ve ever made, but it makes me sad. Can you deduce what this plot conveys? Explain the sporadically dashed colored horizontal bands. Explain the red vertical bars. Explain the black vertical bars. If you answer all three correctly, and you can explain the rest of the plot, I’ll give you the code.

Read more »

Line plots of longitudinal summary data in R using ggplot2

July 9, 2015
By
Line plots of longitudinal summary data in R using ggplot2

I recently had an email for a colleague asking me to make a figure like this in ggplot2 or trellis in R: As I know more about how to do things in ggplot2, I chose to use that package (if it wasn't obvious from the plot or other posts). Starting Point Cookbook R/) has a

Read more »

Shiny 0.12: Interactive Plots with ggplot2

June 16, 2015
By
Shiny 0.12: Interactive Plots with ggplot2

Shiny 0.12 has been released to CRAN! Compared to version 0.11.1, the major changes are: Interactive plots with base graphics and ggplot2 Switch from RJSONIO to jsonlite For a full list of changes and bugfixes in this version, see the NEWS file. To install the new version of Shiny, run: install.packages(c("shiny", "htmlwidgets")) htmlwidgets is not

Read more »

R Recipe: Aligning Axes in ggplot2

May 27, 2015
By
R Recipe: Aligning Axes in ggplot2

Faceted plots in ggplot2 are phenomenal. They give you a simple way to break down an array of plots according to the values of one or more categorical variables. But what if you want to stack plots of different variables? Not quite so simple. But certainly possible. I gathered together this solution from a variety The post

Read more »

A quick, incomplete comparison of ggplot2 & rbokeh plotting idioms

May 26, 2015
By
A quick, incomplete comparison of ggplot2 & rbokeh plotting idioms

I set aside a small bit of time to give rbokeh a try and figured I’d share a small bit of code that shows how to make the “same” chart in both ggplot2 and rbokeh. What is Bokeh/rbokeh? rbokeh is an htmlwidget wrapper for the Bokeh visualization library that has become quite popular in Python

Read more »

Put Google Scholar citations on your personal website with R, scholar, ggplot2 and cron

May 20, 2015
By
Put Google Scholar citations on your personal website with R, scholar, ggplot2 and cron

I have been looking for a solution to put my Google Scholar citations on my personal website for quite some time now. Some apps/gadgets seem to have existed to do so (e.g. citations-gadget), but none seem to be functioning today because of chan...

Read more »

Reinventing the wheel for ordination biplots with ggplot2

May 14, 2015
By
Reinventing the wheel for ordination biplots with ggplot2

I’ll be the first to admit that the topic of plotting ordination results using ggplot2 has been visited many times over. As is my typical fashion, I started creating a package for this purpose without completely searching for existing solutions. Specifically, the ggbiplot and factoextra packages already provide almost complete coverage of plotting results from

Read more »