In [20]:
import matplotlib.pyplot as plt
import numpy as np

plt.style.use("seaborn-poster")
labels = ["G1","G2","G3","G4","G5"]
men_means = [20,35,30,35,27]
women_means = [25,32,34,20,25]
men_std = [1,3,4,1,2]
women_std = [3,5,2,3,3]
width = 0.35

fig, ax = plt.subplots()

ax.bar(labels, men_means, width, yerr=men_std, label="Men")
ax.bar(labels, women_means, width, yerr=women_std, bottom=men_means, label="Women")
ax.set_ylabel("Scores")
ax.set_xlabel("Groups")
ax.set_title("Scores by Group and Sex")
ax.legend()
print(plt.style.available)
plt.show()
['Solarize_Light2', '_classic_test_patch', '_mpl-gallery', '_mpl-gallery-nogrid', 'bmh', 'classic', 'dark_background', 'fast', 'fivethirtyeight', 'ggplot', 'grayscale', 'seaborn', 'seaborn-bright', 'seaborn-colorblind', 'seaborn-dark', 'seaborn-dark-palette', 'seaborn-darkgrid', 'seaborn-deep', 'seaborn-muted', 'seaborn-notebook', 'seaborn-paper', 'seaborn-pastel', 'seaborn-poster', 'seaborn-talk', 'seaborn-ticks', 'seaborn-white', 'seaborn-whitegrid', 'tableau-colorblind10']
In [2]:
# Plot y=7x^2+2 
import matplotlib.pyplot as plt
import numpy as np
x = np.linspace (0,2,100)
fig, ax = plt.subplots()
ax.plot (x,7*x+2)
ax.set_xlabel("x")
ax.set_ylabel("y=7*x+2")
plt.show()