Skip to content

Overview

PyConsole supports visualization with plotly

Usage

In order for plotly to work, you need to first activate it in the console

Steps

  1. activate plotly
python
%activate plotly
  1. import plotly
python
import plotly.graph_objects as go
  1. make a plot
python
fig = go.Figure()
fig.add_trace(go.Scatter(y=[2, 1, 4, 3]))
fig.add_trace(go.Bar(y=[1, 4, 3, 2]))
fig.update_layout(title = 'Hello Figure')
  1. show the plot with fig.show
python
fig.show()