Basic geom_qq graph
A quantile-quantile graph is used to determine whether a range of numbers follows a certain distribution: the closer the data points are to being a straight line, the closer the data is to the distribution. (The default distribution is normal.) This dataset gives the daily change in the S&P 500, as well as Apple, Microsoft, IBM, and Starbucks stocks between January 2007 and February 2016.
library(plotly) stocks <- read.csv("https://raw.githubusercontent.com/plotly/datasets/master/stockdata2.csv", stringsAsFactors = FALSE) p <- ggplot(stocks, aes(sample=change)) + geom_qq() ggplotly(p)