Plots Flashcards

1
Q

Density Plot

A

import seaborn as sns

sns.kdeplot(x=df.x, y=df.y, cmap=”Blues”, shade=True)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

Hexbin Plot

A

df.plot(kind=’hexbin’, x=’x’, y=’y’, gridsize = 13)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

Scatterplot

A

df.plot(kind=’scatter’,x=’x’, y=’y’)

OR

sns.scatterplot(x=’x’, y=’y’, data=data)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

Bar plot

A

import plotly.express as px

fig = px.bar(df, x=”Year”, y=”Population”, color=”Country”)
fig.update_layout(barmode=’group’)
fig.show()

df.plot.bar(“Month”, “Value”);

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

Dot plot

A

fig = px.scatter(df, x=”Year”, y=”Population”, color=”Country”)

fig.show()

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

Line plot

A

df.plot.line(“Month”, “Value”)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

Waterfall chart

A

!pip install waterfallcharts

import waterfall_chart

waterfall_chart.plot(df.Month, df.Delta)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

Histogram

A

plt.hist(data[‘column’], bins=20)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly