Skip to content

Commit

Permalink
colormap
Browse files Browse the repository at this point in the history
  • Loading branch information
hannorein committed May 21, 2024
1 parent 74985c2 commit 607ecb6
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions ipython_examples/PoincareMap.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -344,15 +344,13 @@
"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 = 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",
" p = ax.scatter(m[:,0],m[:,1],marker=\".\",c=c, vmin=1.4, vmax=3, s=25,edgecolor='none', cmap=\"brg\")\n",
"cb = plt.colorbar(p, ax=ax)\n",
"cb.set_label(\"MEGNO $<Y>$\")"
]
Expand Down

0 comments on commit 607ecb6

Please sign in to comment.