aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAaron LI <aly@aaronly.me>2017-11-26 23:40:26 +0800
committerAaron LI <aly@aaronly.me>2017-11-26 23:40:26 +0800
commit72db865d877b919b75f9ebef4e0af0472807d092 (patch)
treebf133a1a0d9c31d02e15ab1ded905d33d55dd1e9
parent71c183da0193040bd89ea6be1f52666ddbda5425 (diff)
downloadatoolbox-72db865d877b919b75f9ebef4e0af0472807d092.tar.bz2
astro/ps2d.py: Improve ticks style and use monospace font
-rwxr-xr-xastro/ps2d.py17
1 files changed, 15 insertions, 2 deletions
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")