import numpy as np
import matplotlib.pyplot as plt
import prettyplotlib as ppl
import matplottheme as mpt
import math
x = np.arange(-math.pi,math.pi, 0.1)
fig = plt.figure(figsize=(8,6))
plt.plot(x, np.sin(x), label="sin(x)")
plt.plot(x, np.cos(x), label="cos(x)")
plt.plot(x, -np.sin(x), label="-sin(x)")
plt.plot(x, -np.cos(x), label="-cos(x)")
plt.legend(loc="best")
<matplotlib.legend.Legend at 0x105038350>
fig = plt.figure(figsize=(8,6))
ppl.plot(x, np.sin(x), label="sin(x)")
ppl.plot(x, np.cos(x), label="cos(x)")
ppl.plot(x, -np.sin(x), label="-sin(x)")
ppl.plot(x, -np.cos(x), label="-cos(x)")
ppl.legend(loc="best")
<matplotlib.legend.Legend at 0x108644850>
mpt.set_theme("ggplot2", "ggplot2")
fig = plt.figure(figsize=(8,6))
ax = fig.add_subplot(111)
mpt.plot(ax, x, np.sin(x), label="sin(x)")
mpt.plot(ax, x, np.cos(x), label="cos(x)")
mpt.plot(ax, x, -np.sin(x), label="-sin(x)")
mpt.plot(ax, x, -np.cos(x), label="-cos(x)")
mpt.legend(ax, loc="best")
<matplotlib.legend.Legend at 0x10527aa10>
from IPython.display import set_matplotlib_formats
set_matplotlib_formats('svg')
fig = plt.figure(figsize=(12,9))
plt.plot(x, np.sin(x), label="sin(x)")
plt.plot(x, np.cos(x), label="cos(x)")
plt.plot(x, -np.sin(x), label="-sin(x)")
plt.plot(x, -np.cos(x), label="-cos(x)")
plt.legend(loc="best")
<matplotlib.legend.Legend at 0x10523a2d0>