aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorVolker Hoffmann <volker@cheleb.net>2016-10-31 10:54:18 +0100
committerVolker Hoffmann <volker@cheleb.net>2016-10-31 10:54:18 +0100
commitc8f1fd5bcbc0d9fae66ddb01e178ad7661ded22a (patch)
tree1363a428337223093e660b05dd385ce74d2b6b00
parent29281e70551424cd4eabb5e27426e4287231c012 (diff)
feat: add --zoom option to zoom in on inner regions
-rw-r--r--Plots/Chaos/ae2_stacked_wide.py17
1 files changed, 14 insertions, 3 deletions
diff --git a/Plots/Chaos/ae2_stacked_wide.py b/Plots/Chaos/ae2_stacked_wide.py
index b83e22b..c585b53 100644
--- a/Plots/Chaos/ae2_stacked_wide.py
+++ b/Plots/Chaos/ae2_stacked_wide.py
@@ -16,8 +16,15 @@ import pandas as pd
import sys
import other_helpers as oh
import constants as C
+import argparse
+# Parse Arguments
+parser = argparse.ArgumentParser()
+parser.add_argument("--zoom", action="store_true", \
+ help="Zoom On Inner Region.")
+args = parser.parse_args()
+
# List of Directories
if sys.stdin.isatty():
print "!! No Directory List (Use Stdin)."
@@ -210,7 +217,7 @@ for nstep in nsteps:
# #############################################
# #############################################
- if not fnames_res_all[isim][0] == 'NONE':
+ if not fnames_res_all[isim][0] == 'NONE' and not args.zoom:
# Annotate (Secular)
ax.text(dfr.nu_5.iloc[0], 0.55, \
@@ -285,8 +292,12 @@ for nstep in nsteps:
# Limits
for ax in axarr.flatten():
- ax.set_xlim([0,5])
- ax.set_ylim([0,0.6])
+ if args.zoom:
+ ax.set_xlim([0,1])
+ ax.set_ylim([0,0.15])
+ else:
+ ax.set_xlim([0,5])
+ ax.set_ylim([0,0.6])
# Ticks
for ax in axarr.flatten():