2013-10-07 141 views

回答

3

您可以用几种不同的绘图软件包来实现这种类型的绘图。要获得matplotlib类似的东西,尝试建立标记如下:

import numpy as np 
import matplotlib.pyplot as plt 
# random data to stand in 
x1 = 0.8+0.1*np.random.rand(25) 
x2 = 0.3+0.2*np.random.rand(25) 
# customise the marker properties 
plt.plot(x1, color='g', marker='s', mec='w', mfc='g', mew='3', ms=8) 
plt.plot(x2, color='b', marker='s', mec='w', mfc='b', mew='3', ms=8) 
plt.show() 

查看您可以修改的属性plotline2D文档的更多信息。

+0

这似乎是一个很好的“黑客”,但正如http://stackoverflow.com/中指出的那样问题/ 14498702 /,如果多行重叠,或者标记彼此靠近,这种方法效果不佳。链接上还有另一个黑客解决方案 - 但是真的没有简单的方法来实现这个工作吗? – Daniel