How to use the timemory.plotting.plot_parameters function in timemory

To help you get started, we’ve selected a few timemory examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github NERSC / timemory / timemory / plotting / __main__.py View on Github external
parser.set_defaults(min_percent=plot_parameters.min_percent)
        parser.set_defaults(img_dpi=plot_parameters.img_dpi)
        parser.set_defaults(img_size=[plot_parameters.img_size['w'],
                                      plot_parameters.img_size['h']])
        parser.set_defaults(img_type=plot_parameters.img_type)
        parser.set_defaults(plot_max="")
        parser.set_defaults(font_size=plot_parameters.font_size)

        args = parser.parse_args()

        do_plot_max = True if len(args.plot_max) > 0 else False

        print('Files: {}'.format(args.files))
        print('Titles: {}'.format(args.titles))

        params = _plotting.plot_parameters(min_percent=args.min_percent,
                                           img_dpi=args.img_dpi,
                                           img_size={'w': args.img_size[0],
                                                     'h': args.img_size[1]},
                                           img_type=args.img_type,
                                           log_xaxis=args.log_x,
                                           font_size=args.font_size)

        if do_plot_max:
            if len(args.titles) != 1:
                raise Exception("Error must provide one title")
        else:
            if len(args.titles) != 1 and len(args.titles) != len(args.files):
                raise Exception(
                    "Error must provide one title or a title for each file")

        data = []
github NERSC / timemory / timemory / plotting / __main__.py View on Github external
required=False, type=str)
        parser.add_argument('--plot-max',
                            help="Plot the maximums from a set of inputs to ",
                            required=False, type=str, dest='plot_max')
        parser.add_argument('--log-x', help="Plot X-axis in a log scale",
                            action='store_true')
        parser.add_argument('--font-size', help="Font size of y-axis labels", type=int)

        parser.set_defaults(display_plot=False)
        parser.set_defaults(combine=False)
        parser.set_defaults(output_dir=".")
        parser.set_defaults(echo_dart=False)
        parser.set_defaults(min_percent=plot_parameters.min_percent)
        parser.set_defaults(img_dpi=plot_parameters.img_dpi)
        parser.set_defaults(img_size=[plot_parameters.img_size['w'],
                                      plot_parameters.img_size['h']])
        parser.set_defaults(img_type=plot_parameters.img_type)
        parser.set_defaults(plot_max="")
        parser.set_defaults(font_size=plot_parameters.font_size)

        args = parser.parse_args()

        do_plot_max = True if len(args.plot_max) > 0 else False

        print('Files: {}'.format(args.files))
        print('Titles: {}'.format(args.titles))

        params = _plotting.plot_parameters(min_percent=args.min_percent,
                                           img_dpi=args.img_dpi,
                                           img_size={'w': args.img_size[0],
                                                     'h': args.img_size[1]},
                                           img_type=args.img_type,
github NERSC / timemory / timemory / plotting / __main__.py View on Github external
parser.add_argument('--img-size', help="Image dimensions", nargs=2,
                            required=False, type=int)
        parser.add_argument('--img-type', help="Image type",
                            required=False, type=str)
        parser.add_argument('--plot-max',
                            help="Plot the maximums from a set of inputs to ",
                            required=False, type=str, dest='plot_max')
        parser.add_argument('--log-x', help="Plot X-axis in a log scale",
                            action='store_true')
        parser.add_argument('--font-size', help="Font size of y-axis labels", type=int)

        parser.set_defaults(display_plot=False)
        parser.set_defaults(combine=False)
        parser.set_defaults(output_dir=".")
        parser.set_defaults(echo_dart=False)
        parser.set_defaults(min_percent=plot_parameters.min_percent)
        parser.set_defaults(img_dpi=plot_parameters.img_dpi)
        parser.set_defaults(img_size=[plot_parameters.img_size['w'],
                                      plot_parameters.img_size['h']])
        parser.set_defaults(img_type=plot_parameters.img_type)
        parser.set_defaults(plot_max="")
        parser.set_defaults(font_size=plot_parameters.font_size)

        args = parser.parse_args()

        do_plot_max = True if len(args.plot_max) > 0 else False

        print('Files: {}'.format(args.files))
        print('Titles: {}'.format(args.titles))

        params = _plotting.plot_parameters(min_percent=args.min_percent,
                                           img_dpi=args.img_dpi,