我用matplotlib在图上绘制线条.现在我想为线上的各个点设置样式,特别是标记.我该怎么做呢?
编辑:澄清我的问题,已经回答,我希望能够在一条线上设置单个标记的样式,而不是在所述行上的每个标记.
def shuffle(self, x, random=None, int=int):
"""x, random=random.random -> shuffle list x in place; return None.
Optional arg random is a 0-argument function returning a random
float in [0.0, 1.0); by default, the standard random.random.
"""
randbelow = self._randbelow
for i in reversed(range(1, len(x))):
# pick an element in x[:i+1] with which to exchange x[i]
j = randbelow(i+1) if random is None else int(random() * (i+1))
x[i], x[j] = x[j], x[i]
Run Code Online (Sandbox Code Playgroud)
When I run the shuffle function it raises the following …
我知道如何在matplotlib中循环显示颜色列表.但是可以用线条样式(普通,虚线,虚线等)做类似的事情吗?我需要这样做,这样我的图表在打印时会更容易阅读.有什么建议怎么做?