Creating statistical charts with Plotly.js
Statistical charts are different types of charts used mostly by statisticians or data scientists to convey information. Some examples of statistical plots are histograms, box plots, violin plots, density plots, and so on. In the following sub-section, we'll briefly cover three types of statistical plots—histograms, box plots, and violin plots.
Creating histogram plots with Plotly.js
A histogram is used to represent the distribution or spread of numerical/continuous data. A histogram is similar to a bar chart, and sometimes people may confuse the two. A simple way to differentiate between them is the type of data they can show. A histogram works with continuous variables instead of categorical variables, and only needs a single value as data.
In the following code snippet, we show an example of a histogram with generated random numbers:
var x = []; for (let i = 0; i < 1000; i ++) { //generate random numbers x[i...