diff --git a/README.md b/README.md index 18284b2..2cb842d 100644 --- a/README.md +++ b/README.md @@ -125,6 +125,7 @@ Maximum 4 species 3 reactions, Example speed/accuracy trade off figure. ### Data * `paper/maximum_out_S4_R3/Bimol_1.speedtime` - Speed-accuracy trade off data * `paper/maximum_out_S4_R3/Bimol_1.lbs` - CRN file used +* paper/maximum_out_S4_R3/Bimol_1_tf10000.tsv - heatmap file ### Code * `python paper/fig_max_speed_ac/fig_max_histo.py` @@ -176,4 +177,4 @@ All CRNs shown in the paper are stored in a compressed format in the `Storage` d `python python/lbs_storage.py --crn_storage_file Storage\AMno11_S3_R3_CRNs.tsv -d AMno11_S3_R3 -r all` -Alternatively, you can choose to decompress a single CRN by using its integer identifier as the argument for `r`. \ No newline at end of file +Alternatively, you can choose to decompress a single CRN by using its integer identifier as the argument for `r`. diff --git a/paper/fig_max_speed_ac/fig_max_speed.py b/paper/fig_max_speed_ac/fig_max_speed.py index a13ecac..cd347af 100644 --- a/paper/fig_max_speed_ac/fig_max_speed.py +++ b/paper/fig_max_speed_ac/fig_max_speed.py @@ -2,8 +2,8 @@ import pandas as pd import matplotlib.pyplot as plt import matplotlib.patches as patches -from mpl_toolkits.axes_grid1.inset_locator import zoomed_inset_axes -from mpl_toolkits.axes_grid1.inset_locator import mark_inset +# from mpl_toolkits.axes_grid1.inset_locator import zoomed_inset_axes +# from mpl_toolkits.axes_grid1.inset_locator import mark_inset import os import numpy as np @@ -20,7 +20,7 @@ N = 50 one_N = speedac[speedac["N"] == N].copy() -fig, ax = plt.subplots(1, 2) +fig, ax = plt.subplots(1, 3) plot_settings = { "linestyle" : "-", @@ -41,21 +41,37 @@ label="A = {0}".format(int(i)), **plot_settings) -ax[0].set_xlabel("Ratio of slow/fast reactions") +ax[0].set_xlabel("Ratio of slow/fast reaction rates") ax[0].set_ylabel("Accuracy") #ax[0].legend(loc="lower center") -ax[0].text(-0.3, 1.1, "a", transform=ax[0].transAxes, fontsize=10) -ax[1].set_xlabel("Ratio of slow/fast reactions") +ax[1].set_xlabel("Ratio of slow/fast reaction rates") ax[1].set_ylabel("Expected halt time") leg = ax[1].legend() leg, ax[1] = shift_legend(ax[1], leg, yshift=0.1) -ax[1].text(-0.35, 1.05, "b", transform=ax[1].transAxes, fontsize=10) -fig.set_size_inches(cm2inch(7.9, 3.5)) +##################### +### Accuracy decrease with moleucles +############# +acc_down = pd.read_csv("paper/maximum_out_S4_R3/Bimol_1_tf10000.tsv", sep="\t", names=["N", "opt_score", "one_score"]) +ax[2].plot(acc_down["N"], acc_down["opt_score"],**plot_settings) +ax[2].set_xscale('log') +ax[2].set_ylim(0, 1.1) +#cycler = matplotlib.rcParams['axes.color_cycle'] +ax[2].axvline(100, color="gray", linewidth=0.5) +ax[2].set_xlabel("Total molecules ($n$)") +ax[2].set_ylabel("Accuracy") + +ly = 0.92 +ax[0].text(0.01, ly, "a", transform=fig.transFigure, fontsize=10) +ax[1].text(0.35, ly, "b", transform=fig.transFigure, fontsize=10) +ax[1].text(0.69, ly, "c", transform=fig.transFigure, fontsize=10) + + +fig.set_size_inches(cm2inch(12, 3.5)) #fig.tight_layout() -fig.subplots_adjust(left= 0.15, # the left side of the subplots of the figure +fig.subplots_adjust(left= 0.10, # the left side of the subplots of the figure right = 0.99, # the right side of the subplots of the figure bottom = 0.3, # the bottom of the subplots of the figure top = 0.85, # the top of the subplots of the figure diff --git a/paper/maximum_out_S4_R3/Bimol_1_tf10000.tsv b/paper/maximum_out_S4_R3/Bimol_1_tf10000.tsv new file mode 100644 index 0000000..3a70993 --- /dev/null +++ b/paper/maximum_out_S4_R3/Bimol_1_tf10000.tsv @@ -0,0 +1,21 @@ +1.000000 1.000000 0.363000 +2.000000 0.998000 0.074000 +3.000000 0.998000 0.015000 +5.000000 0.997000 0.004000 +7.000000 0.996000 0.000000 +10.000000 0.995000 0.000000 +20.000000 0.980000 0.000000 +30.000000 0.965000 0.000000 +50.000000 0.961000 0.000000 +70.000000 0.931000 0.000000 +100.000000 0.906000 0.000000 +200.000000 0.832000 0.000000 +300.000000 0.768000 0.000000 +500.000000 0.604000 0.000000 +700.000000 0.542000 0.000000 +1000.000000 0.398000 0.000000 +2000.000000 0.150000 0.000000 +3000.000000 0.055000 0.000000 +5000.000000 0.010000 0.000000 +7000.000000 0.001000 0.000000 +10000.000000 0.000000 0.000000