Skip to content

Instantly share code, notes, and snippets.

@audhiaprilliant
Created November 11, 2022 16:56
Show Gist options
  • Select an option

  • Save audhiaprilliant/bed1d8449389beb44ccabd3df896cdeb to your computer and use it in GitHub Desktop.

Select an option

Save audhiaprilliant/bed1d8449389beb44ccabd3df896cdeb to your computer and use it in GitHub Desktop.
Matplotlib 102 - Basic Introduction to Multiplot, Subplot and Gridspec
# ---------- MULTIPLOT ----------
# Figure size
fig = plt.figure(figsize = (10, 4.8))
# Bar plot
plt.bar(
x = 'PaymentMethod',
height = 'customerID',
data = df_group_1,
color = 'red'
)
# Line plot
plt.plot(
'PaymentMethod',
'CummulativeSum',
data = df_group_1,
color = 'blue',
marker = 'o'
);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment