This page demonstrates Python tips and tricks that I use in my everyday programming as an atmospheric science graduate student.
-Brian Blaylock

Tuesday, November 7, 2017

More Python Color maps: cmocean

Additional, built-in colormaps can be found by importing cmocean
http://matplotlib.org/cmocean/

import cmocean
plt.plot(data, cmpa=cmocean.cm.temperature)

Options:
  • temperature
  • salinity
  • par
  • gray
  • oxygen
  • bathymetry
  • density
  • chlorophyll
  • CDOM
  • turbidity
  • speed
  • waveheight
  • waveperiod
  • phase
  • freesurface
  • velocity
  • vorticity
Don't use the Jet colormap!
http://www.research.ibm.com/people/l/lloydt/color/color.HTM

No comments:

Post a Comment

Note: Only a member of this blog may post a comment.