From 65d26f7d6568f03d07b160e5e345cd09a80758d4 Mon Sep 17 00:00:00 2001 From: jimmy Date: Thu, 24 Feb 2022 19:39:37 -0700 Subject: [PATCH 1/2] increased the font on donor_hopping_rate_clusters.png plot --- morphct/kmc_analyze.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/morphct/kmc_analyze.py b/morphct/kmc_analyze.py index 1f0ce45..736a45f 100644 --- a/morphct/kmc_analyze.py +++ b/morphct/kmc_analyze.py @@ -1540,10 +1540,11 @@ def plot_stacked_hist_rates( color=["r", "b"], label=labels, ) - plt.ylabel("Frequency (Arb. U.)") - plt.xlabel(rf"{species.capitalize()} k$_{{i,j}}$ (s$^{-1}$)") + plt.ylabel("Frequency (Arb. U.)",fontsize=16) + plt.xlabel(rf"{species.capitalize()} k$_{{i,j}}$ (s$^{-1}$)",fontsize=16) plt.xlim([1, 1e18]) - plt.xticks([1e0, 1e3, 1e6, 1e9, 1e12, 1e15, 1e18]) + plt.yticks(fontsize=14) + plt.xticks([1e0, 1e3, 1e6, 1e9, 1e12, 1e15, 1e18],fontsize=14) plt.ylim([0, np.max(n) * 1.02]) plt.legend(loc=2, prop={"size": 18}) plt.gca().set_xscale("log") From a487528456ce124204e06d02224eb611b84dbfc4 Mon Sep 17 00:00:00 2001 From: jimmy Date: Sun, 27 Feb 2022 14:55:49 -0700 Subject: [PATCH 2/2] changed the plot_stacked_hist_rates() function to be more pretty and have larger font --- morphct/kmc_analyze.py | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/morphct/kmc_analyze.py b/morphct/kmc_analyze.py index 736a45f..bd26d59 100644 --- a/morphct/kmc_analyze.py +++ b/morphct/kmc_analyze.py @@ -1537,24 +1537,23 @@ def plot_stacked_hist_rates( [data1, data2], bins=np.logspace(1, 18, 40), stacked=True, - color=["r", "b"], + color=["tab:orange", "tab:blue"], label=labels, ) plt.ylabel("Frequency (Arb. U.)",fontsize=16) - plt.xlabel(rf"{species.capitalize()} k$_{{i,j}}$ (s$^{-1}$)",fontsize=16) + plt.xlabel(rf"{species.capitalize()} k$_{{i,j}}$ (s$^{-1}$)", fontsize = 16) plt.xlim([1, 1e18]) - plt.yticks(fontsize=14) - plt.xticks([1e0, 1e3, 1e6, 1e9, 1e12, 1e15, 1e18],fontsize=14) + plt.xticks([1e0, 1e3, 1e6, 1e9, 1e12, 1e15, 1e18], fontsize = 14) + plt.yticks(fontsize = 14) plt.ylim([0, np.max(n) * 1.02]) plt.legend(loc=2, prop={"size": 18}) plt.gca().set_xscale("log") filename = f"{species}_hopping_rate_clusters.png" filepath = os.path.join(path, filename) - plt.savefig(filepath, dpi=300) + plt.savefig(filepath, dpi=300, bbox_inches = "tight") plt.close() print(f"\tFigure saved as {filename}") - def plot_stacked_hist_tis( data1, data2, labels, species, cutoff, path ): # pragma: no cover