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

lines_bars_and_markers example code: scatter_with_legend.py

(Source code,png,pdf)

../../_images/scatter_with_legend.png
importmatplotlib.pyplotaspltfromnumpy.randomimportrandfig,ax=plt.subplots()forcolorin['red','green','blue']:n=750x,y=rand(2,n)scale=200.0*rand(n)ax.scatter(x,y,c=color,s=scale,label=color,alpha=0.3,edgecolors='none')ax.legend()ax.grid(True)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