Broken horizontal bars# broken_barh creates sequences of horizontal bars. This example shows a timing diagram. import matplotlib.pyplot as plt import numpy as np # data is a sequence of (start, duration) tuples cpu_1 = [(0, 3), (3.5, 1), (5, 5)] cpu_2 = np.column_stack([np.linspace(0, 9, 10), np.full(10, 0.5)]) cpu_3 = np.column_stack([10*np.random.random(61), np.full(61, 0.05)]) cpu_4 = [(2, 1.7)
Legend guide¶ This legend guide is an extension of the documentation available at legend() - please ensure you are familiar with contents of that documentation before proceeding with this guide. This guide makes use of some common terms, which are documented here for clarity: legend entry A legend is made up of one or more legend entries. An entry is made up of exactly one key and one label. legen
Warning uv usually installs its own versions of Python from the python-build-standalone project, and only recent versions of those Python builds (August 2025) work properly with the tkagg backend for displaying plots in a window. Please make sure you are using uv 0.8.7 or newer (update with e.g. uv self update) and that your bundled Python installs are up to date (with uv python upgrade --reinstal
1つのソースの時系列データをグラフ化で特に悩むことはありません。が、ソースの異なる時系列データを表示する方法が分からなかったのでやってみました。結論からいうと得たい結果は得られましたが、いまいちです。 結果は不本意なので、もっとスマートな方法があれば教えて下さい。 やりたいことと課題 例としては、 Webアクセスデータはアクセス毎に秒単位で存在(2016-06-2 00:00:00から2016-06-7 00:00:00取得) 同時期のCPUのデータ。1時間に1回、遅れて取得(2016-06-03 12:00:00から2016-06-09 17:00:00取得) みたいな感じです。 各データを表示することは簡単ですが、取得期間も単位(件数、%等)も異なる場合は厄介です。 そもそもDBやCSVからデータを取得する方法はこちらをご覧ください。 Matplotlibの基本 細かな話の前に、そもそ
👋 The Python Graph Gallery is a collection of hundreds of charts made with Python. Graphs are dispatched in about 40 sections following the data-to-viz classification. There are also sections dedicated to more general topics like matplotlib or seaborn. Each example is accompanied by its corresponding reproducible code along with comprehensive explanations. The gallery offers tutorials that cater
Note Significant effort went into bringing axes3d to feature-parity with regular axes objects for version 1.1.0. However, more work remains. Please report any functions that do not behave as expected as a bug. In addition, help and patches would be greatly appreciated! Module containing Axes3D, an object which can plot 3D objects on a 2D matplotlib figure. class mpl_toolkits.mplot3d.axes3d.Axes3D(
Interpolations for imshow# This example displays the difference between interpolation methods for imshow. If interpolation is None, it defaults to the rcParams["image.interpolation"] (default: 'antialiased'). If the interpolation is 'none', then no interpolation is performed for the Agg, ps and pdf backends. Other backends will default to 'antialiased'. For the Agg, ps and pdf backends, interpolat
※こちらの記事は、プロスタ編集部が現在大変人気の高いPythonの文法記事を公開することで、皆様の学習にお役に立ちたい意図で投稿しております。 参考サイト:【Python入門】ライブラリmatplotlibの基本的な使い方 【Python入門】ライブラリmatplotlibの基本的な使い方 Pythonではnumpyやscipyといったライブラリを使うことで科学計算を簡単に行うことができますが、そういった計算結果をグラフなどで図表できると分かりやすいですよね。そんな時に便利なのがmatplotlibというライブラリです。matplotlibを使えばPythonでデータをグラフにプロットできるようになります。numpy、scipyと組み合わせることで、Pythonだけでデータの読み込み・加工・計算、そしてプロットが行えます。 今回はmatplotlibの基本的な使い方について説明します。 m
Plotting data on a map (Example Gallery)¶ Following are a series of examples that illustrate how to use Basemap instance methods to plot your data on a map. More examples are included in the examples directory of the basemap source distribution. There are a number of Basemap instance methods for plotting data: contour(): draw contour lines. contourf(): draw filled contours. imshow(): draw an image
""" Demonstrates using custom hillshading in a 3D surface plot. """ from mpl_toolkits.mplot3d import Axes3D from matplotlib import cbook from matplotlib import cm from matplotlib.colors import LightSource import matplotlib.pyplot as plt import numpy as np filename = cbook.get_sample_data('jacksboro_fault_dem.npz', asfileobj=False) with np.load(filename) as dem: z = dem['elevation'] nrows, ncols =
昨日 の続きです。 Arduino から送信されたデータを Matplotlib で表示するだけでは実用性に欠けるので、GUI アプリに拡張してみようと思います。 GUI ライブラリは個人で使うつもりなので PyQt5 を選びました。 現状は単純に Matplotlib を PyQt5 から使用するところまで。 次は計測のスタート、ストップボタンを付けてみます。 import sys import signal import serial import numpy as np from PyQt5.QtCore import QTimer from PyQt5.QtWidgets import QApplication import matplotlib as mpl mpl.use("Qt5Agg") from matplotlib.backends.backend_qt5agg imp
You are reading an old version of the documentation (v2.0.2). For the latest version see https://matplotlib.org/stable/ """ =================== Rankine power cycle =================== Demonstrate the Sankey class with a practical example of a Rankine power cycle. """ import matplotlib.pyplot as plt from matplotlib.sankey import Sankey fig = plt.figure(figsize=(8, 9)) ax = fig.add_subplot(1, 1, 1,
はじめに TensorFlowの利用はDockerを使うと簡単です。 TensorFlowのDocker公式イメージにはmatplotlibがインストールされているのですが、そのままではpyplot.show()などが使えません。 要するにデフォルトではGUIが表示できません。 そこで今回はTensorFlow + Docker + matplotlibでGUIを利用可能にします。 また、今回はホストOSがwindowsであるという前提で進めます。 なお、今回の内容はGitHubで公開しているスライドの内容に基づいています。 Dockerのインストール Dockerのインストールについてはここを参照してください。 MobaXtermのインストール MobaXtermはWindowsで動作するターミナルです。 このMobaXtermはX11フォワーディング機能を標準機能として備えています。
リリース、障害情報などのサービスのお知らせ
最新の人気エントリーの配信
処理を実行中です
j次のブックマーク
k前のブックマーク
lあとで読む
eコメント一覧を開く
oページを開く