University-inspired Matplotlib palettes and colormaps.
Project description
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):
-
Albion (Albion College)
-
Amherst (Amherst College)
-
ASU (Arizona State University)
-
Bowdoin (Bowdoin College)
-
Brown (Brown University)
-
BrownBright (Brown University)
-
Caltech (California Institute of Technology)
-
CaltechBright (California Institute of Technology)
-
CarnegieMellon (Carnegie Mellon University)
-
CarnegieMellonBright (Carnegie Mellon University)
-
CUNY (City University of New York)
-
Colgate (Colgate University)
-
Columbia (Columbia University)
-
ColumbiaBright (Columbia University)
-
Cornell (Cornell University)
-
Dartmouth (Dartmouth College)
-
DartmouthMono (Dartmouth College)
-
Duke (Duke University)
-
GeorgiaTech (Georgia Institute of Technology)
-
GSU (Georgia State University)
-
Harvard (Harvard University)
-
HarveyMudd (Harvey Mudd College)
-
Haverford (Haverford College)
-
Indiana (Indiana University)
-
JohnsHopkins (Johns Hopkins University)
-
JohnsHopkinsMono (Johns Hopkins University)
-
MIT (Massachusetts Institute of Technology)
-
MITBright (Massachusetts Institute of Technology)
-
McGill (McGill University)
-
MichiganState (Michigan State University)
-
Middlebury (Middlebury College)
-
NMSU (New Mexico State University)
-
NYU (New York University)
-
NCState (North Carolina State University)
-
NIU (Northern Illinois University)
-
Northwestern (Northwestern University)
-
NotreDame (Notre Dame University)
-
Oberlin (Oberlin College and Conservatory)
-
OhioState (The Ohio State University)
-
OregonState (Oregon State University)
-
PennState (The Pennsylvania State University)
-
Princeton (Princeton University)
-
Purdue (Purdue University)
-
QUB (Queen's University Belfast)
-
QUBBright (Queen's University Belfast)
-
Reed (Reed College)
-
Rutgers (Rutgers, The State University of New Jersey)
-
Stanford (Stanford University)
-
StonyBrook (The State University of New York at Stony Brook)
-
Syracuse (Syracuse University)
-
Arizona (University of Arizona)
-
UBC (University of British Columbia)
-
Berkeley (University of California, Berkeley)
-
UCLA (University of California, Los Angeles)
-
Cambridge (University of Cambridge)
-
Chicago (The University of Chicago)
-
ChicagoBright (The University of Chicago)
-
Colorado (University of Colorado Boulder)
-
UConn (University of Connecticut)
-
Idaho (University of Idaho)
-
Illinois (University of Illinois)
-
Iowa (University of Iowa)
-
Kansas (University of Kansas)
-
Kentucky (University of Kentucky)
-
Oxford (University of Oxford)
-
Maryland (University of Maryland)
-
UMass (University of Massachusetts Amherst)
-
UMassBright (University of Massachusetts Amherst)
-
Michigan (University of Michigan)
-
Minnesota (University of Minnesota)
-
Nebraska (University of Nebraska)
-
UNC (University of North Carolina Chapel Hill)
-
UNCBright (University of North Carolina Chapel Hill)
-
Oregon (University of Oregon)
-
Penn (University of Pennsylvania)
-
Pitt (University of Pittsburgh)
-
USC (University of Southern California)
-
Texas (University of Texas)
-
Toronto (University of Toronto)
-
Utah (University of Utah)
-
UVA (University of Virginia)
-
Washington (University of Washington)
-
Wisconsin (University of Wisconsin)
-
Vanderbilt (Vanderbilt University)
-
Wellesley (Wellesley College)
-
WVU (West Virginia University)
-
Yale (Yale University)
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):
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file rahrah-0.6.1.tar.gz
.
File metadata
- Download URL: rahrah-0.6.1.tar.gz
- Upload date:
- Size: 19.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.9.12
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 |
771d4fb46427dfde5eed93cd438a2d74dbea27acd39cb9ddd0e21a1b4956fa38
|
|
MD5 |
bc8fb8024a9cac2781b6271527318549
|
|
BLAKE2b-256 |
844eb875303c463e8a5fd428b865c8f99e153236b236db91ffcccf05b69cb6a0
|
File details
Details for the file rahrah-0.6.1-py3-none-any.whl
.
File metadata
- Download URL: rahrah-0.6.1-py3-none-any.whl
- Upload date:
- Size: 14.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.9.12
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 |
28ec3ee017a43ac480301fc82b230f9d6ea404664efb2f18988a38eff9f07f51
|
|
MD5 |
5ca8e8a431188818f8858a010e049048
|
|
BLAKE2b-256 |
1a1b78a1dc91d939774080099a9b299c9010187c2074fa374cab1d423b2dbf46
|