About 2,410,000 results
Open links in new tab
  1. python - automatically position text box in plot - Stack Overflow

    The question is quite old but as there is no general solution to the problem till now (2019) according to Add loc=best kwarg to pyplot.text (), I'm using legend() and the following workaround to obtain auto-placement for simple text boxes: import numpy as np import matplotlib.pyplot as plt import matplotlib.patches as mpl_patches x = np ...

  2. matplotlib.pyplot.textMatplotlib 3.10.1 documentation

    matplotlib.pyplot.text # matplotlib.pyplot.text(x, y, s, fontdict=None, **kwargs) [source] # Add text to the Axes. Add the text s to the Axes at location x, y in data coordinates, with a default horizontalalignment on the left and verticalalignment at the baseline. See Text alignment. Parameters: x, yfloat The position to place the text.

  3. python - Putting text in top left corner of matplotlib plot - Stack ...

    How can I put text in the top left (or top right) corner of a matplotlib figure, e.g. where a top left legend would be, or on top of the plot but in the top left corner? E.g. if it's a plt.scatter(), then something that would be within the square of the scatter, put in the top left most corner.

  4. Placing text boxes — Matplotlib 3.10.1 documentation

    When decorating Axes with text boxes, two useful tricks are to place the text in axes coordinates (see Transformations Tutorial), so the text doesn't move around with changes in x or y limits.

  5. Add Text Inside the Plot in Matplotlib - GeeksforGeeks

    Jan 11, 2024 · In this article, we are going to see how to add text inside the plot in Matplotlib. The matplotlib.pyplot.text () function is used to add text inside the plot. The syntax adds text at an arbitrary location of the axes. It also supports mathematical expressions. Python matplotlib.pyplot.text () Syntax

  6. python - Position matplotlib text top right - Stack Overflow

    Dec 23, 2016 · I want to place two lines of text: PP=0.87 and SC=0.76. Now whenever I'm entering some text in the code it is placed in the bottom left corner of the curve ins...

  7. Automatically Positioning Text Box in Python 3 Plot - DNMTechs ...

    Jun 26, 2024 · In this article, we will explore how to automatically position text boxes in Python 3 plots using Matplotlib. Matplotlib provides the annotate function, which allows us to add text boxes to a plot.

  8. Automatically Position Text Box in Matplotlib

    Jul 18, 2024 · In this article, we will explore various methods to automatically position text boxes in Matplotlib plots, ensuring that the text is both readable and aesthetically pleasing.

  9. Positioning Text in Top Left Corner of Matplotlib Plot in Python 3

    In this example, we have demonstrated how to position text in the top left corner of a Matplotlib plot in Python 3. By specifying the appropriate coordinates and text properties, we can easily customize the position and appearance of the text within the plot.

  10. python - setting a fixed position for matplotlib text - Stack Overflow

    May 14, 2016 · Using a loop, I want to show specific information for 32 attributes: Histogram on the left and statistics on the right. Dealing with just one attribute it's really simple, I set x,y for the text position and that's it:

  11. Some results have been removed
Refresh