Movatterモバイル変換


[0]ホーム

URL:


You are reading an old version of the documentation (v2.0.0). For the latest version seehttps://matplotlib.org/stable/
matplotlib

Navigation


Travis-CI:

Related Topics

This Page

Quick search

shapes_and_collections example code: scatter_demo.py

(Source code,png,pdf)

../../_images/scatter_demo.png
"""Simple demo of a scatter plot."""importnumpyasnpimportmatplotlib.pyplotaspltN=50x=np.random.rand(N)y=np.random.rand(N)colors=np.random.rand(N)area=np.pi*(15*np.random.rand(N))**2# 0 to 15 point radiiplt.scatter(x,y,s=area,c=colors,alpha=0.5)plt.show()

Keywords: python, matplotlib, pylab, example, codex (seeSearch examples)

© Copyright 2002 - 2012 John Hunter, Darren Dale, Eric Firing, Michael Droettboom and the Matplotlib development team; 2012 - 2016 The Matplotlib development team. Last updated on Feb 20, 2017. Created usingSphinx 1.5.2.

[8]ページ先頭

©2009-2025 Movatter.jp