def main(argv=None):
if argv is None:
argv = sys.argv
parser = ArgumentParser('Create plot of the Kp and Dst indices.',
formatter_class=ArgumentDefaultsHelpFormatter)
parser.add_argument('pdf_fname',
type=str,
help='file to store plot')
parser.add_argument('d1',
type=dt_parser,
help='start date/time')
parser.add_argument('d2',
type=dt_parser,
help='end date/time')
parser.add_argument('--style',
'-s',
type=str,
choices=sorted(STYLE_MAP),
default='display',
help='plot style (display is more colorful and meant for screen display whereas document is high contrast and uses hatches for both color and black-white interpretation and meant for use in publication)')
args = parser.parse_args(argv[1:])
plot_indices(args.d1,
args.d2,
style=args.style)
PL.savefig(args.pdf_fname,
bbox_inches='tight')
评论列表
文章目录