# Draw Gradient Color Map using python github源码地址:
欢迎关注我!pratical_skills_toolsgithub.comDraw Gradient Color Mapgithub.com
Dependenciespandas
matplotlib
numpy
seaborn
You can configure it using pip install XXX in terminal.
Results
figure1:
figure2:
Using and Explanation
1.改变颜色的种类
在程序path_Results.py文件中,修改plot_results_path函数中的:
lc = gd.colorline(x, y, z, cmap=plt.get_cmap('cool'), linewidth=linewidth_car) # 'jet' #'cool'
中的cmap=plt.get_cmap('cool')参数即可。可以设置的有: 参考 matplotlib tutorials中的colors部分
举例:
2.改变图例的标注范围
可以进行图例colorbar刻度的调整,包括平移和比例放缩:
在程序path_Results.py文件中,plot_gd_bar函数中的:
def plot_gd_bar(fig, ax, lc, max_pro,