Skip to content

Commit

Permalink
Fix for figures in the Granger causality tutorial (NeuralEnsemble#434)
Browse files Browse the repository at this point in the history
The plots generated in the Granger causality tutorial had incorrect axis ranges. This was fixed by setting x- and y-axis bounds in both plots.

- Fixed the figures in granger_causality.ipynb tutorial
  • Loading branch information
rjurkus committed Dec 7, 2021
1 parent b53be3e commit 0c54079
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions doc/tutorials/granger_causality.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,8 @@
"ax1.text(0.5, 0.6, 'Z', horizontalalignment='center', verticalalignment='center')\n",
"ax1.text(0.8, 0.2, 'X', horizontalalignment='center', verticalalignment='center')\n",
"ax1.set_title('Indirect only')\n",
"ax1.set_xbound((0, 1))\n",
"ax1.set_ybound((0, 0.8))\n",
"\n",
"ax1.tick_params(axis='both', which='both', bottom=False, top=False, labelbottom=False, \n",
" right=False, left=False, labelleft=False)\n",
Expand All @@ -69,11 +71,13 @@
"ax2.text(0.2, 0.2, 'Y', horizontalalignment='center', verticalalignment='center')\n",
"ax2.text(0.5, 0.6, 'Z', horizontalalignment='center', verticalalignment='center')\n",
"ax2.text(0.8, 0.2, 'X', horizontalalignment='center', verticalalignment='center')\n",
"ax2.set_xbound((0, 1))\n",
"ax2.set_ybound((0, 0.8))\n",
"\n",
"ax2.tick_params(axis='both', which='both', bottom=False, top=False, labelbottom=False, \n",
" right=False, left=False, labelleft=False)\n",
"ax2.set_title('Both direct and indirect')\n",
"\n",
"plt.tight_layout()\n",
"plt.show()"
]
},
Expand Down Expand Up @@ -223,7 +227,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.8.5"
"version": "3.7.3"
}
},
"nbformat": 4,
Expand Down

0 comments on commit 0c54079

Please sign in to comment.