Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork7.9k
Open
Description
Bug summary
Backgroundcolor of text is set in a too wide range when setting it for the first time.
Problem: Border of first color remains when backgroundcolor is set again.
Code for reproduction
''' Backgroundcolor of text is set in a too wide range when setting it for the first time. Problem: Border of first color remains when backgroundcolor is set again.'''# windows 11# Python version 3.13.2# Matplotlib version 3.10.1importmatplotlib.pyplotaspltfig,ax=plt.subplots(1,1)fig.set_dpi(100)txt=ax.text(0.1,0.8,'There should not be a red border around this text !')##txt.set(backgroundcolor='none') # Uncomment this line as workaround to avoid red bordertxt.set(backgroundcolor='red')# Set backgroundcolor for the first timetxt.set(backgroundcolor='none')# Cannot reset backgroundcolor of text completely, red border remainsplt.show()
Actual outcome
Text with red border, see picture above.
Expected outcome
Text without red border.
Additional information
There is a workaround for the first, but not a fix, see Python program above.
Operating system
Windows
Matplotlib Version
3.10.1
Matplotlib Backend
tkagg
Python version
3.13.2
Jupyter version
Installation
pip
Metadata
Metadata
Assignees
Labels
No labels