From 72db865d877b919b75f9ebef4e0af0472807d092 Mon Sep 17 00:00:00 2001 From: Aaron LI Date: Sun, 26 Nov 2017 23:40:26 +0800 Subject: astro/ps2d.py: Improve ticks style and use monospace font --- astro/ps2d.py | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) (limited to 'astro') diff --git a/astro/ps2d.py b/astro/ps2d.py index 0bd0ac4..a839298 100755 --- a/astro/ps2d.py +++ b/astro/ps2d.py @@ -42,12 +42,25 @@ from astropy.io import fits from astropy.cosmology import FlatLambdaCDM import astropy.constants as ac -import matplotlib.pyplot as plt +import matplotlib +import matplotlib.style from matplotlib.backends.backend_agg import FigureCanvasAgg as FigureCanvas from matplotlib.figure import Figure -plt.style.use("ggplot") +# Matplotlib settings +matplotlib.style.use("ggplot") +for k, v in [("font.family", "monospace"), + ("image.cmap", "jet"), + ("xtick.major.size", 7.0), + ("xtick.major.width", 2.0), + ("xtick.minor.size", 4.0), + ("xtick.minor.width", 1.5), + ("ytick.major.size", 7.0), + ("ytick.major.width", 2.0), + ("ytick.minor.size", 4.0), + ("ytick.minor.width", 1.5)]: + matplotlib.rcParams[k] = v logging.basicConfig(level=logging.INFO, format="[%(levelname)s:%(lineno)d] %(message)s") -- cgit v1.2.2