Skip to content

Commit

Permalink
fix EBRAINS errors
Browse files Browse the repository at this point in the history
  • Loading branch information
jessica-mitchell committed Sep 18, 2024
1 parent a7d130e commit 759c099
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 37 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -782,7 +782,6 @@
"\n",
"plt.rcParams.update(\n",
" {\n",
" \"font.sans-serif\": \"Arial\",\n",
" \"axes.spines.right\": False,\n",
" \"axes.spines.top\": False,\n",
" \"axes.prop_cycle\": cycler(color=[colors[\"blue\"], colors[\"red\"]]),\n",
Expand Down Expand Up @@ -814,9 +813,7 @@
"\n",
"axs[-1].set_xlabel(\"training iteration\")\n",
"axs[-1].set_xlim(1, n_iter)\n",
"axs[-1].xaxis.get_major_locator().set_params(integer=True)\n",
"\n",
"fig.tight_layout()"
"axs[-1].xaxis.get_major_locator().set_params(integer=True)\n"
]
},
{
Expand Down Expand Up @@ -919,17 +916,16 @@
"\n",
"fig, axs = plt.subplots(3, 1, sharex=True, figsize=(3, 4))\n",
"\n",
"plot_weight_time_course(axs[0], events_wr, nrns_in[:n_record_w], nrns_rec[:n_record_w], \"in_rec\", r\"$W_\\text{in}$ (pA)\")\n",
"plot_weight_time_course(axs[0], events_wr, nrns_in[:n_record_w], nrns_rec[:n_record_w], \"in_rec\", r\"$W_{in}$ (pA)\")\n",
"plot_weight_time_course(\n",
" axs[1], events_wr, nrns_rec[:n_record_w], nrns_rec[:n_record_w], \"rec_rec\", r\"$W_\\text{rec}$ (pA)\"\n",
" axs[1], events_wr, nrns_rec[:n_record_w], nrns_rec[:n_record_w], \"rec_rec\", r\"$W_{rec}$ (pA)\"\n",
")\n",
"plot_weight_time_course(axs[2], events_wr, nrns_rec[:n_record_w], nrns_out, \"rec_out\", r\"$W_\\text{out}$ (pA)\")\n",
"plot_weight_time_course(axs[2], events_wr, nrns_rec[:n_record_w], nrns_out, \"rec_out\", r\"$W_{out}$ (pA)\")\n",
"\n",
"axs[-1].set_xlabel(r\"$t$ (ms)\")\n",
"axs[-1].set_xlim(0, steps[\"task\"])\n",
"\n",
"fig.align_ylabels()\n",
"fig.tight_layout()"
"fig.align_ylabels()\n"
]
},
{
Expand Down Expand Up @@ -981,8 +977,6 @@
"\n",
"cbar = plt.colorbar(cmesh, cax=axs[1, 1].inset_axes([1.1, 0.2, 0.05, 0.8]), label=\"weight (pA)\")\n",
"\n",
"fig.tight_layout()\n",
"\n",
"plt.show()"
]
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -709,7 +709,6 @@
"\n",
"plt.rcParams.update(\n",
" {\n",
" \"font.sans-serif\": \"Arial\",\n",
" \"axes.spines.right\": False,\n",
" \"axes.spines.top\": False,\n",
" \"axes.prop_cycle\": cycler(color=[colors[\"blue\"], colors[\"red\"]]),\n",
Expand Down Expand Up @@ -750,9 +749,7 @@
"ax.set_xlabel(r\"$y_0$ and $y^*_0$\")\n",
"ax.set_ylabel(r\"$y_1$ and $y^*_1$\")\n",
"\n",
"ax.axis(\"equal\")\n",
"\n",
"fig.tight_layout()"
"ax.axis(\"equal\")\n"
]
},
{
Expand All @@ -777,8 +774,7 @@
"ax.set_xlabel(\"training iteration\")\n",
"ax.set_xlim(1, n_iter)\n",
"ax.xaxis.get_major_locator().set_params(integer=True)\n",
"ax.legend(bbox_to_anchor=(1.01, 0.5), loc=\"center left\")\n",
"fig.tight_layout()"
"ax.legend(bbox_to_anchor=(1.01, 0.5), loc=\"center left\")\n"
]
},
{
Expand Down Expand Up @@ -877,17 +873,16 @@
"\n",
"fig, axs = plt.subplots(3, 1, sharex=True, figsize=(3, 4))\n",
"\n",
"plot_weight_time_course(axs[0], events_wr, nrns_in[:n_record_w], nrns_rec[:n_record_w], \"in_rec\", r\"$W_\\text{in}$ (pA)\")\n",
"plot_weight_time_course(axs[0], events_wr, nrns_in[:n_record_w], nrns_rec[:n_record_w], \"in_rec\", r\"$W_{in}$ (pA)\")\n",
"plot_weight_time_course(\n",
" axs[1], events_wr, nrns_rec[:n_record_w], nrns_rec[:n_record_w], \"rec_rec\", r\"$W_\\text{rec}$ (pA)\"\n",
" axs[1], events_wr, nrns_rec[:n_record_w], nrns_rec[:n_record_w], \"rec_rec\", r\"$W_{rec}$ (pA)\"\n",
")\n",
"plot_weight_time_course(axs[2], events_wr, nrns_rec[:n_record_w], nrns_out, \"rec_out\", r\"$W_\\text{out}$ (pA)\")\n",
"plot_weight_time_course(axs[2], events_wr, nrns_rec[:n_record_w], nrns_out, \"rec_out\", r\"$W_{out}$ (pA)\")\n",
"\n",
"axs[-1].set_xlabel(r\"$t$ (ms)\")\n",
"axs[-1].set_xlim(0, steps[\"task\"])\n",
"\n",
"fig.align_ylabels()\n",
"fig.tight_layout()"
"fig.align_ylabels()\n"
]
},
{
Expand Down Expand Up @@ -939,8 +934,6 @@
"\n",
"cbar = plt.colorbar(cmesh, cax=axs[1, 1].inset_axes([1.1, 0.2, 0.05, 0.8]), label=\"weight (pA)\")\n",
"\n",
"fig.tight_layout()\n",
"\n",
"plt.show()"
]
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -693,7 +693,6 @@
"\n",
"plt.rcParams.update(\n",
" {\n",
" \"font.sans-serif\": \"Arial\",\n",
" \"axes.spines.right\": False,\n",
" \"axes.spines.top\": False,\n",
" \"axes.prop_cycle\": cycler(color=[colors[\"blue\"], colors[\"red\"]]),\n",
Expand Down Expand Up @@ -734,9 +733,7 @@
"ax.set_xlabel(r\"$y_0$ and $y^*_0$\")\n",
"ax.set_ylabel(r\"$y_1$ and $y^*_1$\")\n",
"\n",
"ax.axis(\"equal\")\n",
"\n",
"fig.tight_layout()"
"ax.axis(\"equal\")\n"
]
},
{
Expand All @@ -761,8 +758,7 @@
"ax.set_xlabel(\"training iteration\")\n",
"ax.set_xlim(1, n_iter)\n",
"ax.xaxis.get_major_locator().set_params(integer=True)\n",
"ax.legend(bbox_to_anchor=(1.01, 0.5), loc=\"center left\")\n",
"fig.tight_layout()"
"ax.legend(bbox_to_anchor=(1.01, 0.5), loc=\"center left\")\n"
]
},
{
Expand Down Expand Up @@ -861,17 +857,16 @@
"\n",
"fig, axs = plt.subplots(3, 1, sharex=True, figsize=(3, 4))\n",
"\n",
"plot_weight_time_course(axs[0], events_wr, nrns_in[:n_record_w], nrns_rec[:n_record_w], \"in_rec\", r\"$W_\\text{in}$ (pA)\")\n",
"plot_weight_time_course(axs[0], events_wr, nrns_in[:n_record_w], nrns_rec[:n_record_w], \"in_rec\", r\"$W_{in}$ (pA)\")\n",
"plot_weight_time_course(\n",
" axs[1], events_wr, nrns_rec[:n_record_w], nrns_rec[:n_record_w], \"rec_rec\", r\"$W_\\text{rec}$ (pA)\"\n",
" axs[1], events_wr, nrns_rec[:n_record_w], nrns_rec[:n_record_w], \"rec_rec\", r\"$W_{rec}$ (pA)\"\n",
")\n",
"plot_weight_time_course(axs[2], events_wr, nrns_rec[:n_record_w], nrns_out, \"rec_out\", r\"$W_\\text{out}$ (pA)\")\n",
"plot_weight_time_course(axs[2], events_wr, nrns_rec[:n_record_w], nrns_out, \"rec_out\", r\"$W_{out}$ (pA)\")\n",
"\n",
"axs[-1].set_xlabel(r\"$t$ (ms)\")\n",
"axs[-1].set_xlim(0, steps[\"task\"])\n",
"\n",
"fig.align_ylabels()\n",
"fig.tight_layout()"
"fig.align_ylabels()\n"
]
},
{
Expand Down Expand Up @@ -923,8 +918,6 @@
"\n",
"cbar = plt.colorbar(cmesh, cax=axs[1, 1].inset_axes([1.1, 0.2, 0.05, 0.8]), label=\"weight (pA)\")\n",
"\n",
"fig.tight_layout()\n",
"\n",
"plt.show()"
]
}
Expand Down

0 comments on commit 759c099

Please sign in to comment.