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...