Skip to content

avapolzin/rahrah

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

27 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Documentation Status DOI

University-inspired matplotlib color palettes and colormaps. Colors are taken directly from University branding guidelines, so there is no specific effort toward perceptual uniformity or accessibility for color blindness beyond the aesthetic choices I made in putting the palettes/colormaps together. Please check your plots/figures with COBLIS or similar.

Installation

To install:

cd ~

git clone git@github.com:avapolzin/rahrah.git

cd rahrah

sudo python3 setupy.py install

or

pip install rahrah

If you use this package or the scripts in this repository in a publication, please add a footnote linking to https://github.com/avapolzin/rahrah and/or consider adding this software to your acknowledgments. If you would like to cite rahrah, please use the Zenodo DOI linked here.

I'd love to feature plots/figures that make use of these palettes in the wild, so should these palettes be of use, please send me a copy of that figure and/or a link to your paper or presentation and I will share it here.

(Interested in palettes and colormaps based on album covers? Check out albumpl.)

Palettes/Colormaps

To request the addition of a new school's palette/colormap, please open an issue, linking to the university's branding guidelines.

Included palettes (to now):

  1. Albion (Albion College) Albion_summary

  2. Amherst (Amherst College) Amherst_summary

  3. ASU (Arizona State University) ASU_summary

  4. Bowdoin (Bowdoin College) Bowdoin_summary

  5. Brown (Brown University) Brown_summary

  6. BrownBright (Brown University) BrownBright_summary

  7. Caltech (California Institute of Technology) Caltech_summary

  8. CaltechBright (California Institute of Technology) CaltechBright_summary

  9. CarnegieMellon (Carnegie Mellon University) CarnegieMellon_summary

  10. CarnegieMellonBright (Carnegie Mellon University) CMUBright_summary

  11. CUNY (City University of New York) CUNY_summary

  12. Colgate (Colgate University) Colgate_summary

  13. Columbia (Columbia University) Columbia_summary

  14. ColumbiaBright (Columbia University) ColumbiaBright_summary

  15. Cornell (Cornell University) Cornell_summary

  16. Dartmouth (Dartmouth College) Dartmouth_summary

  17. DartmouthMono (Dartmouth College) DartmouthMono_summary

  18. Duke (Duke University) Duke_summary

  19. GeorgiaTech (Georgia Institute of Technology) GeorgiaTech_summary

  20. GSU (Georgia State University) GeorgiaState_summary

  21. Harvard (Harvard University) Harvard_summary

  22. HarveyMudd (Harvey Mudd College) HarveyMudd_summary

  23. Haverford (Haverford College) Haverford_summary

  24. Indiana (Indiana University) Indiana_summary

  25. JohnsHopkins (Johns Hopkins University) JohnsHopkins_summary

  26. JohnsHopkinsMono (Johns Hopkins University) JohnsHopkinsMono_summary

  27. MIT (Massachusetts Institute of Technology) MIT_summary

  28. MITBright (Massachusetts Institute of Technology) MITBright_summary

  29. McGill (McGill University) McGill_summary

  30. MichiganState (Michigan State University) MichiganState_summary

  31. Middlebury (Middlebury College) Middlebury_summary

  32. NMSU (New Mexico State University) NMSU_summary

  33. NYU (New York University) NYU_summary

  34. NCState (North Carolina State University) NCState_summary

  35. NIU (Northern Illinois University) NIU_summary

  36. Northwestern (Northwestern University) Northwestern_summary

  37. NotreDame (Notre Dame University) NotreDame_summary

  38. Oberlin (Oberlin College and Conservatory) Oberlin_summary

  39. OhioState (The Ohio State University) OhioState_summary

  40. OregonState (Oregon State University) OregonState_summary

  41. PennState (The Pennsylvania State University) PennState_summary

  42. Princeton (Princeton University) Princeton_summary

  43. Purdue (Purdue University) Purdue_summary

  44. QUB (Queen's University Belfast) QUB_summary

  45. QUBBright (Queen's University Belfast) QUBBright_summary

  46. Reed (Reed College) Reed_summary

  47. Rutgers (Rutgers, The State University of New Jersey) Rutgers_summary

  48. Stanford (Stanford University) Stanford_summary

  49. StonyBrook (The State University of New York at Stony Brook) StonyBrook_summary

  50. Syracuse (Syracuse University) Syracuse_summary

  51. Arizona (University of Arizona) Arizona_summary

  52. UBC (University of British Columbia) UBC_summary

  53. Berkeley (University of California, Berkeley) Berkeley_summary

  54. UCLA (University of California, Los Angeles) UCLA_summary

  55. Cambridge (University of Cambridge) Cambridge_summary

  56. Chicago (The University of Chicago) chicago_summary

  57. ChicagoBright (The University of Chicago) ChicagoBright_summary

  58. Colorado (University of Colorado Boulder) Colorado_summary

  59. UConn (University of Connecticut) UConn_summary

  60. Idaho (University of Idaho) Idaho_summary

  61. Illinois (University of Illinois) Illinois_summary

  62. Iowa (University of Iowa) Iowa_summary

  63. Kansas (University of Kansas) Kansas_summary

  64. Kentucky (University of Kentucky) Kentucky_summary

  65. Oxford (University of Oxford) Oxford_summary

  66. Maryland (University of Maryland) Maryland_summary

  67. UMass (University of Massachusetts Amherst) UMass_summary

  68. UMassBright (University of Massachusetts Amherst) UMassBright_summary

  69. Michigan (University of Michigan) Michigan_summary

  70. Minnesota (University of Minnesota) Minnesota_summary

  71. Nebraska (University of Nebraska) Nebraska_summary

  72. UNC (University of North Carolina Chapel Hill) UNC_summary

  73. UNCBright (University of North Carolina Chapel Hill) UNCBright_summary

  74. Oregon (University of Oregon) Oregon_summary

  75. Penn (University of Pennsylvania) Penn_summary

  76. Pitt (University of Pittsburgh) Pitt_summary

  77. USC (University of Southern California) USC_summary

  78. Texas (University of Texas) Texas_summary

  79. Toronto (University of Toronto) Toronto_summary

  80. Utah (University of Utah) Utah_summary

  81. UVA (University of Virginia) Virginia_summary

  82. Washington (University of Washington) Washington_summary

  83. Wisconsin (University of Wisconsin) Wisconsin_summary

  84. Vanderbilt (Vanderbilt University) Vanderbilt_summary

  85. Wellesley (Wellesley College) Wellesley_summary

  86. WVU (West Virginia University) WestVirginia_summary

  87. Yale (Yale University) yale_summary

There are also some alternative colormaps that are not the default associated with a specific palette, but are still callable.


How to use rahrah:

  • To list all palettes and their properties:
from rahrah.palette import list_palettes

list_palettes()

You can also filter for number of colors in the color cycle or type of colormap (sequential/diverging) with the arguments mincolors and maptype.

  • To list all colormaps:
from rahrah.cmap import list_maps

list_maps()
  • To set palette as default for both color cycle and colormap:
from rahrah.palette import set_default

set_default('Northwestern')
  • To set a palette as default for color cycle or colormap:
from rahrah.palette import set_default_ccycle, set_default_cmap

set_default_ccycle('ChicagoBright')

or

set_default_cmap('Yale')
  • To access colormaps without setting them as default:
import matplotlib.pyplot as plt
import rahrah.cmap

plt.imshow(image, cmap = 'USC')

To reverse the colormap, simply append '_r' to the name (e.g., 'USC' becomes 'USC_r').

  • To access the colors in a color cycle/palette without setting a default:
from rahrah.palette import return_colors

return_colors('BrownBright')

The lightness of all colormaps is shown below (all sequential maps are shown dark-to-light for easier comparison): rahrahlightness 001

About

University-inspired matplotlib color palettes and colormaps.

Topics

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages