本文介绍了我可以在matplotlib绘图函数中为线赋予边框(轮廓)吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我尝试:
points = [...]
axe.plot([i[0] for i in points], [i[1] for i in points], linestyle='-', linewidth=10,
color='black', markeredgewidth=2, markeredgecolor='green')
但是我只是得到一个黑色的轮廓.如何实现下图所示的效果?
But I just get a black contour. How can I achieve something like on the following picture?
推荐答案
只需绘制两次具有不同粗细的线:
Just plot the line twice with different thicknesses:
axe.plot([i[0] for i in points], [i[1] for i in points], linestyle='-', linewidth=10,
color='green')
axe.plot([i[0] for i in points], [i[1] for i in points], linestyle='-', linewidth=5,
color='black')
这篇关于我可以在matplotlib绘图函数中为线赋予边框(轮廓)吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!