Matplotlib-working-with-text
提供:Dev Guides
Matplotlib-テキストの操作
Matplotlibは、数式のサポート、ラスターおよびベクター出力の TrueType サポート、任意の回転を伴う改行区切りテキスト、およびUnicodeサポートを含む、広範なテキストサポートを備えています。 Matplotlibには、クロスプラットフォーム、W3C準拠のフォント検索アルゴリズムを実装する独自のmatplotlib.font_managerが含まれています。
ユーザーは、テキストのプロパティ(フォントサイズ、フォントの太さ、テキストの場所と色など)を大幅に制御できます。 Matplotlibは、多数のTeX数学記号とコマンドを実装しています。
コマンドの次のリストは、Pyplotインターフェイスでテキストを作成するために使用されます-
text | Add text at an arbitrary location of the Axes. |
annotate | Add an annotation, with an optional arrow, at an arbitrary location of theAxes. |
xlabel | Add a label to the Axes’s x-axis. |
ylabel | Add a label to the Axes’s y-axis. |
title | Add a title to the Axes. |
figtext | Add text at an arbitrary location of the Figure. |
suptitle | Add a title to the Figure. |
これらの関数はすべて、* matplotlib.text.Text()*インスタンスを作成して返します。
次のスクリプトは、上記の機能のいくつかの使用を示しています-
上記のコード行は、次の出力を生成します-