diff --git a/Plots_Droplet_FRAP.ipynb b/Plots_Droplet_FRAP.ipynb index c5a4d4f8549a181714e4f3d61859a1939d7c69f8..dc130c2927ab36b25d77cbcfd54e597b9fe5fba9 100644 --- a/Plots_Droplet_FRAP.ipynb +++ b/Plots_Droplet_FRAP.ipynb @@ -29,7 +29,8 @@ "outputs": [], "source": [ "# Define colors\n", - "sns.set_palette(sns.color_palette(\"Set2\"))\n", + "pa = sns.color_palette(\"Set2\")\n", + "sns.set_palette(pa)\n", "grey = (0.6, 0.6, 0.6)\n", "dark_grey = (0.2, 0.2, 0.2)\n", "green = pa[0]\n", @@ -166,7 +167,7 @@ "metadata": {}, "outputs": [], "source": [ - "nice_fig('t [s]', 'intensity (a.u)', [0,50], [0,1.1], [1.5,2])\n", + "nice_fig('time $t$ [s]', 'intensity (a.u)', [0,50], [0,1.1], [1.5,2])\n", "plt.plot([np.mean(x)/f_i[0].phi_tot_int for x in profs[0]],\n", " lw=2, label='d=0.5', ls='-')\n", "plt.plot([np.mean(x)/f_i[1].phi_tot_int for x in profs[1]],\n", @@ -185,16 +186,17 @@ "metadata": {}, "outputs": [], "source": [ - "nice_fig('t [s]', 'intensity (a.u)', [0,30], [0,1.1], [1.5,2])\n", + "nice_fig('time $t$ [s]', r'av. volume fraction $\\bar{\\phi}_\\mathrm{u}$', [0,30], [0,1.1], [1.5,2])\n", "plt.plot([np.mean(x)/f_i[3].phi_tot_int for x in profs[3]],\n", - " lw=2, label='d=0.5', ls='-')\n", + " lw=2, label='$d=0.5 \\,\\mathrm{\\mu m}$', ls='-')\n", "plt.plot([np.mean(x)/f_i[4].phi_tot_int for x in profs[4]],\n", - " lw=2, label='d=1', ls='--')\n", + " lw=2, label='$d=1 \\,\\mathrm{\\mu m}$', ls='--')\n", "plt.plot([np.mean(x)/f_i[5].phi_tot_int for x in profs[5]],\n", - " lw=2, label='d=1.5', ls=':')\n", + " lw=2, label='$d=1.5 \\,\\mathrm{\\mu m}$', ls=':')\n", "plt.plot(range(0, 100), np.ones(100), linestyle='--', color='k')\n", - "# plt.title('$P=9$', size=12)\n", - "plt.legend(prop={'size': 9}, frameon=False)\n", + "plt.title('$P=9$', size=12)\n", + "plt.legend(prop={'size': 9}, frameon=False, loc=(0.22, 0.025),\n", + " handletextpad=0.4, labelspacing=0.2)\n", "save_nice_fig(fol+'Fig3/tot_recov_neighbours_good.pdf')" ] }, @@ -204,12 +206,14 @@ "metadata": {}, "outputs": [], "source": [ - "nice_fig('x [$\\mu m$]', 'intensity (a.u)', [0,0.25], [0,1.1], [3.8,2])\n", - "l_sim = plt.plot(eps, np.transpose(profs[0])[:,::8]/f_i[0].phi_tot_int, '#1f77b4', lw=2.5)\n", + "ml = np.loadtxt('/Users/hubatsch/Desktop/DropletFRAP/matlab_fit.csv',\n", + " delimiter=',')\n", + "nice_fig('radial distance $r$ [$\\mathrm{\\mu m}$]', 'volume fraction $\\phi_\\mathrm{u}$', [0,0.25], [0,1.1], [3.8,2])\n", + "l_sim = plt.plot(eps, np.transpose(profs[0])[:,::8]/f_i[0].phi_tot_int, c=green,\n", + " lw=4.5, alpha=0.7)\n", "plt.plot(range(0, 100), np.ones(100), linestyle='--', color='k')\n", - "l_fit = plt.plot(np.linspace(0, 0.23, 100), np.transpose(ml)[:,::8],\n", - " ls='--', c='orange', lw=1.5)\n", - "plt.legend([l_sim[0], l_fit[0]], ['Simulation', 'Fit'], prop={'size': 9}, frameon=False)\n", + "l_fit = plt.plot(np.linspace(0, 0.23, 100), np.transpose(ml)[:,::8], c='k', lw=1.5)\n", + "plt.legend([l_sim[0], l_fit[0]], ['Model, eq. (6)', 'Fit, eq. (1)'], prop={'size': 9}, frameon=False)\n", "save_nice_fig(fol+'Fig3/spat_recov_neighbours.pdf')" ] }, @@ -264,17 +268,8 @@ "metadata": {}, "outputs": [], "source": [ - "np.savetxt('t_p_neighbours.csv', profs_cs[0], delimiter=',')" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "nice_fig('t [s]', '', [0,50], [0,1.1], [1.5,2])\n", - "ls = ['-', '--', ':']\n", + "nice_fig('time $t$ [s]', '', [0,50], [0,1.1], [1.5,2])\n", + "ls = ['-', '--', '-.']\n", "for i, f in enumerate(f_cs[0:3]):\n", " plt.plot([np.mean(x)/f.phi_tot_int for x in profs_cs[i]],\n", " label='d='+str(z[i]), ls=ls[i], lw=2)\n", @@ -290,14 +285,15 @@ "metadata": {}, "outputs": [], "source": [ - "nice_fig('t [s]', 'intensity (a.u)', [0,30], [0,1.1], [1.5,2])\n", - "ls = ['-', '--', ':']\n", + "nice_fig('time $t$ [s]', r'av. volume fraction $\\bar{\\phi}_\\mathrm{u}$', [0,30], [0,1.1], [1.5,2])\n", + "ls = ['-', '--', '-.']\n", "for i, f in enumerate(f_cs[3:]):\n", " plt.plot([np.mean(x)/f.phi_tot_int for x in profs_cs[i+3]],\n", - " label='h='+str(z[i]), lw=2, ls=ls[i])\n", + " label='$h=$'+str(z[i])+'$\\,\\mathrm{\\mu m}$', lw=2, ls=ls[i])\n", "plt.plot(range(0, 100), np.ones(100), linestyle='--', color='k')\n", "plt.title('$P=9$', size=12)\n", - "plt.legend(prop={'size': 9}, frameon=False)\n", + "plt.legend(prop={'size': 9}, frameon=False, loc=(0.22, 0.025),\n", + " handletextpad=0.4, labelspacing=0.2)\n", "save_nice_fig(fol+'Fig3/tot_recov_cs_good.pdf')" ] }, @@ -309,13 +305,13 @@ "source": [ "ml_neigh = np.loadtxt('/Users/hubatsch/Desktop/DropletFRAP/matlab_fit_neigh.csv',\n", " delimiter=',')\n", - "nice_fig('x [$\\mu m$]', 'intensity (a.u)', [0,0.25], [0,1.1], [3.8,2])\n", - "l_sim = plt.plot(eps, np.transpose(profs_cs[0])[:,::8]/f_cs[0].phi_tot_int, '#1f77b4',\n", - " lw=2.5, label='Simulation')\n", + "nice_fig('radial distance $r$ [$\\mathrm{\\mu m}$]', 'volume fraction $\\phi_\\mathrm{u}$', [0,0.25], [0,1.1], [3.8,2])\n", + "l_sim = plt.plot(eps, np.transpose(profs_cs[0])[:,::8]/f_cs[0].phi_tot_int, c=green,\n", + " lw=4.5, alpha=0.7)\n", "plt.plot(range(0, 100), np.ones(100), linestyle='--', color='k')\n", "l_fit = plt.plot(np.linspace(0, 0.23, 100), np.transpose(ml_neigh)[:,::8],\n", - " ls='--', c='orange', lw=1.5)\n", - "plt.legend([l_sim[0], l_fit[0]], ['Simulation', 'Fit'], frameon=False)\n", + " ls='-', c='k', lw=1)\n", + "plt.legend([l_sim[0], l_fit[0]], ['Model, eq. (6)', 'Fit, eq. (1)'], frameon=False, loc=(0.63, 0.0))\n", "save_nice_fig(fol+'Fig3/spat_recov_coverslip.pdf')" ] }, @@ -362,11 +358,27 @@ "ax1.patch.set_visible(False)\n", "plt.sca(ax2)\n", "sns.lineplot(x=\"conc\", y=\"vis\", data=louise, color=grey, label='data from Jawerth \\net al. 2018')\n", - "nice_fig('c_\\mathrm{salt} [\\mathrm{mM}]', '$\\eta^{-1} \\;[Pa\\cdot s]^{-1}$', [40,190], [0,7.24], [2.3,2])\n", + "nice_fig('c_\\mathrm{salt} [\\mathrm{mM}]', '$\\eta^{-1} \\;[Pa\\cdot s]^{-1}$', [40,190], [0,7.24], [3*2.3,3*2])\n", "plt.yticks(color = grey)\n", "plt.ylabel('$\\eta^{-1} \\;[\\mathrm{Pa\\cdot s}]^{-1}$ ', color = grey)\n", "plt.legend(frameon=False, fontsize=9)\n", - "save_nice_fig(fol+'Fig1/Lars_vs_Louise.pdf')" + "# save_nice_fig(fol+'Fig1/Lars_vs_Louise.pdf')" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "**Ratio between $D_{out}$ for maximum and minimum salt concentrations for PGL-3**" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": {}, + "outputs": [], + "source": [ + "lars[lars.conc==180].mean()/lars[lars.conc==50].mean()" ] }, { @@ -391,7 +403,7 @@ "ax.get_xticklabels()[0].set_color(green)\n", "ax.get_xticklabels()[1].set_color(blue)\n", "plt.xlim(-0.7, 1.7)\n", - "save_nice_fig(fol+'Fig1/Coacervates.pdf')" + "# save_nice_fig(fol+'Fig1/Coacervates.pdf')" ] }, { @@ -413,7 +425,7 @@ "l_fit = plt.plot(CMD_fit[:, 0], CMD_fit[:, 1::2], '-', lw=1, c='k')\n", "plt.plot(range(0, 10), np.ones(10)*np.min(CMD_fit[:, 1]), linestyle='--', color=grey, lw=1.5)\n", "plt.legend([l_sim[0], l_fit[0]], ['data', 'fit'], ncol=2, loc=(0, 0.85), frameon=False)\n", - "nice_fig('$r \\;[\\mathrm{\\mu m}$]', 'intensity (a.u)', [0,np.max(CMD_fit[:, 0])], [0,0.6], [2.3,2])\n", + "nice_fig('radial distance $r$ [$\\mathrm{\\mu m}$]', 'intensity (a.u)', [0,np.max(CMD_fit[:, 0])], [0,0.6], [2.3,2])\n", "save_nice_fig(fol+'Fig1/CMD_spat_recov.pdf')" ] }, @@ -436,7 +448,7 @@ "l_fit = plt.plot(PGL_fit[:, 0], PGL_fit[:, 1::2], '-', lw=1, c='k')\n", "plt.plot(range(0, 10), np.ones(10)*np.min(PGL_fit[:, 1]), linestyle='--', color=grey, lw=1.5)\n", "plt.legend([l_sim[0], l_fit[0]], ['data', 'fit'], ncol=2, loc=(0.015, 0.865), frameon=False)\n", - "nice_fig('$r \\;[\\mathrm{\\mu m}$]', 'intensity (a.u)', [0,np.max(PGL_fit[:, 0])], [0, 0.6], [2.3,2])\n", + "nice_fig('radial distance $r$ [$\\mathrm{\\mu m}$]', 'intensity (a.u)', [0,np.max(PGL_fit[:, 0])], [0, 0.6], [2.3,2])\n", "save_nice_fig(fol+'Fig1/PGL_spat_recov.pdf')" ] }, @@ -459,7 +471,7 @@ "# fig, ax1 = plt.subplots()\n", "# ax2 = ax1.twiny()\n", "# plt.sca(ax1)\n", - "nice_fig('$t/T_{max}$', 'intensity (a.u)', [0,200], [0,0.62], [2.3,2])\n", + "nice_fig('$t/T_\\mathrm{max}$', 'intensity (a.u)', [0,200], [0,0.62], [2.3,2])\n", "# plt.sca(ax2)\n", "# ax2.tick_params(axis=\"x\",direction=\"in\")\n", "plt.plot(PGL[::10, 0]/np.max(PGL[1:-1:2, 0]), PGL[::10,1], '.', label='PGL-3', c='#CC406E', markersize=3, alpha=0.7, lw=2)\n", @@ -476,7 +488,7 @@ "metadata": {}, "outputs": [], "source": [ - "nice_fig('$t$ [s]', 'intensity (a.u)', [0,200], [0,0.62], [1,2])\n", + "nice_fig('time $t$ [s]', 'intensity (a.u)', [0,200], [0,0.62], [1,2])\n", "# plt.sca(ax2)\n", "# ax2.tick_params(axis=\"x\",direction=\"in\")\n", "plt.plot(PGL[::10, 0], PGL[::10,1], '.', label='PGL-3', c='#CC406E', markersize=3, alpha=0.7, lw=2)\n", @@ -490,7 +502,7 @@ "metadata": {}, "outputs": [], "source": [ - "nice_fig('$t$ [s]', 'intensity (a.u)', [0,10], [0,0.62], [1,2])\n", + "nice_fig('time $t$ [s]', 'intensity (a.u)', [0,10], [0,0.62], [1,2])\n", "plt.plot(ATP[::1, 0], ATP[::1,1], '.', label='PLYS/ATP', c='#FF508A', markersize=3, alpha=0.7, lw=2)\n", "plt.plot(CMD[::5, 0], CMD[::5,1], '.', label='CMD/PLYS', c='#7F2845', markersize=3, alpha=0.7, lw=2)\n", "plt.legend(frameon=False, fontsize=9, loc=(-0.08, 0), handletextpad=0)\n", @@ -514,10 +526,13 @@ "model = np.loadtxt(fol+'Fig2/model_timecourse.csv', delimiter=',')\n", "l_fit = plt.plot(model[:, 0], model[:, 1:], '-', lw=1,\n", " c=green, label='Simulation')\n", - "nice_fig('$r$ [$\\mathrm{\\mu m}$]', '$\\phi_\\mathrm{u}$', [0, 2],\n", + "nice_fig('radial distance $r/R$', 'volume fraction $\\phi_\\mathrm{u}$', [0, 2],\n", " [0,1], [2.3,2])\n", "plt.plot(model[:, 0], model[:, -1], c=green, lw=2)\n", - "plt.annotate('$t \\longrightarrow \\infty$', (0.97, 0.89), (1.3,0.85), fontsize=12)\n", + "plt.plot(model[:, 0], model[:, -1], 'k', lw=2)\n", + "# plt.annotate('$t \\longrightarrow \\infty$', (0.97, 0.89), (1.3,0.85), fontsize=12)\n", + "# plt.annotate('$t \\longrightarrow \\infty$', (0.97, 0.89), (1.3,0.85), fontsize=12)\n", + "plt.annotate('$\\phi_\\mathrm{tot}$', (1, 0.5), (1.5,0.5), fontsize=10)\n", "save_nice_fig(fol+'Fig2/full_time_course.pdf')" ] }, @@ -530,14 +545,13 @@ "l_fit = plt.plot(model[:, 0], model[:, 2], '-', lw=1,\n", " c=dark_grey, label='Simulation')\n", "plt.plot(model[:, 0], model[:, -1], 'k', lw=2)\n", - "nice_fig('$r$ [$\\mathrm{\\mu m}$]', 'vol. frac. $\\phi$', [0, 2],\n", + "nice_fig('radial distance $r/R$', 'volume fraction $\\phi_\\mathrm{u}$', [0, 2],\n", " [0,1], [2.3,2])\n", - "plt.text(0.7, 0.15, '$\\phi_\\mathrm{u}$', fontsize=12)\n", - "plt.text(0.3, 0.7, '$\\phi_\\mathrm{b}$', fontsize=12)\n", + "plt.title('$t=0.22 \\;R^2/D_\\mathrm{in}$')\n", + "plt.text(0.75, 0.18, '$\\phi_\\mathrm{u}$', fontsize=10)\n", "plt.gca().fill_between(model[:, 0], 0, model[:, 2], color=green)\n", "plt.gca().fill_between(model[:, 0], model[:, -1], model[:, 2], color=grey)\n", - "plt.annotate('$\\phi_\\mathrm{tot}$', (1, 0.5), (1.5,0.5),\n", - " arrowprops={'arrowstyle': '-'}, fontsize=12)\n", + "plt.annotate('$\\phi_\\mathrm{tot}$', (1, 0.5), (1.5,0.5), fontsize=10)\n", "save_nice_fig(fol+'Fig2/snap_shot.pdf')" ] }, @@ -567,7 +581,7 @@ " label='Experiment')\n", "l_fit = plt.plot(PLYS_fit[:, 0], PLYS_fit[:, 1:], '-', lw=1,\n", " c=dark_grey, label='Simulation')\n", - "nice_fig('$r$ [$\\mathrm{\\mu m}$]', 'intensity (a.u)', [0, 2.4*np.max(PLYS[:, 0])],\n", + "nice_fig('radial distance $r$ [$\\mathrm{\\mu m}$]', 'intensity (a.u)', [0, 2.4*np.max(PLYS[:, 0])],\n", " [0,0.7], [2.3,2])\n", "plt.legend([l_data[0], l_fit[0]], ['ATP/PLYS', 'Full model'], frameon=False,\n", " fontsize=9, handletextpad=0.4, handlelength=0.8)\n", @@ -578,7 +592,7 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "**Panel: Experimental Partitioning vs $D_{out}$ for CMD**" + "**Panel: Experimental Partition coefficient vs $D_{out}$ for CMD**" ] }, { @@ -601,11 +615,13 @@ "plt.sca(ax1)\n", "sns.lineplot(x=\"P\", y=\"D_out\", data=CMD, color=green, ci='sd')\n", "sns.lineplot(x=\"P\", y=\"D_out\", data=PLYS, color=blue, ci='sd')\n", - "plt.plot(np.logspace(0, 2, 10), 2*np.logspace(0, 2, 10), '--', c='grey')\n", + "plt.plot(np.logspace(1, 2, 10), 2*np.logspace(1, 2, 10), '--', c='grey')\n", "ax1.set_yscale('log')\n", "ax1.set_xscale('log')\n", - "nice_fig('Partitioning P', '$D_{out} \\;[\\mu m^2s^{-1}]$', [1,100], [0.1,100], [2.3,2])\n", - "plt.legend(['CMD/PLYS', 'PLYS/ATP'], frameon=False, fontsize=9)\n", + "nice_fig('Partition coefficient $P$', '$D_\\mathrm{out} \\;[\\mathrm{\\mu m^2s^{-1}}]$', [1,100], [0.1,100], [2.3,2])\n", + "plt.legend(['CMD/PLYS', 'PLYS/ATP'], frameon=False, fontsize=9, loc=(0.48,0.))\n", + "plt.text(1.02, 1.7, '$D_\\mathrm{in, PLYS}$')\n", + "plt.text(1.02, 6, '$D_\\mathrm{in, CMD}$')\n", "plt.xticks([1, 10, 100]);\n", "save_nice_fig(fol+'Fig4/PLYS_CMD.pdf')" ] @@ -614,7 +630,7 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "**Panel: Experimental Partitioning vs $D_out$ for PGL-3**" + "**Panel: Experimental Partition coefficient vs $D_out$ for PGL-3**" ] }, { @@ -641,6 +657,7 @@ "source": [ "fig, ax1 = plt.subplots()\n", "plt.sca(ax1)\n", + "temp = sns.color_palette()\n", "sns.set_palette(sns.color_palette(\"Oranges\", 9))\n", "l50 = sns.lineplot(x=\"P\", y=\"D_out\", data=PGL_50, color=sns.color_palette()[1], ci=None)\n", "l60 = sns.lineplot(x=\"P\", y=\"D_out\", data=PGL_60, color=sns.color_palette()[2], ci=None)\n", @@ -656,13 +673,14 @@ "# plt.plot(np.logspace(2, 3, 10), 30*np.ones(10), '--', c='m', lw=2)\n", "ax1.set_yscale('log')\n", "ax1.set_xscale('log')\n", - "nice_fig('Partitioning P', '$D_{out} \\;[\\mathrm{\\mu m^2 s^{-1}}]$', [1,1000], [0.0003,200], [2.3,2])\n", + "nice_fig('Partition coefficient $P$', '$D_\\mathrm{out} \\;[\\mathrm{\\mu m^2 s^{-1}}]$', [1,1000], [0.0003,200], [2.3,2])\n", "plt.xticks([1, 10, 100, 1000]);\n", "plt.legend(loc=1)\n", "plt.legend(['50 mM', '60 mM', '75 mM', '90 mM', '100 mM', '120 mM', '150 mM', '180 mM'], labelspacing=0.3,\n", " loc=(0, 0.56), handletextpad=0.4, handlelength=0.5, frameon=0)\n", "plt.gca().add_artist(leg1)\n", - "save_nice_fig(fol+'Fig4/PGL-3.pdf')" + "save_nice_fig(fol+'Fig4/PGL-3.pdf')\n", + "sns.set_palette(temp)" ] }, { @@ -676,7 +694,7 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "**Panel: Partitioning vs. $D_{out}$, showcasing four different simulation start cases.**" + "**Panel: Partition coefficient vs. $D_{out}$, showcasing four different simulation start cases.**" ] }, { @@ -689,19 +707,19 @@ "P = [5, 150, 5, 150]\n", "D_o = [0.1, 0.1, 1, 1]\n", "plt.gca().set_prop_cycle(None)\n", - "nice_fig('Partitioning P', '$D_{out}$ [$\\mu m^2/s$]', [0.9,320], [0.000001,340], [2.3,2])\n", + "nice_fig('Partition coefficient $P$', '$D_\\mathrm{out}$ [$\\mathrm{\\mu m^2/s}$]', [0.9,320], [0.000001,340], [2.3,2])\n", "lines = plt.loglog(P_Do[0, :], P_Do[1:, :].transpose())\n", "plt.plot(P_Do[0, :], P_Do[0, :], '--', c='grey')\n", "plt.legend([lines[2], lines[0], lines[3], lines[1]],\n", " ['0.2', '0.02', '0.0067', '0.00067'], ncol=2, frameon=False,\n", - " title=r'\\underline{$D_{out}$/P [$\\mu m^2/s$]:}', columnspacing=0.5, labelspacing=0.3,\n", + " title=r'$D_\\mathrm{out}$/P [$\\mathrm{\\mu m^2/s}$]:', columnspacing=0.5, labelspacing=0.3,\n", " loc=(0.4, 0), handletextpad=0.4, handlelength=0.5)\n", "plt.gca().set_prop_cycle(None)\n", "plt.plot(P[0], D_o[0], 'd')\n", "plt.plot(P[1], D_o[1], 'd')\n", "plt.plot(P[2], D_o[2], 'd')\n", "plt.plot(P[3], D_o[3], 'd')\n", - "plt.annotate('$D_{out}$/P = 1 $\\mu m^2/s$', [1,40], c='grey')\n", + "plt.annotate('$D_{out}$/P = 1 $\\mathrm{\\mu m^2/s}$', [1,40], c='grey')\n", "plt.xticks([1, 10, 100]);\n", "save_nice_fig(fol+'Fig4/D_vs_P.pdf')" ] @@ -720,11 +738,11 @@ "outputs": [], "source": [ "P_Cost = np.loadtxt(fol+'/Fig4/Part_vs_Cost.csv', delimiter=',')\n", - "nice_fig('Partitioning P', 'Cost function [a.u.]', [0.9,320], [0.000000001,0.01], [2.3,2])\n", + "nice_fig('Partition coefficient $P$', 'Cost function [a.u.]', [0.9,320], [0.000000001,0.01], [2.3,2])\n", "lines = plt.loglog(P_Cost[0, :], P_Cost[1:, :].transpose())\n", "plt.legend([lines[2], lines[0], lines[3], lines[1]],\n", " ['0.2', '0.02', '0.0067', '0.00067'], ncol=2, frameon=False,\n", - " title=r'\\underline{$D_{out}$/P set to:}', columnspacing=0.5, labelspacing=0.3,\n", + " title=r'$D_\\mathrm{out}$/P set to:', columnspacing=0.5, labelspacing=0.3,\n", " loc=(0.081, 0), handletextpad=0.4, handlelength=0.5)\n", "plt.xticks([1, 10, 100]);\n", "save_nice_fig(fol+'Fig4/D_vs_Cost.pdf')" @@ -745,10 +763,11 @@ "source": [ "con = np.loadtxt(fol+'Fig4/Valley.csv', delimiter=',')\n", "levels = MaxNLocator(nbins=15).tick_values(np.log10(con[:, 2:].min()), np.log10(con[:, 2:].max()))\n", - "nice_fig('Partitioning P', '$D_{out} \\;[\\mu m^2 s^{-1}]$', [1, 3], [-2,1], [2.3,2])\n", + "nice_fig('Partition coefficient $P$', '$D_\\mathrm{out} \\;[\\mu m^2 s^{-1}]$', [1, 3], [-2,1], [2.3,2])\n", "CS = plt.contourf(np.log10(con[:, 0]), np.log10(con[:, 1]), np.log10(con[:, 2:]), levels=levels, cmap=cm.coolwarm)\n", - "plt.plot(np.log10(150), np.log10(10**-1), 'y*', label='Initial Simul.', markersize=3)\n", - "plt.legend(loc=(0, 0.83), frameon=False, handletextpad=0.4)\n", + "plt.plot(np.log10(150), np.log10(10**-1), 'y*', label='Initial Simul.', markersize=6)\n", + "le = plt.legend(loc=(0, 0.83), frameon=False, handletextpad=0.4)\n", + "le.get_texts()[0].set_color('white')\n", "plt.xticks([1, 2, 3], ['$10^1$', '$10^2$', '$10^3$'])\n", "plt.yticks([-2, -1, 0, 1], ['$10^{-2}$', '$10^{-1}$', '$10^0$', '$10^1$'])\n", "plt.tick_params('x', pad=5)\n", @@ -772,12 +791,13 @@ "outputs": [], "source": [ "levels = MaxNLocator(nbins=15).tick_values(np.log10(con[:, 2:].min()), np.log10(con[:, 2:].max()))\n", - "nice_fig('Partitioning P', '', [1.9, 2.4], [-1.5,-0.5], [2.3,2])\n", + "nice_fig('Partition coefficient $P$', '', [1.9, 2.4], [-1.5,-0.5], [2.3,2])\n", "CS = plt.contourf(np.log10(con[16:-27, 0]), np.log10(con[16:-27, 1]),\n", " np.log10(con[16:-27, 2+16:-27]), levels=levels,\n", " cmap=cm.coolwarm, vmax=-1.5)\n", - "plt.plot(np.log10(150), np.log10(10**-1), 'y*', label='Initial Simul.', markersize=3)\n", - "plt.legend(loc=(0, 0.83), frameon=False, handletextpad=0.4)\n", + "plt.plot(np.log10(150), np.log10(10**-1), 'y*', label='Initial Simul.', markersize=6)\n", + "le = plt.legend(loc=(0, 0.83), frameon=False, handletextpad=0.4)\n", + "le.get_texts()[0].set_color('white')\n", "plt.xticks([2, 2.25], ['$10^2$', '$10^{2.25}$'])\n", "plt.yticks([-1.5, -1, -0.5], ['$10^{-1.5}$', '$10^{-1}$', '$10^{-0.5}$'])\n", "plt.tick_params('x', pad=5)\n", @@ -786,6 +806,13 @@ "clb.ax.set_title('Cost')\n", "save_nice_fig(fol+'Fig4/Sim_D_out_P_inset.pdf')" ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": {}, + "outputs": [], + "source": [] } ], "metadata": {