Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Draw text inside pylab figure window

I want to add some more details about the calculations used to create a plot (histogram).

How can I add some text that I can position anywhere I want in the figure window?

like image 224
Omar Avatar asked Apr 28 '11 00:04

Omar


People also ask

How do I show text in Matplotlib?

Basic text commandsAdd an annotation, with an optional arrow, at an arbitrary location of the Axes . Add a label to the Axes 's x-axis. Add a label to the Axes 's y-axis. Add a title to the Axes .

What is the difference between PyLab and Matplotlib?

PyLab is a procedural interface to the Matplotlib object-oriented plotting library. Matplotlib is the whole package; matplotlib. pyplot is a module in Matplotlib; and PyLab is a module that gets installed alongside Matplotlib. PyLab is a convenience module that bulk imports matplotlib.


1 Answers

Lots of ways to do this:

  • text
  • figtext
  • annotate
like image 106
Paul Avatar answered Sep 22 '22 00:09

Paul