matplotlib - 如何用 triplot 指定边缘颜色
问题描述
在以下使用 matplotlib.triplot 的示例中,我如何指定边缘颜色以具有颜色,例如 0xFFAC67?
import matplotlib.pyplot as plt
import matplotlib.tri as tri
import numpy as np
xy = np.asarray([ [0.2, 0.1], [0.9, -0.1], [1.2, 1.29] ])
x = np.degrees(xy[:, 0])
y = np.degrees(xy[:, 1])
triangles = np.asarray([ [0, 1, 2] ])
mesh = tri.Triangulation( x, y, triangles )
plt.figure()
plt.gca().set_aspect('equal')
plt.triplot( mesh, 'g-', lw=1.0 )
plt.show()
解决方案
推荐阅读
- jquery - 输入值不更新
- python - 在 Python 中使用类属性通过装饰器修改文档字符串
- javascript - IF 语句并返回到函数的开头
- arrays - Angular http.get() JSON 到自己的类
- terraform - 在 Terraform 外部数据源脚本中获取阶段
- javascript - Android 需要帮助 Edittext 和语法检查器的自动单词建议
- angular - 2 自定义验证器在 Angular 中不能以反应形式工作
- wpf - 带有复选框 WPF 的 TreeView
- angular - 角度通用的服务器端渲染不显示收藏图标
- javascript - 不确定表达式 URL 链接有什么问题