Skip to content

Commit

Permalink
Make cmap_name the colormap for scale_color_cmap_d
Browse files Browse the repository at this point in the history
  • Loading branch information
adunmore authored and has2k1 committed Jul 21, 2023
1 parent 2405442 commit edd17db
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions plotnine/scales/scale_color.py
Original file line number Diff line number Diff line change
Expand Up @@ -499,7 +499,7 @@ class scale_color_cmap_d(scale_discrete):
Parameters
----------
name : str
cmap_name : str
A standard Matplotlib colormap name. It must be of type
:class:`matplotlib.colors.ListedColormap`.
. The default is `viridis`. For the list of names checkout
Expand All @@ -522,10 +522,10 @@ class scale_color_cmap_d(scale_discrete):
_aesthetics = ["color"]
na_value = "#7F7F7F"

def __init__(self, name="viridis", lut=None, **kwargs):
def __init__(self, cmap_name="viridis", lut=None, **kwargs):
from mizani.palettes import cmap_d_pal

self.palette = cmap_d_pal(name, lut)
self.palette = cmap_d_pal(cmap_name, lut)
super().__init__(**kwargs)


Expand Down

0 comments on commit edd17db

Please sign in to comment.