Skip to content

Commit

Permalink
Add more colormaps
Browse files Browse the repository at this point in the history
  • Loading branch information
Andrew-S-Rosen authored Feb 14, 2022
1 parent a784182 commit 0dd4171
Showing 1 changed file with 18 additions and 2 deletions.
20 changes: 18 additions & 2 deletions ptable_trends.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,15 @@
from bokeh.transform import dodge
from csv import reader
from matplotlib.colors import Normalize, LogNorm, to_hex
from matplotlib.cm import plasma, inferno, magma, viridis, ScalarMappable
from matplotlib.cm import (
plasma,
inferno,
magma,
viridis,
cividis,
turbo,
ScalarMappable,
)
from pandas import options
from typing import List
import warnings
Expand Down Expand Up @@ -54,7 +62,7 @@ def ptable_plotter(
width : float
Width of the plot.
cmap : str
plasma, infnerno, viridis, or magma
plasma, inferno, viridis, magma, cividis, turbo
alpha : float
Alpha value (transparency).
extended : bool
Expand Down Expand Up @@ -107,6 +115,14 @@ def ptable_plotter(
elif cmap == "viridis":
cmap = viridis
bokeh_palette = "Viridis256"
elif cmap == "cividis":
cmap = cividis
bokeh_palette = "Cividis256"
elif cmap == "turbo":
cmap = turbo
bokeh_palette = "Turbo256"
else:
ValueError("Invalid color map.")

# Define number of and groups
period_label = ["1", "2", "3", "4", "5", "6", "7"]
Expand Down

0 comments on commit 0dd4171

Please sign in to comment.