From c8f1fd5bcbc0d9fae66ddb01e178ad7661ded22a Mon Sep 17 00:00:00 2001 From: Volker Hoffmann Date: Mon, 31 Oct 2016 10:54:18 +0100 Subject: feat: add --zoom option to zoom in on inner regions --- Plots/Chaos/ae2_stacked_wide.py | 17 ++++++++++++++--- 1 file 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(): -- cgit v1.1