【发布时间】:2025-12-26 12:00:16
【问题描述】:
这是一个简化的情节:
我希望能够为一组不同的标记设置一个标签,而不是让每个数据点标记都有一个单独的标签。我希望能够拥有这样的传奇:
<triangle> <square> <hexagon> <diamond> <circle> Shotcrete strength data points
<green line> 10 minute strength
<blue line> 60 minute strength
<yellow line> 1 day strength
<orange line> 7 day strength
<red line> 28 day strength
我想这样做是因为在最后的绘图中,我将拥有三组数据点,并且显示 18 个(3 组 * 6 点/组)标记/标签组合会很混乱。
我在 Python 2.7 中使用 Matplotlib。
【问题讨论】:
-
对于使用 Python 和 matplotlib v 3.0 及更高版本遇到类似问题的人,我发布到 this question 的答案可能会有所帮助。
标签: python matplotlib