#!/usr/bin/env python # coding: utf-8 # ## 1. 2 Plotly Express 入門 # ### 1.2.1 グラフを描画する関数 # In[1]: import pandas as pd import plotly.express as px df = pd.DataFrame([[1, 1], [2, 5], [3, 3]], columns=["x", "y"]) px.line(df, x="x", y="y").show() # ### 1.2.2 デ ー タ 型 # In[2]: tips = px.data.tips() tips.head() # In[3]: px.scatter(tips, x="total_bill", y="tip").show() # In[4]: px.line(x=[1, 2, 3], y=[3, 5, 2]).show() # In[5]: import numpy as np np.random.seed(1) arr = np.random.rand(100, 4) px.scatter(arr, x=0, y=1, color=2, size=3).show()