동적 시각화
import plotly
import plotly.express as px
import seaborn as sns
fig = px.scatter(iris,
x = 'sepal_length',
y = 'petal_length,
size = 'sepal_length',
color = 'species',
range_x=[4,8],
range_y=[0,6],
marginal_y='violin',
marginal_x='box',
trendline='ols',
facet_col='species')
fig.show()
fig = px.scatter(flights,
x = 'year',
y= 'passengers')
fig.show()
fig = px.bar(medals,
x = 'nation',
y= 'count',
color='medal')
fig.show()
fig = px.bar(medals,
x = 'nation',
y= 'count',
color='medal',
barmode='group')
fig.show()
fig = px.treemap(df,
path = ['day','time','sex'],
values='total_bill')
fig = px.scatter_3d(iris,
x = 'sepal_length',
y = 'sepal_width',
z = 'petal_width',
color='species)
fig.show()
fig = px.parallel_coordinates(iris,
color= "species_id)
fig.show()
fig = px.parallel_categories(tips,
color="sex")
fig.show()
fig = px.scatter_geo(geo,
locations='iso_alpha',
color='continent',
size="pop",
animation_frame="year",
projection="natural earth")
fig.show()
fig = px.choropleth(geo,
locations='iso_alpha',
color='continent',
projection="natural earth")
fig.show()