2660 search results for "ggplot2"

Five Interactive R Visualizations With D3, ggplot2, & RStudio

August 24, 2015
By
Five Interactive R Visualizations With D3, ggplot2, & RStudio

Plotly has a new R API and ggplot2 library for making beautiful graphs. The API lets you produce interactive D3.js graphs with R. This post has five examples. Head to our docs to get a key and you can start making, embedding, and sharing plots. The code below produces our first plot. library(plotly) set.seed(100) d <- diamonds plot_ly(d, x = carat,

Read more »

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 »

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 »

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 »

Sponsors

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)