#範例4-9:安德森鳶尾花卉數據集(Iris flower data set) import plotly.express as px #dataframe = 讀取express所提供的Iris flower data set df = px.data.iris() #輸出這個dataframe的結構 print(df) #x軸=sepal_width欄位,y軸=sepal_length欄位,線條顏色=species欄位 fig = px.scatter(df, x="sepal_width", y="sepal_length", color="species") #在jupyter寫程式 #fig.show() #在spider寫程式 fig.write_html('exp4-9.html',auto_open=True)