code: def plot_points(points, show=True):
      
      import matplotlib.pyplot as plt
      from mpl_toolkits.mplot3d import Axes3D  # NOQA
  
      points = np.asanyarray(points, dtype=np.float64)
  
      if len(points.shape) != 2:
          raise ValueError('Points must be (n, 2|3)!')
  
      if points.shape[1] == 3:
          fig = plt.figure()
          ax = fig.add_subplot(111, projection='3d')
          ax.scatter(*points.T)
      elif points.shape[1] == 2:
          plt.scatter(*points.T)
      else:
          raise ValueError('points not 2D/3D: {}'.format(
              points.shape))
  
      if show:
          plt.show()
docs: Plot an (n,3) list of points using matplotlib
  
      Parameters
      -------------
      points : (n, 3) float
        Points in space
      show : bool
        If False, will not show until plt.show() is called