message: use checkdep_usetex from matplotlib to check if latex is available
diff: @@ -105,6 +105,8 @@ def plot_persistence_barcode(
  try:
  import matplotlib.pyplot as plt
  import matplotlib.patches as mpatches
  + from matplotlib import checkdep_usetex
  + if matplotlib.checkdep_usetex(True):
  from matplotlib import rc
  plt.rc('text', usetex=True)
  plt.rc('font', family='serif')
  @@ -250,6 +252,8 @@ def plot_persistence_diagram(
  try:
  import matplotlib.pyplot as plt
  import matplotlib.patches as mpatches
  + from matplotlib import checkdep_usetex
  + if matplotlib.checkdep_usetex(True):
  from matplotlib import rc
  plt.rc('text', usetex=True)
  plt.rc('font', family='serif')
  @@ -422,6 +426,8 @@ def plot_persistence_density(
  import matplotlib.pyplot as plt
  import matplotlib.patches as mpatches
  from scipy.stats import kde
  + from matplotlib import checkdep_usetex
  + if matplotlib.checkdep_usetex(True):
  from matplotlib import rc
  plt.rc('text', usetex=True)
  plt.rc('font', family='serif')
  