3204 search results for "Ggplot"

Christmas Tree with ggplot

December 25, 2016
By
Christmas Tree with ggplot

# create data x <- c(8,7,6,7,6,5,6,5,4,5,4,3,4,3,2,3,2,1,0.5,0.1) dat1 <- data.frame(x1 = 1:length(x), x2 = x) dat2 <- data.frame(x1 = 1:length(x), x2 = -x) dat1$xvar <- dat2$xvar <- NA dat1$yvar <- dat2$yvar <- NA dat1$siz <- dat2$siz <- NA dat1$col <- dat2$col dec_threshold){ dat1$xvar <- row #sample(1:dat1$x1,1) dat1$yvar <- sample(1:dat1$x2-1,1) dat1$siz <- runif(1,0.5,1.5) dat1$col dec_threshold){ dat2$xvar <-

Read more »

Ordering Categories within ggplot2 Facets

December 22, 2016
By
Ordering Categories within ggplot2 Facets

I saw Simon Jackson’s recent blog post regarding ordering categories within facets. He proposed a way of dealing with the problem of ordering variables shared across facets within facets. This problem becomes apparent in text analysis where words are shared … Continue reading →

Read more »

Creating beautiful charts in chinese with ggplot2

December 9, 2016
By
Creating beautiful charts in chinese with ggplot2

Before we start My chinese skills are poor and biased. I did learn during my internship and I continue to study while I can translate "last year our exports were 19,000 USD million" but I don't know all the colors. I will use this dataset and for the example and you can use any chinese font you want. In this...

Read more »

scatterpie for plotting pies on ggplot

December 6, 2016
By
scatterpie for plotting pies on ggplot

Plotting pies on ggplot/ggmap is not an easy task, as ggplot2 doesn’t provide native pie geom. The pie we produced in ggplot2 is actually a barplot transform to polar coordination. This make it difficult if we want to produce a map like the above screenshot, which was posted by Tyler Rinker, the author of R package pacman.

Read more »

The hourly heatmap with ggplot2

November 30, 2016
By
The hourly heatmap with ggplot2

a quick follow up to my last post - I’ve had a few folk get in touch following my last post, all commenting on the last plot : Most of these enquiries went along the following lines: “I hadn’t thought of doing that. It looks really ...

Read more »

ggplot2: multiple legends for the same aesthetic

November 30, 2016
By
ggplot2: multiple legends for the same aesthetic

When working with ggplot2 you don't have to care about legend, it is automatically produced according to the mapped aesthetics. But producing separate legends for the same aesthetic is not easy. This article proposes a solution! The post ggplot2: multiple legends for the same aesthetic appeared first on Quantide - R training & consulting.

Read more »

How to create a ggplot Theme – Unicorn Edition

November 29, 2016
By
How to create a ggplot Theme – Unicorn Edition

Themes are an convenient way to give ggplot charts an individualized, sometimes stylish look. Most of the time, I rely on the ggthemes package and the Economist style. Last week colleagues asked me to change the look of my charts. We joked around and I...

Read more »

The Hitchhiker’s Guide to Ggplot2 in R

November 29, 2016
By
The Hitchhiker’s Guide to Ggplot2 in R

About the book This is a technical book. The scope of the book is to go straight to the point and the writing style is similar to a recipe with detailed instructions. It is assumed that you know the basics of R and that you want to learn how to c...

Read more »

Daily metric tracking with ggplot2

November 26, 2016
By
Daily metric tracking with ggplot2

In my role I have to produce a lot of run charts and control charts for monthly data, but sometimes there are processes behind the run charts that merit looking at the data on a daily basis. It can become impractical to start producing run c...

Read more »

Global sea ice time series visualization sandbox with R, ggplot, and plotly

November 22, 2016
By

In the past couple of weeks I’ve noticed a flurry of visualizations of global sea ice extent on social media. If you’re like me, and curious to see what the data look like yourself, here’s a bit of R code to fetch and visualize the most recent da...

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)