def test_setup_matplotlib(self): viz.setup_matplotlib() self.assertEqual(matplotlib.rcParams["font.size"], 16) # Test with optional argument viz.setup_matplotlib({"font.size": 18}) self.assertEqual(matplotlib.rcParams["font.size"], 18)
import os import matplotlib.pyplot as plt import numpy as np from kuibit.simdir import SimDir from kuibit import argparse_helper as pah from kuibit.visualize_matplotlib import ( setup_matplotlib, add_text_to_figure_corner, save, ) """This script plots the trajectories of given apparent horizons. """ if __name__ == "__main__": setup_matplotlib() desc = """Plot trajectories of given apparent horizons.""" parser = pah.init_argparse(desc) pah.add_figure_to_parser(parser) parser.add_argument( "-t", "--type", type=str, choices=["3D", "xy", "xz", "yz"], default="3D", help="Type of plot: 3D, or of a specific plane (default: %(default)s).", )