我们从Python开源项目中,提取了以下1个代码示例,用于说明如何使用seaborn.xkcd_palette()。
def setupPalette(count, pal=None): # See http://xkcd.com/color/rgb/. These were chosen to be different "enough". colors = ['grass green', 'canary yellow', 'dirty pink', 'azure', 'tangerine', 'strawberry', 'yellowish green', 'gold', 'sea blue', 'lavender', 'orange brown', 'turquoise', 'royal blue', 'cranberry', 'pea green', 'vermillion', 'sandy yellow', 'greyish brown', 'magenta', 'silver', 'ivory', 'carolina blue', 'very light brown'] palette = sns.color_palette(palette=pal, n_colors=count) if pal else sns.xkcd_palette(colors) sns.set_palette(palette, n_colors=count) # For publications, call setupPlot("paper", font_scale=1.5)