ggzhang0071 / graphPartitioning

0 stars 0 forks source link

matplotlib clormap 自定义颜色 画图 #3

Open ggzhang0071 opened 4 years ago

ggzhang0071 commented 4 years ago

https://www.osgeo.cn/matplotlib/tutorials/colors/colorbar_only.html

https://colorbrewer2.org/ 配色

ggzhang0071 commented 4 years ago

首先ListColorMap,代码如下:

from matplotlib.colors as ListedColorMap
cmap=ListedColorMap(['red','green','white','black']) # 所需要的颜色list,也可是rgb 染色
cmap=ListedColorMap([(0,0,0,1)])  就可以了

从#4 中获取好看的颜色,填入到 ListedColorMap 就可以了

https://zhuanlan.zhihu.com/p/197854613?utm_source=wechat_session&utm_medium=social&utm_oi=812984498814881792

ggzhang0071 commented 4 years ago

https://blog.csdn.net/sinat_32570141/article/details/105226330