# Posts Tagged ‘ ggplot2 ’

## On the interpretation of a regression model

May 18, 2018
By

Yesterday, NaytaData (aka @NaytaData ) posted a nice graph on reddit, with bicycle traffic and mean air temperature, in Helsinki, Finland, per day, I found that graph interesting, so I did ask for the data (NaytaData kindly sent them to me tonight). df=read.csv("cyclistsTempHKI.csv") library(ggplot2) ggplot(df, aes(meanTemp, cyclists)) + geom_point() + geom_smooth(span = 0.3) But as mentioned by someone on twitter, the interpretation is somehow trivial : people get out on their…

## ggplot2: How Geoms & Aesthetics ≈ Whipped Cream

March 21, 2018
By

In this post I have a few goals: 1. Become (re-)familiar with available geoms 2. Become (re-)familiar with aesthetic mappings in geoms (stroke who knew?) 3. Answer these questions: How often do various geoms appear and how often do they … Continue reading →

## Math Notation for R Plot Titles: expression, bquote, & Greek Letters

March 15, 2018
By

In this post you will learn: How to create expressions that have mixed (1) strings, (2) expressions, (3) variables & (4) Greek letters How to pass in values as variables to an expression I wanted to name this post “Ahhhhhhhhhhh #\$@%&!!!!” … Continue reading →

## Animating a spinner using ggplot2 and ImageMagick

July 18, 2017
By

It’s Sunday, and I [Bob] am just sitting on the couch peacefully ggplotting to illustrate basic sample spaces using spinners (a trick I’m borrowing from Jim Albert’s book Curve Ball). There’s an underlying continuous outcome (i.e., where the spinner lands) and a quantization into a number of regions to produce a discrete outcome (e.g., “success” […] The post Animating a spinner using ggplot2 and ImageMagick appeared first on Statistical Modeling,…

## Ordering Categories within ggplot2 Facets

December 23, 2016
By

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 →

## 3D density plot in R with Plotly

June 30, 2016
By

In Bayesian nonparametrics, many models address the problem of density regression, including covariate dependent processes. These were settled by the pioneering works by [current ISBA president] MacEachern (1999) who introduced the general class of dependent Dirichlet processes. The literature on dependent processes was developed in numerous models, such as nonparametric regression, time series data, meta-analysis, to cite but […]

May 12, 2016
By

Steve Simpson (@data_steve) created the googleformr package to enable users to easily send information to a Google Form.  It’s a nice way to send and securely store data via R and the price is great…FREE! A Pneumatic Road Tube Allegory…Kinda … Continue reading →

## How do I re-arrange??: Ordering a plot re-revisited

March 3, 2016
By

Several years back I wrote a two part blog series in response to seeing questions about plotting and reordering on list serves, talkstats.com, and stackoverflow.  Part I discussed the basics of reordering plots by reordering factor levels.  The essential gist was: … Continue reading →

## The Simple Reason Sanders Is Winning

February 13, 2016
By

Sanders has way more backers across the United States (with the possible exception of the South). Hillary Clinton might be doing well at the polls. However, the shocking fact of polling is that only 8-9% of those asked to participate in polls combined ...

## Repel overlapping text labels in ggplot2

January 8, 2016
By

A while back I showed you how to make volcano plots in base R for visualizing gene expression results. This is just one of many genome-scale plots where you might want to show all individual results but highlight or call out important results by labeli...