text: import numpy as np
  import matplotlib.pyplot as plt
  
  
  # title = "Smooth shear layer, Morinishi6"
  # avg = [0.0001742381248471908, 3.297719378469272e-05, 8.853410026582795e-06, 2.4588026481566943e-06, 1.2178839071370698e-06]
  # var = [1.3896548502837038e-05, 3.5835533181989445e-06, 7.320052746623648e-07, 1.2691339031804642e-07, 4.676498310435025e-08]
  # outname = "mo6slsmooth"
  
  # title = "Discontinuous shear layer, Morinishi6"
  # avg = [0.0015374329492442913, 0.0006123352133964472, 0.00016714985865889332, 5.395651269404015e-05, 1.846688530409167e-05]
  # var = [0.001561048356515483, 0.0008268874008379734, 0.000276354318918924, 5.926195861427492e-05, 1.580644768470192e-05]
  # outname = "mo6sldiscont"
  
  # title = "BM, Morinishi6"
  # avg = [0.0011444225548730754, 0.000626664400230508, 0.00035407352932619333, 0.0002169627392987868, 0.00013435465486516383]
  # var = [0.0007744609057114578, 0.00041769432277839616, 0.00024203931579456383, 0.00014968386134860514, 8.876523218991907e-05]
  # outname = "mo6BM"
  
  # title = "Smooth shear layer, spectral"
  # avg = [0.00020258466914211749, 3.99441654047179e-05, 9.935814474701744e-06, 2.541948529067162e-06, 5.999034113518961e-07]
  # var = [1.4150644981608634e-05, 3.9340341254808445e-06, 7.848413830807708e-07, 1.3636212111586492e-07, 2.8001417197284794e-08]
  # outname = "sphslsmooth"
  
  title = "Discontinuous shear layer, spectral"
  avg = [0.0017410028104438988, 0.0012031545005509224, 0.0007121453839205895, 0.0002933378571846956, 0.00010184290321961318]
  var = [0.0017904884408956648, 0.0013442623181168518, 0.0009299773721255499, 0.0004625894022953969, 0.00013023153815767247]
  outname = "sphsldiscont"
  
  
  fig, ax = plt.subplots()
  N = np.array([64, 128, 256, 512, 1024])
  plt.title(title+" (detail magnitude)")
  plt.loglog(N, avg, label="avg", base=2)
  plt.loglog(N, var, label="var", base=2)
  plt.ylabel("$\|d_k\|_{L^1}$")
  plt.xlabel("$N_0 2^k$")
  plt.legend()
  plt.grid("both")
  plt.savefig(outname, bbox_inches="tight")
  # plt.show()