import numpy as np

import matplotlib
#matplotlib.use("Agg")

import matplotlib.pyplot as plt
import matplotlib as mpl

'''
# Setup, and create the data to plot
y = np.random.rand(100000)
y[50000:] *= 2
y[np.logspace(1, np.log10(50000), 400).astype(int)] = -1
mpl.rcParams['path.simplify'] = True

mpl.rcParams['path.simplify_threshold'] = 0.0
plt.plot(y)
plt.show()

mpl.rcParams['path.simplify_threshold'] = 1.0
plt.plot(y)
plt.show()

'''

x = np.arange(0, 10, 0.2)
y = np.sin(x)
fig, ax = plt.subplots()
ax.plot(x, y)
plt.style.use('ggplot')
plt.show()



import numpy as np

import matplotlib
#matplotlib.use("Agg")

import matplotlib.pyplot as plt
import matplotlib as mpl

'''
# Setup, and create the data to plot
y = np.random.rand(100000)
y[50000:] *= 2
y[np.logspace(1, np.log10(50000), 400).astype(int)] = -1
mpl.rcParams['path.simplify'] = True

mpl.rcParams['path.simplify_threshold'] = 0.0
plt.plot(y)
plt.show()

mpl.rcParams['path.simplify_threshold'] = 1.0
plt.plot(y)
plt.show()

'''

x = np.arange(0, 10, 0.2)
y = np.sin(x)
fig, ax = plt.subplots()
ax.plot(x, y)
plt.style.use('ggplot')
plt.show()



#matplotlib.use("Agg") # Setup, and create the data to plot y = np.random.rand(100000) y[50000:] *= 2 y[np.logspace(1, np.log10(50000), 400).astype(int)] = -1 mpl.rcParams['path.simplify'] = True  mpl.rcParams['path.simplify_threshold'] = 0.0 plt.plot(y) plt.show()  mpl.rcParams['path.simplify_threshold'] = 1.0 plt.plot(y) plt.show()