from matplotlib import pyplot as plt
f = plt.figure()
r = f.canvas.get_renderer()
t = plt.text(0.5, 0.5, 'test')
bb = t.get_window_extent(renderer=r)
width = bb.width
height = bb.height
More Related Contents:
- How to draw a histogram from existing bin values
- Clustered Stacked Bar in Python Pandas [closed]
- prevent scientific notation in matplotlib.pyplot [duplicate]
- Pandas: Adding new column to dataframe which is a copy of the index column
- How to remove gaps between subplots in matplotlib
- How do I set the figure title and axes labels font size in Matplotlib?
- Text box with line wrapping in matplotlib?
- How can I release memory after creating matplotlib figures
- How to set opacity of background colour of graph with Matplotlib
- How to change data points color based on some variable
- Disable the output of matplotlib pyplot
- What does a 4-element tuple argument for ‘bbox_to_anchor’ mean in matplotlib?
- determine matplotlib axis size in pixels
- Python Tkinter Embed Matplotlib in GUI
- Python: How to show matplotlib in flask [duplicate]
- How to change the color of a single bar if condition is True
- Box around text in matplotlib
- Changing marker style in scatter plot according to third variable
- Creating a Confidence Ellipses in a sccatterplot using matplotlib
- Saving Matplotlib graphs to image as full screen
- Matplotlib: draw grid lines behind other graph elements
- Get the list of figures in matplotlib
- Python matplotlib restrict to integer tick locations
- How do I draw a grid onto a plot in Python?
- Grouped Bar graph Pandas
- matplotlib contour/contourf of **concave** non-gridded data
- Plot a 3d pulse propagation
- Adding subplots to a subplot
- Get legend as a separate picture in Matplotlib
- How can I set the background color on specific areas of a figure?