Matplotlib † Pythonによるグラフ作成と数値解析ライブラリ。 どうやらMatlabっぽいものを作ろうとしている模様。 (Matlabを使ったこと無いので分かりませんが) ↑ 設定 † ${HOME}/.matplotlib/matplotlibrcが設定ファイル。(古いバージョンでは${HOME}/.matplotlibrcだったので注意) とりあえず最初に設定するのは backend 描画に使うライブラリの指定。TkAgg?とか。 numerix Numeric, numarray, numpyのどれかを指定する。 ↑ plot † とりあえず色々プロットしてみることに。 >>> x = arange(0.0, 5.0, 0.1) # x, yそれぞれの >>> y = exp(-x**2) # 配列を作る >>> plot(x, y) とするとこんなグラ
pickleモジュールを使うと、Pythonのデータ構造(タプルとかリストとかクラスのインスタンスとか)を保存できます。 pickle化がPythonのオブジェクトをバイト列に変換すること、非pickle化はその逆を指します。 Pickle化 dumpを使います。 dump(オブジェクト, ファイルオブジェクト) 第二引数はopen(ファイル名)といった感じで開いたファイルオブジェクトを渡してください。 なお、dumpsを使うと、ファイルに書き込まずに文字列が返されます。 非Pickle化 loadを使います。 load(ファイルオブジェクト) こちらも、開かれたファイルオブジェクトを渡すようにします。 なお、dumpsで作った文字列を読み込むにはloadsを使います。 例 クラスのインスタンスを保存して、読みだしています。 ここではクラスインスタンスをpickle化してますが、他のデータ
matplotlibの線の色、線種、線幅の指定方法を記しておく。 線の色はplot上で、青なら"b"、緑なら"g"のように指定する。ここでは、白い線を見せるために背景を灰色にしている。 以下、図の作成に使ったソースコード。 from pylab import * axes(axisbg="#777777") # 背景を灰色に. x = arange(-20, 20, 0.3) plot(x+1, x, "b") # 青. plot(x+2, x, "g") # 緑. plot(x+3, x, "r") # 赤. plot(x+4, x, "c") # シアン. plot(x+5, x, "m") # マゼンタ. plot(x+6, x, "y") # 黄. plot(x+7, x, "k") # 黒. plot(x+8, x, "w") # 白. plot(x+9, x, color="#
General Concepts¶ matplotlib has an extensive codebase that can be daunting to many new users. However, most of matplotlib can be understood with a fairly simple conceptual framework and knowledge of a few important points. Plotting requires action on a range of levels, from the most general (e.g., ‘contour this 2-D array’) to the most specific (e.g., ‘color this screen pixel red’). The purpose of
Overview This page aims to provide basic information on various services available to those who use mtheory for their primary email and web serving needs. Hopefully this page will make you aware of everything that is available to you, so you can get more from the web with a view to making life easier. It should provide a handy reference for address and details that you may have otherwise forgot as
matplotlib matplotlib-0.91.1-py2.5-macosx10.4-2007-12-04.dmg (MD5: f7d4a1727192a155f54f33a7237cb852) numarray numarray-1.5.2-py2.5-macosx10.4-2007-01-30.dmg (MD5: 0ff4194a398f21b55286ba7f648d5f7b) Numeric Numeric-24.2-py2.5-macosx10.4.dmg (MD5: ee3f8efd086fbf6b46ce5e85be747dab) numpy numpy-1.0.4-py2.5-macosx10.4-2007-11-07.dmg (MD5: f35f679b7b64ef984e3a4eeb56a26657) PIL PIL-1.1.6-py2.5-macosx10.4-
Matplotlib: Visualization with Python Matplotlib is a comprehensive library for creating static, animated, and interactive visualizations in Python. Matplotlib makes easy things easy and hard things possible. Create publication quality plots. Make interactive figures that can zoom, pan, update. Customize visual style and layout. Export to many file formats. Embed in JupyterLab and Graphical User I
http://matplotlib.sourceforge.net/ よく使う機能のみピックアップ。 グラフ(plot) from pylab import * x = arange(-10, 10, 0.1) y = sin(x) plot(x,y, '--') show() 棒グラフ(bar) from pylab import * datas = {"Tim":7, "Jack":10, "Matthew":4} width = 1 bar(arange(3), datas.values(), width) xticks(0.5+arange(3), datas.keys()) show() 散布図(scatter) from pylab import * N = 20 x = rand(N) y = rand(N) scatter(x, y, marker="+") show()
リリース、障害情報などのサービスのお知らせ
最新の人気エントリーの配信
処理を実行中です
j次のブックマーク
k前のブックマーク
lあとで読む
eコメント一覧を開く
oページを開く