|
16 | 16 | --col_inch=<float> Number of inches / column [default: 6]
|
17 | 17 | --row_inch=<float> Number of inches / row [default: 2]
|
18 | 18 | """
|
| 19 | + |
19 | 20 | from docopt import docopt
|
| 21 | + |
20 | 22 | args = docopt(__doc__)
|
21 | 23 | from plotpal.slices import SlicePlotter
|
22 | 24 |
|
23 | 25 | # Read in master output directory
|
24 |
| -root_dir = args['--root_dir'] |
25 |
| -data_dir = args['--data_dir'] |
| 26 | +root_dir = args["--root_dir"] |
| 27 | +data_dir = args["--data_dir"] |
26 | 28 |
|
27 | 29 | # Read in additional plot arguments
|
28 |
| -start_fig = int(args['--start_fig']) |
29 |
| -start_file = int(args['--start_file']) |
30 |
| -out_name = args['--out_name'] |
31 |
| -n_files = args['--n_files'] |
32 |
| -if n_files is not None: |
| 30 | +start_fig = int(args["--start_fig"]) |
| 31 | +start_file = int(args["--start_file"]) |
| 32 | +out_name = args["--out_name"] |
| 33 | +n_files = args["--n_files"] |
| 34 | +if n_files is not None: |
33 | 35 | n_files = int(n_files)
|
34 | 36 |
|
35 | 37 | # Create Plotter object, tell it which fields to plot
|
36 |
| -plotter = SlicePlotter(root_dir, file_dir=data_dir, out_name=out_name, start_file=start_file, n_files=n_files) |
37 |
| -plotter_kwargs = { 'col_inch' : float(args['--col_inch']), 'row_inch' : float(args['--row_inch']), 'pad_factor' : 15 } |
| 38 | +plotter = SlicePlotter( |
| 39 | + root_dir, |
| 40 | + file_dir=data_dir, |
| 41 | + out_name=out_name, |
| 42 | + start_file=start_file, |
| 43 | + n_files=n_files, |
| 44 | +) |
| 45 | +plotter_kwargs = { |
| 46 | + "col_inch": float(args["--col_inch"]), |
| 47 | + "row_inch": float(args["--row_inch"]), |
| 48 | + "pad_factor": 15, |
| 49 | +} |
38 | 50 |
|
39 | 51 | plotter.setup_grid(num_rows=2, num_cols=2, **plotter_kwargs)
|
40 |
| -plotter.add_colormesh('b', x_basis='x', y_basis='z', remove_x_mean=True, divide_x_std=True) |
41 |
| -plotter.add_colormesh('p', x_basis='x', y_basis='z', remove_x_mean=True, divide_x_std=True, cmap='PiYG_r') |
42 |
| -plotter.add_colormesh('ux', x_basis='x', y_basis='z', cmap='PuOr_r') |
43 |
| -plotter.add_colormesh('uz', x_basis='x', y_basis='z', cmap='PuOr_r') |
44 |
| -plotter.plot_colormeshes(start_fig=start_fig, dpi=int(args['--dpi'])) |
| 52 | +plotter.add_colormesh( |
| 53 | + "b", x_basis="x", y_basis="z", remove_x_mean=True, divide_x_std=True |
| 54 | +) |
| 55 | +plotter.add_colormesh( |
| 56 | + "p", x_basis="x", y_basis="z", remove_x_mean=True, divide_x_std=True, cmap="PiYG_r" |
| 57 | +) |
| 58 | +plotter.add_colormesh("ux", x_basis="x", y_basis="z", cmap="PuOr_r") |
| 59 | +plotter.add_colormesh("uz", x_basis="x", y_basis="z", cmap="PuOr_r") |
| 60 | +plotter.plot_colormeshes(start_fig=start_fig, dpi=int(args["--dpi"])) |
0 commit comments