1fig = go.Figure()
2
3for i in range(3):
4 fig.add_trace(
5 go.Scatterpolar(
6 r=avg_iris.loc[i].values.tolist() + avg_iris.loc[i].values.tolist()[:1],
7 theta=avg_iris.columns.tolist() + avg_iris.columns.tolist()[:1],
8 name="IRIS-%s"%iris.target_names[i],
9 showlegend=True,
10 )
11 )
12
13fig.update_layout(
14 polar=dict(
15 radialaxis=dict(
16 visible=True,
17 range=[0, 1]
18 )
19 ),
20
21 title="IRIS Flower Variables According to Flower Categories"
22)
23
24fig.show()
25