scopesim_targets.plot_utils

Contents

scopesim_targets.plot_utils#

Plotting convenience functinality.

Example usage#

>>> from matplotlib import pyplot as plt
>>> from scopesim_targets.spectral_classes import StellarParameters
>>> from scopesim_targets.plot_utils import spec_classes_axis, figure_factory_hrd
>>>
>>> x = np.linspace(2000, 15000, 400)
>>> y = np.sin(x / 1000)  # just to have something to plot...
>>>
>>> plt.style.use("seaborn-v0_8")  # -talk, -poster, -paper
>>> fig, ax = figure_factory_hrd()
>>> ax.plot(x, y)
[<matplotlib.lines.Line2D object at ...>]
>>>
>>> stp = StellarParameters()
>>> spclss = list(stp.group_spectral_classes())
>>> spec_classes_axis(ax, spclss)

Functions

draw_circle(ax[, center, radius, edgecolor, ...])

Draw a circle in data coordinates.

figure_factory([nrows, ncols])

Generate default fig and ax, to easily modify later.

figure_factory_hrd(**kwargs)

Wrap figure_factory for single axes with inverted x-axis.

spec_classes_axis(ax, spec_classes[, shade_area])

Mark spectral classes in plot and optionally shade regions.