def main(): if not os.path.isdir("figures"): os.mkdir("figures") set_sns() #resample_wake(x=1.0) plotwake(plotlist=["meancontquiv"], save=True) #make_momentum_trans_bargraph() if not os.path.isfile("processed/mom_transport.csv"): run_funky_batch() #plot_mom_transport() plot_streamwise(save=True) plt.show()
def setpltparams(seaborn=True, fontsize=18, latex=True): if seaborn: set_sns() else: if latex: font = {"family" : "serif", "serif" : "cmr10", "size" : fontsize} else: font = {"size" : fontsize} lines = {"markersize" : 9, "markeredgewidth" : 1, "linewidth" : 1.2} legend = {"numpoints" : 1, "fontsize" : "small"} matplotlib.rc("text", usetex=latex) matplotlib.rc("font", **font) matplotlib.rc("lines", **lines) matplotlib.rc("legend", **legend) matplotlib.rc("xtick", **{"major.pad":6})
parser.add_argument("--single-tare-torque", help="Process a tare torque run") parser.add_argument("--section", help="Process a test matrix section") parser.add_argument("--tare-drag", help="Process tare drag runs", action="store_true") parser.add_argument("--tare-torque", help="Process tare torque runs", action="store_true") parser.add_argument("--all", "-a", action="store_true", help="Process all data") parser.add_argument("--plot", action="store_true", default=False, help="Create plots (if applicable)") args = parser.parse_args() if args.plot: from pxl.styleplot import set_sns set_sns() if args.single_run: # Dealing with individual runs section = args.single_run[0] nrun = int(args.single_run[1]) print("Processing {} run {}".format(section, nrun)) r = Run(section, nrun) if args.plot: r.plot_perf("cp") r.plot_wake() print(r.summary) if args.single_tare_drag: process_tare_drag(args.single_tare_drag, plot=args.plot)
#!/usr/bin/env python """ This script generates the relevant figures and/or tables from the experiment. To reprocess the data, run `process.py`. """ import py_2015_09_24_turbine_test_bed_demo.plotting as pl from pxl.styleplot import set_sns import matplotlib.pyplot as plt save = True savetype = ".pdf" show = True if __name__ == "__main__": # Set plot style using PXL's Seaborn wrapper set_sns(rc={"axes.grid": True, "lines.linewidth": 2}) # Call plotting functions here pl.plot_torque(marker="o", save=save, savetype=savetype) if show: plt.show()
#!/usr/bin/env python """Plot results from the turbinesFoam RM2 simulation.""" import pandas as pd import matplotlib.pyplot as plt import os import sys from pyrm2tf.plotting import * from pxl.styleplot import set_sns import argparse if __name__ == "__main__": set_sns() plt.rcParams["axes.grid"] = True parser = argparse.ArgumentParser(description="Generate plots.") parser.add_argument("plot", nargs="*", help="What to plot", default="perf", choices=[ "perf", "wake", "blade-perf", "strut-perf", "perf-curves", "perf-curves-exp", "recovery", "verification", "wake-profiles", "wake-profiles-exp" ]) parser.add_argument("--all", "-A", help="Generate all figures", default=False, action="store_true")