datascience.tables.Table.interactive_plots

classmethod Table.interactive_plots()[source]

Redirects plot, barh, hist, and scatter to their plotly equivalents

Sets a global variable that redirects Table.plot to Table.iplot, Table.barh to Table.ibarh, etc. This can be turned off by calling Table.static_plots.

>>> table = Table().with_columns(
...     'days',  make_array(0, 1, 2, 3, 4, 5),
...     'price', make_array(90.5, 90.00, 83.00, 95.50, 82.00, 82.00),
...     'projection', make_array(90.75, 82.00, 82.50, 82.50, 83.00, 82.50))
>>> table
days | price | projection
0    | 90.5  | 90.75
1    | 90    | 82
2    | 83    | 82.5
3    | 95.5  | 82.5
4    | 82    | 83
5    | 82    | 82.5
>>> table.plot('days') 
<matplotlib line graph with days as x-axis and lines for price and projection>
>>> Table.interactive_plots()
>>> table.plot('days') 
<plotly interactive line graph with days as x-axis and lines for price and projection>