def matplotlib_rc(fontsize=8, dpi=300, tex=True, interactive=False): set_rcparams(fontsize, for_article=True, for_beamer=False) plt.rc('legend', fontsize=fontsize - 2) plt.rc('font', size=fontsize) plt.rc('figure', dpi=dpi) plt.rc('xtick', direction='in') plt.rc('ytick', direction='in') if interactive: plt.ion() else: plt.ioff()
def matplotlib_rc(fontsize=7, dpi=DPI, tex=True, interactive=False, pad=2): # pl.rc('text', usetex=tex) _font = get_font(fontsize) pl.rc("font", **_font) rcparams.set_rcparams(fontsize) pl.rc("figure", dpi=dpi) pl.rc("xtick", direction="in") pl.rc("ytick", direction="in") if interactive: pl.ion() else: pl.ioff()
directories = ["sim960_no_shear_modes"] paths_simulations = [] for directory in directories: paths_simulations += sorted( glob(os.path.join(path_root, directory, "NS2D*"))) froudes = [] reynoldsb = [] reynolds8 = [] anisotropies = [] dissipations = [] markers = [] set_rcparams(fontsize=14, for_article=True) fig, ax = plt.subplots() ax.set_xlabel(r"$F_h$", fontsize=18) ax.set_ylabel(r"$\mathcal{R}_8$", fontsize=18) ax.set_xscale("log") ax.set_yscale("log") ax.text(0.6, 2e-12, r"$\log_{10} \left(\frac{k_{x, 1/2}}{k_{x, f}}\right)$", fontsize=16) ax.tick_params(axis="x", labelsize=18) ax.tick_params(axis="y", labelsize=18) ax.set_xlim([0.003, 1]) ax.set_ylim([1e-9, 1e7])
import os import getpass from subprocess import call import matplotlib.pyplot as plt from fluiddyn.util import modification_date from fluiddyn.output.rcparams import set_rcparams from fluidfft.bench_analysis import plot_scaling set_rcparams(fontsize=14, for_article=True, for_beamer=False) plt.rc('legend',fontsize=10) here = os.path.abspath(os.path.dirname(__file__)) here_tmp = os.path.join(here, '../tmp') if not os.path.exists(here_tmp): os.mkdir(here_tmp) path_tmp = os.path.join('/tmp', getpass.getuser()) if not os.path.exists(path_tmp): os.mkdir(path_tmp) repo_fluidfft_bench_results = \ 'https://bitbucket.org/fluiddyn/fluidfft-bench-results' path_fluidfft_bench_results = os.path.join(path_tmp, 'fluidfft-bench-results')