Seaborn:ValueError:调色板='jet'否

2024-03-22

从seaborn运行以下示例docs https://seaborn.pydata.org/generated/seaborn.boxplot.html有论据palette='jet'

import seaborn as sns
tips = sns.load_dataset("tips")
ax = sns.boxplot(x="day", y="total_bill", hue="smoker", data=tips, palette='jet')

出现以下错误

    172         elif palette.lower() == "jet":
    173             # Paternalism
--> 174             raise ValueError("No.")
    175 
    176         elif palette.startswith("ch:"):

ValueError: No.

出现此错误的原因是什么jet调色板?我想知道错误信息是否可以更具体,原因是matplotlibdocs https://matplotlib.org/2.0.2/users/colormaps.html#id7陈述如下

常用的 jet 颜色图包含在这组颜色图中。我们可以看到整个颜色图中的值差异很大,这使得它不适合代表观看者感知的数据。


Seaborn does not contain jet color palette. Better to go with Matplotlib or use custom color palette. The available color schemes are enter image description here

本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)

Seaborn:ValueError:调色板='jet'否 的相关文章

随机推荐