matplotlib是python中强大的画图模块。
首先确保已经安装python,然后用pip来安装matplotlib模块。
进入到cmd窗口下,执行python -m pip install -U pip setuptools进行升级。
接着键入python -m pip install matplotlib进行自动的安装,系统会自动下载安装包。
安装完成后,可以用python -m pip list查看本机的安装的所有模块,确保matplotlib已经安装成功。
进入到python idle中,运行import matplotlib,如下图所示,如果没有报错提示,那就可以开始使用了。
如何在Windows下开发Python:在cmd下运行Python脚本+如何使用Python Shell(command line模式和GUI模式)+如何使用Python IDE
http://www.crifan.com/how_to_do_python_development_under_windows_environment/
定制marker
Matplotlib custom marker/symbol
2017/3/16
数据:用户0和用户1的位置坐标,冒号后的数字为DBScan聚类之后的簇编号,0表示噪声点
0 [3359,-10866]:1 [3363,-10861]:1 [3361,-10862]:1 [3362,-10861]:1 [3363,-10860]:1 [3362,-10862]:1 [3363,-10861]:1 [3363,-10861]:1 [3364,-10860]:1 [3363,-10861]:1 [4515,-8198]:0 [4526,-8220]:2 [4526,-8221]:2 [4524,-8221]:2 [4525,-8222]:2 [4525,-8221]:2 [4526,-8221]:2 [4526,-8222]:2 [4526,-8222]:2 [4526,-8223]:2 [4526,-8223]:2 [4526,-8222]:2 [4525,-8220]:2 [4528,-8220]:2 [4523,-8223]:2 [4523,-8223]:2 [4523,-8223]:2 [4522,-8221]:2 [4529,-8218]:2 [4531,-8219]:2 [4525,-8222]:2 [4525,-8221]:2 [4526,-8220]:2 [4527,-8220]:2 [4527,-8220]:2 [4527,-8219]:2 [4515,-8198]:0 [3363,-10861]:1 [3359,-10866]:1 [3360,-10864]:1 [3363,-10861]:1 [3363,-10861]:1 [3360,-10861]:1 [3378,-10875]:0 [3361,-10862]:1 [3363,-10861]:1 [3362,-10860]:1 [3359,-10866]:1 [3359,-10866]:1 [3363,-10861]:1 [3361,-10862]:1 [3360,-10860]:1 [3368,-10857]:3 [3363,-10861]:1 [3363,-10861]:1 [3362,-10860]:1 [3363,-10861]:1 [3363,-10861]:1 [3360,-10861]:1 [3363,-10860]:1 [3363,-10861]:1 [4338,-10513]:4 [4332,-10510]:5 [4337,-10510]:4 [4339,-10510]:4 [4326,-10514]:0 [4339,-10511]:4 [4339,-10511]:4 [4338,-10510]:4 [4196,-10775]:0 [3798,-10796]:0 [3363,-10861]:1 [3363,-10861]:1 [3363,-10861]:1 [3362,-10863]:1 [3359,-10861]:1 [3360,-10861]:1 [3362,-10860]:1 [3363,-10860]:1 [3367,-10860]:1 [3360,-10861]:1 [3363,-10861]:1 [3363,-10861]:1 [3362,-10860]:1 [3361,-10860]:1 [3360,-10861]:1 [3362,-10863]:1 [3367,-10860]:1 [3367,-10860]:1 [3367,-10860]:1 [3360,-10860]:1 [3362,-10860]:1 [3362,-10860]:1 [3360,-10861]:1 [3363,-10861]:1 [3362,-10863]:1 [3363,-10861]:1 [3363,-10861]:1 [3363,-10861]:1 [3360,-10861]:1 [3355,-10851]:6 [4179,-13598]:7 [4195,-13602]:8 [4195,-13603]:8 [4198,-13601]:8 [4157,-13579]:0 [4157,-13572]:0 [4198,-13600]:8 [3363,-10861]:1 [3361,-10861]:1 [3360,-10861]:1 [3363,-10861]:1 [3362,-10859]:1 [3363,-10861]:1 [3363,-10861]:1 [3363,-10861]:1 [3363,-10861]:1 [3362,-10860]:1 [3361,-10861]:1 [3362,-10860]:1 [3363,-10860]:1 [3363,-10861]:1 [3363,-10861]:1 [3361,-10861]:1 [3363,-10861]:1 [3361,-10861]:1 [3361,-10860]:1 [3363,-10861]:1 [3361,-10861]:1 [3362,-10860]:1 [3363,-10861]:1 [3355,-10851]:6 [4427,-11630]:9 [4418,-11656]:0 [4427,-11630]:9 [4427,-11630]:9 [4354,-11869]:10 [4354,-11868]:10 [4355,-11869]:10 [4355,-11870]:10 [4354,-11870]:10 [4357,-11873]:0 [4427,-11630]:9 [3355,-10851]:6 [3361,-10862]:1 [3361,-10862]:1 [3370,-10859]:3 [3361,-10862]:1 [3362,-10863]:1 [3363,-10861]:1 [3363,-10861]:1 [3363,-10861]:1 [3363,-10860]:1 [3361,-10861]:1 [3362,-10858]:1 [3363,-10861]:1 [3368,-10857]:3 [3364,-10860]:1 [3363,-10860]:1 [3362,-10861]:1 [3361,-10863]:1 [3360,-10861]:1 [3364,-10858]:1 [3363,-10860]:1 [3362,-10860]:1 [3363,-10861]:1 [3362,-10863]:1 [3361,-10861]:1 [3362,-10859]:1 [3362,-10862]:1 [3355,-10851]:6 [4170,-13591]:0 [4179,-13598]:7 [3361,-10861]:1 [3362,-10860]:1 [3363,-10861]:1 [3363,-10861]:1 [3361,-10862]:1 [3362,-10858]:1 [3363,-10861]:1 [3360,-10860]:1 [3363,-10861]:1 [3361,-10861]:1 [3360,-10860]:1 [4339,-10511]:4 [4333,-10510]:5 [4337,-10509]:4 [4198,-13600]:8 [4198,-13600]:8 [4197,-13599]:8 [4198,-13600]:8 [4198,-13599]:8 [4198,-13600]:8 [4195,-13602]:8 [4198,-13600]:8 [4198,-13600]:8 [4198,-13600]:8 [4198,-13600]:8 [4198,-13600]:8 [4197,-13600]:8 [4198,-13600]:8 [4198,-13600]:8 [4179,-13598]:7 [3655,-10782]:0 [3362,-10862]:1 [3362,-10863]:1 [3364,-10862]:1 [3363,-10861]:1 [3361,-10861]:1 [3362,-10860]:1 [3357,-10863]:1 [3363,-10861]:1 [3361,-10861]:1 [3362,-10860]:1 [3360,-10861]:1 [4199,-13599]:8 [3363,-10861]:1 [3363,-10861]:1 [4333,-10508]:5 [4333,-10508]:5 [4343,-10510]:0 [4343,-10510]:0 [4331,-10511]:5 [4366,-10524]:0 [3360,-10861]:1
1 [5429,259]:0 [5022,-82]:0 [4969,559]:0 [4990,642]:0 [5073,714]:0 [5105,748]:0 [5125,724]:0 [5144,637]:0 [5379,335]:0 [5512,422]:0 [5597,381]:0 [5587,657]:0
原文:https://www.cnblogs.com/-1307/p/6529269.html