ABSTRACT

The add_bars() and add_histogram() functions wrap the bar and histogram plotly.js trace types. This chapter compares the default binning algorithm in plotly.js to a few different algorithms available via the hist() function. It compares the default binning algorithm in plotly.js to a few different algorithms available in R via the hist() function. Visualizing multiple discrete distributions is difficult. The subtle complexity is due to the fact that both counts and proportions are important for understanding multi-variate discrete distributions. The distribution of clarity within “Ideal” diamonds seems to be fairly similar to other diamonds, but it’s hard to make this comparison using raw counts.