我试图用x和y网格创建散点图,其中每个点通过预先指定的值获得颜色:{x: 1, y: 2, value: n}
我有一个x和y的列表和另一个值列表,尝试使用这个:
^{pr2}$
错误:Traceback (most recent call last):
File "C:\python3.6.6\lib\site-packages\matplotlib\colors.py", line 158, in to_rgba
rgba = _colors_full_map.cache[c, alpha]
KeyError: (1.0986122886681098, None)
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "C:\python3.6.6\lib\site-packages\matplotlib\axes\_axes.py", line 4210, in scatter
colors = mcolors.to_rgba_array(c)
File "C:\python3.6.6\lib\site-packages\matplotlib\colors.py", line 259, in to_rgba_array
result[i] = to_rgba(cc, alpha)
File "C:\python3.6.6\lib\site-packages\matplotlib\colors.py", line 160, in to_rgba
rgba = _to_rgba_no_colorcycle(c, alpha)<