code: #!/usr/local/bin/python3
  
  import numpy as np
  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.geomspace(10, 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()
apis: matplotlib.pyplot.plot matplotlib.pyplot.show numpy.random.rand numpy.geomspace