Creating scatter plots with Danfo.js
We can easily make scatter plots by specifying the plot type to be scatter
. For example, using the code from the preceding section, Creating line charts with Danfo.js, we can just change the plot type from line
to scatter
, and we get a scatter plot of the selected columns, as demonstrated in the following code block:
var layout = { title: "Time series plot of AAPL open and close points", width: 1000, yaxis: { title: 'AAPL open points', }, xaxis: { title: 'Date', } } var config = { columns: ["AAPL.Open", "AAPL.Close"], layout } new_df.plot(this_div()).scatter(config)
Running the preceding code cell gives the following output:
If you need to make a scatter plot between two specific...