plot_indices.py 文件源码

python
阅读 21 收藏 0 点赞 0 评论 0

项目:pyrsss 作者: butala 项目源码 文件源码
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')
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号