From b8063aaec5b3b75d6f2dbdcd4b41db74f5da7d92 Mon Sep 17 00:00:00 2001 From: Lars Hubatsch <hubatsch@pks.mpg.de> Date: Fri, 27 Nov 2020 09:51:45 +0100 Subject: [PATCH] Plotting: Add model sketches to Python. --- Plots_Droplet_FRAP.ipynb | 71 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 71 insertions(+) diff --git a/Plots_Droplet_FRAP.ipynb b/Plots_Droplet_FRAP.ipynb index 43a8fd5..c5a4d4f 100644 --- a/Plots_Droplet_FRAP.ipynb +++ b/Plots_Droplet_FRAP.ipynb @@ -470,6 +470,77 @@ "save_nice_fig(fol+'Fig1/tot_recov.pdf')" ] }, + { + "cell_type": "code", + "execution_count": null, + "metadata": {}, + "outputs": [], + "source": [ + "nice_fig('$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", + "plt.legend(frameon=False, fontsize=9, handletextpad=0.4)\n", + "save_nice_fig(fol+'Fig1/tot_recov_PGL.pdf')" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": {}, + "outputs": [], + "source": [ + "nice_fig('$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", + "plt.yticks([]); plt.ylabel('')\n", + "save_nice_fig(fol+'Fig1/tot_recov_coac.pdf')" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "### Figure 2: model sketches" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": {}, + "outputs": [], + "source": [ + "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", + " [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", + "save_nice_fig(fol+'Fig2/full_time_course.pdf')" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": {}, + "outputs": [], + "source": [ + "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", + " [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.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", + "save_nice_fig(fol+'Fig2/snap_shot.pdf')" + ] + }, { "cell_type": "markdown", "metadata": {}, -- GitLab