【发布时间】:2011-12-27 11:22:09
【问题描述】:
我正在学习使用 matplotlib 绘制散点图。但是,有一个错误,它似乎与颜色参数有关。谁能解释我的错误?我用谷歌搜索但没有找到答案。提前致谢。
xActA = range(10)
yActA = np.random.randn(10)
xActQ = range(10)
yActQ = np.random.randn(10)
xRa = np.random.randn(10)
yRa = np.random.randn(10)
f1 = figure(1)
scatter(xActA, yActA, c ='b', marker = 'o', facecolors = True, label = 'Answers')
scatter(xActQ, yActQ, c ='r', marker = 'o', facecolors = True, label = 'Questions')
xscale('log')
yscale('log')
title('User activity')
xlabel('Number of posts')
ylabel('Number of users')
legend()
f1.show()
f1.savefig('figure7_test.png')
【问题讨论】:
标签: python matplotlib