各位兄弟姐妹们,先祝大家新年快乐。万事吉祥!
如果有时间,帮我想想这个问题吧。先谢过了 :-)
我想用python的matplotlib画一个散点图。有以下条件:
1.如附件的数据文件,第一列为x,第二列为y,第三列为作图条件。当第三列的值为15时,将所在行的(x,y)画出来
2.希望为这个散点图加上一个背景,如附件所示。
我写了一个最基本的做散点图的code,如下所示。谢谢大家
#!/usr/bin/env python
from pylab import *
filename = "D:\\Program Files\\python 2.4.3\\py2exe code\\fixation_xy.txt"
X = load(filename)
fixation_x = X[:, 0]
fixation_y= X[:, 1]
loc=X[:,2]
scatter(fixation_x,fixation_y,s=1, marker='^', c='r')
savefig('fixation.png', dpi=75)
show()
--
Best Regards,
He Jibo
jibohe2@...hejibo@...
---------------------------
He Jibo
Department of Psychology,
Beckman Institute for Advanced Science and Technology
University of Illinois, Urbana Champaign,
603 East Daniel St.,
Champaign, IL 61820
Tel: 217-244-4461(office)
217-244-6763(lab)
Email:
hejibo@... --
Best Regards,
He Jibo
jibohe2@...
hejibo@...---------------------------
He Jibo
Department of Psychology,
Beckman Institute for Advanced Science and Technology
University of Illinois, Urbana Champaign,
603 East Daniel St.,
Champaign, IL 61820
Tel: 217-244-4461(office)
217-244-6763(lab)
Email:
hejibo@...
550.4 329.2 15
314.3 453 15
518.9 338.6 15
519.8 330.5 15
553.9 326.2 15
902.2 586.1 2
549.4 323.2 2
339.5 289.2 2
_______________________________________________
python-chinese
Post: send
python-chinese@...
Subscribe: send subscribe to
python-chinese-request@...
Unsubscribe: send unsubscribe to
python-chinese-request@...
Detail Info:
http://python.cn/mailman/listinfo/python-chinese