code: def _get_improvement_plot(
      info: _ImprovementInfo, min_n_trials: int
  ) -> "Axes":
      n_trials = len(info.trial_numbers)
  
      # Set up the graph style.
      plt.style.use(
          "ggplot"
      )  # Use ggplot style sheet for similar outputs to plotly.
      _, ax = plt.subplots()
      ax.set_title("Terminator Improvement Plot")
      ax.set_xlabel("Trial")
      ax.set_ylabel("Terminator Improvement")
      cmap = plt.get_cmap(
          "tab10"
      )  # Use tab10 colormap for similar outputs to plotly.
  
      if n_trials == 0:
          _logger.warning("There are no complete trials.")
          return ax
  
      ax.plot(
          info.trial_numbers[: min_n_trials + 1],
          info.improvements[: min_n_trials + 1],
          marker="o",
          color=cmap(0),
          alpha=ALPHA,
          label="Terminator Improvement"
          if n_trials <= min_n_trials
          else None,
      )
  
      if n_trials > min_n_trials:
          ax.plot(
              info.trial_numbers[min_n_trials:],
              info.improvements[min_n_trials:],
              marker="o",
              color=cmap(0),
              label="Terminator Improvement",
          )
  
      if info.errors is not None:
          ax.plot(
              info.trial_numbers,
              info.errors,
              marker="o",
              color=cmap(3),
              label="Error",
          )
      ax.legend()
      ax.set_ylim(_get_y_range(info, min_n_trials))
      return ax
  
file_path: optuna/optuna/visualization/matplotlib/_terminator_improvement.py
imports: from __future__ import annotations
  from optuna._experimental import experimental_func
  from optuna.logging import get_logger
  from optuna.study.study import Study
  from optuna.terminator import BaseErrorEvaluator
  from optuna.terminator import BaseImprovementEvaluator
  from optuna.terminator.improvement.evaluator import DEFAULT_MIN_N_TRIALS
  from optuna.visualization._terminator_improvement import _get_improvement_info
  from optuna.visualization._terminator_improvement import _get_y_range
  from optuna.visualization._terminator_improvement import _ImprovementInfo
  from optuna.visualization.matplotlib._matplotlib_imports import _imports
label_desc: Use image node_id 2 for calling a global function with example usage: _get_improvement_plot(info, min_n_trials) and returns: ax, ax