iTechGuides is reader-supported. When you buy through links on our site, we may earn an affiliate commission. As an Amazon Associate I earn from qualifying purchases. Learn more
To place text in the bottom-right corner of a single Matplotlib plot, call ax.text() with transform=ax.transAxes, then set ha="right" and va="bottom". The text stays in the same corner when the data or axis limits change. If you mean the whole figure rather than one plot, use fig.text() with figure-fraction coordinates instead.
The Axes-level method for a plot’s lower-right corner
Text added with ax.text() uses data coordinates by default. That means the x and y values you pass are interpreted in the units of your data, so a value of (0.95, 0.01) would land somewhere unrelated to the corner of the plot if your data ranges from 0 to 1,000. To anchor the label to the plot itself, pass transform=ax.transAxes. This switches the coordinates to normalized Axes units, where (0, 0) is the lower-left corner of the Axes and (1, 1) is the upper-right corner.
import matplotlib.pyplot as plt
fig, ax = plt.subplots(layout="constrained")
ax.plot([0, 1, 2, 3], [10, 40, 25, 80])
ax.text(
0.95, 0.01, "Your text",
transform=ax.transAxes,
ha="right",
va="bottom",
)
plt.show()
The values 0.95 and 0.01 place the text slightly inside the Axes boundary, which keeps it from touching the frame. Adjust them to suit your layout. The same pattern appears in the official Text properties gallery example, and the broader coordinate and text model is described in the Text in Matplotlib guide.
What ha and va control
ha="right"(horizontal alignment) makes the right edge of the text sit at the x coordinate you supplied.va="bottom"(vertical alignment) makes the bottom edge of the text sit at the y coordinate you supplied.
Without these settings, the default alignment places the text’s left and baseline at the coordinate, so a long label would spill past the right edge of the plot.
#1 Best Overall
- CRISP CLARITY: This 23.8″ Philips V line monitor delivers crisp Full HD 1920x1080 visuals. Enjoy movies, shows and videos with remarkable detail
- INCREDIBLE CONTRAST: The VA panel produces brighter whites and deeper blacks. You get true-to-life images and more gradients with 16.7 million colors
- THE PERFECT VIEW: The 178/178 degree extra wide viewing angle prevents the shifting of colors when viewed from an offset angle, so you always get consistent colors
- WORK SEAMLESSLY: This sleek monitor is virtually bezel-free on three sides, so the screen looks even bigger for the viewer. This minimalistic design also allows for seamless multi-monitor setups that enhance your workflow and boost productivity
- A BETTER READING EXPERIENCE: For busy office workers, EasyRead mode provides a more paper-like experience for when viewing lengthy documents
Whole-figure text in the bottom-right corner
Sometimes the label belongs to the entire canvas, such as a source note or a figure-wide caption, and not to one subplot. In that case use fig.text(). Its coordinates are figure fractions: (0, 0) is the lower-left corner of the figure and (1, 1) is the upper-right corner, as described in the Figure.text API documentation.
fig.text(
0.98, 0.02, "Source: example data",
ha="right",
va="bottom",
)
Because this text is positioned against the figure rather than an Axes, it does not move with a subplot’s limits. If you have several subplots, check that the label does not overlap the bottom-right subplot’s tick labels.
Rank #2
- CRISP CLARITY: This 22 inch class (21.5″ viewable) Philips V line monitor delivers crisp Full HD 1920x1080 visuals. Enjoy movies, shows and videos with remarkable detail
- 100HZ FAST REFRESH RATE: 100Hz brings your favorite movies and video games to life. Stream, binge, and play effortlessly
- SMOOTH ACTION WITH ADAPTIVE-SYNC: Adaptive-Sync technology ensures fluid action sequences and rapid response time. Every frame will be rendered smoothly with crystal clarity and without stutter
- INCREDIBLE CONTRAST: The VA panel produces brighter whites and deeper blacks. You get true-to-life images and more gradients with 16.7 million colors
- THE PERFECT VIEW: The 178/178 degree extra wide viewing angle prevents the shifting of colors when viewed from an offset angle, so you always get consistent colors
Choosing between the methods
| What you need | Method | Coordinate system |
|---|---|---|
| Text fixed to one plot’s lower-right corner | ax.text(..., transform=ax.transAxes) |
Normalized Axes coordinates, independent of data values (see the text guide) |
| Text fixed to the whole figure’s lower-right corner | fig.text(...) |
Figure fractions (see the Figure.text reference) |
| Text that points to a specific data value | ax.annotate(...) |
Separate coordinates for the target and the text, with an optional arrow (see the annotations guide) |
Use annotate only when the label has to point to a feature in the data. For a plain corner label, ax.text is simpler.
Crashes, No Sound, or Screen Glitches?
Random freezes, missing sound and display glitches usually trace back to one bad driver. Find and replace yours safely.Free scan · under a minuteWindows Errors? Fix Them Before They Spread
Repair common Windows errors and clear accumulated junk for a smoother, more stable PC - no reinstall needed.Free scan · no reinstallKeeping the label from being clipped
A label placed just inside the Axes usually survives the default layout. Trouble starts when you move the text outside the Axes, or when tick labels and legends crowd the corner. The constrained layout guide describes an automatic option that adjusts subplot geometry to fit decorations such as tick labels, legends, and colorbars. Enable it when you create the figure, as in fig, ax = plt.subplots(layout="constrained").
Quick Recap
Best Value
- 【INTEGRATED SPEAKERS】Whether you're at work or in the midst of an intense gaming session, our built-in speakers provide rich and seamless audio, all while keeping your desk clutter-free.
- 【EASY ON THE EYES】 Protect your eyes and enhance your comfort with Blue-Light Shift technology. This feature reduces harmful blue light emissions from your screen, helping to alleviate eye strain during long hours of use and promoting healthier viewing habits.
- 【WIDEN YOUR PERSPECTIVE】Our sleek minimal bezel design ensures undivided attention. The nearly bezel-free display seamlessly connects in a dual monitor arrangement, delivering an unobstructed view that lets you focus on more at once, completely distraction-free.
Rank #4
- CURVED FOR ENHANCED ENGAGEMENT: An immersive viewing experience with a curved monitor that wraps more closely around your field of vision; It creates a wider view, enhancing depth perception and minimizing peripheral distraction
- SMOOTH PERFORMANCE FOR SEAMLESS CONTENT: Stay in the action when playing games, watching videos, or working on creative projects; The 100Hz refresh rate reduces lag and motion blur so you don't miss a thing in fast-paced moments¹
- MORE GAMING POWER: Gain the edge with optimizable game settings; Color and image contrast can be adjusted to see scenes more vividly and spot enemies hiding in the dark; Game Mode adjusts any game to fill the screen so you can view every detail²
- KEEP IT EASY ON THE EYES: Care for your eyes and stay comfortable, even during long sessions; Advanced eye comfort technology certified by TÜV reduces eye strain by minimizing blue light and reducing irritating screen flicker²
- INCREASED VERSATILITY: Connect to more; Plug devices straight into your monitor for increased flexibility, making your computing environment even more convenient
Rank #3
- Clear visuals. Fluid motion: A 144Hz refresh rate and 1ms MPRT deliver smooth, tear‑free motion across work, gaming, and streaming for clearer, more fluid viewing.
- Eye comfort: TÜV Rheinland 3‑star* certification reduces harmful blue light while preserving stunning color quality without compromise. *TÜV Rheinland 3-star eye comfort certification.
- Wide viewing angle: Get consistent views across a wide 178° /178° viewing angle.
- In-Plane Switching (IPS): See excellent color accuracy and consistency across wide viewing angles with In-plane Switching (IPS) technology.
- Ultra-thin bezels: Maximize your viewing experience with thin bezels.
- Do not call
tight_layouton a figure that uses constrained layout. The guide notes that callingtight_layoutturns constrained layout off. - If you adjust subplot margins manually instead, the guide points to
Figure.subplots_adjust. Use either the layout engine or manual margins, not both. - Check the saved file, not only the on-screen window. Text drawn outside the Axes can behave differently depending on the artist and export settings, so confirm the corner label appears in the exported image.
Troubleshooting a label that is in the wrong place
- The text is at the wrong spot entirely: you probably left out
transform=ax.transAxes, so the coordinates are being read as data values. - The text runs past the right edge: check that
ha="right"is set. Without it, the text extends rightward from the coordinate. - The text is clipped or overlaps tick labels: enable constrained layout at figure creation, or increase the bottom and right margins.
- The label should cover the whole figure but sits inside one subplot: switch from
ax.texttofig.text.
“
Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.

