So the next couple examples are easy enough that I'm not going to

do code demonstrations, I'm just going to show you the output.

A histogram is easy enough, you just do type = "histogram" and

you need one x variable.

Show it, it looks like this.

It'll actually show you the height of the bars as you move your mouse along.

And you can change the colors, do side by side histograms, and

a variety of other things in plot_ly, and they all kind of work in the obvious way.

So for boxplot here, plot_ly data frame is iris in this case,

y is petal length, and then color is species and type = "box".

So this is going to create separate boxplots, one for each species type.

Okay, and here it is, our three species.

When you hover over the box it gives you the values for the boxplot, so

this the 25th percentile, the 75th percentile, the median.

And then the whiskers extend out to 1.5 times

the distance between these two values.

That was Tukey's idea, that references back to the normal distribution,

the 1.5 times the inter-quartile range.

So here's your boxplot.

If you have an outlier like this, it'll actually show you the little point for

the outlier, okay?