Skip to content

Commit

Permalink
fixed matplotlib error in notebook
Browse files Browse the repository at this point in the history
  • Loading branch information
hannorein committed May 21, 2024
1 parent ae8a7c5 commit 13dbeff
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions ipython_examples/PoincareMap.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -344,11 +344,12 @@
"source": [
"%matplotlib inline \n",
"import matplotlib.pyplot as plt\n",
"import matplotlib.cm\n",
"fig = plt.figure(figsize=(14,8))\n",
"ax = plt.subplot(111)\n",
"ax.set_xlabel(\"$\\phi$\"); ax.set_ylabel(\"$\\dot{\\phi}$\")\n",
"ax.set_xlim([-np.pi,np.pi]); ax.set_ylim([-0.06,0.1])\n",
"cm = plt.cm.get_cmap('brg')\n",
"cm = matplotlib.cm.get_cmap('brg')\n",
"for m, megno, vx in res:\n",
" c = np.empty(len(m[:,0])); c.fill(megno)\n",
" p = ax.scatter(m[:,0],m[:,1],marker=\".\",c=c, vmin=1.4, vmax=3, s=25,edgecolor='none', cmap=cm)\n",
Expand Down Expand Up @@ -384,5 +385,5 @@
}
},
"nbformat": 4,
"nbformat_minor": 2
"nbformat_minor": 4
}

0 comments on commit 13dbeff

Please sign in to comment.