Title: [Bug]: Bug / Inconsistency: Title Format Lost After Interactive Editing · Issue #30770 · matplotlib/matplotlib · GitHub
Open Graph Title: [Bug]: Bug / Inconsistency: Title Format Lost After Interactive Editing · Issue #30770 · matplotlib/matplotlib
X Title: [Bug]: Bug / Inconsistency: Title Format Lost After Interactive Editing · Issue #30770 · matplotlib/matplotlib
Description: Bug summary When a figure is plotted with a bold/dark title or legend, e.g.: Plot The title appears correctly (bold, dark). But when the user edits any label/title from the interactive Matplotlib plotting window, such as: Editing xlabel ...
Open Graph Description: Bug summary When a figure is plotted with a bold/dark title or legend, e.g.: Plot The title appears correctly (bold, dark). But when the user edits any label/title from the interactive Matplotlib p...
X Description: Bug summary When a figure is plotted with a bold/dark title or legend, e.g.: Plot The title appears correctly (bold, dark). But when the user edits any label/title from the interactive Matplotlib p...
Opengraph URL: https://github.com/matplotlib/matplotlib/issues/30770
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"[Bug]: Bug / Inconsistency: Title Format Lost After Interactive Editing","articleBody":"### Bug summary\n\nWhen a figure is plotted with a bold/dark title or legend, e.g.:\n\n\u003cimg width=\"900\" height=\"700\" alt=\"Image\" src=\"https://github.com/user-attachments/assets/029a302f-c100-4c1c-9853-ee80b55fe623\" /\u003e\n\nPlot The title appears correctly (bold, dark).\n\nBut when the user edits any label/title from the interactive Matplotlib plotting window, such as:\n- Editing xlabel\n- Editing ylabel\n- Editing legend text\n- Changing marker properties\n\nexample:\n\n\u003cimg width=\"927\" height=\"781\" alt=\"Image\" src=\"https://github.com/user-attachments/assets/383f98e4-73b2-430b-afdb-fc633e1f98e7\" /\u003e\n\n\n→ the title formatting immediately resets, e.g.:\n\n- Bold becomes normal\n- Color lightens or resets\n- Weight lost\n\nexample: like \n\n\u003cimg width=\"1107\" height=\"782\" alt=\"Image\" src=\"https://github.com/user-attachments/assets/a0e0d7a4-3113-41e5-8c04-b4df84de4df2\" /\u003e\n\nThis is unexpected and interrupts the workflow.\n\n\n\n### Code for reproduction\n\n```Python\nimport numpy as np\nimport matplotlib.pyplot as plt\nfrom matplotlib.ticker import MultipleLocator\n\n# Define the x range\nx = np.linspace(-2, 2, 1000)\n\n# Define the wave packet: high-frequency sine modulated by a Gaussian envelope\ny = np.sin(50 * x) * np.exp(-x**2)\n\n\n\n#Plotting information \n# Create 3 subplots (3 rows, 1 column)\nfig, ax = plt.subplots(figsize=(9, 7)) # Adjust figure size if needed\n\n# Customize tick parameters for bold text\nax.tick_params(axis='both', direction='in', which='both')\nax.tick_params(which='both', width=2)\nax.tick_params(which='major', length=7, color='r')\nax.tick_params(which='minor', length=4)\nax.minorticks_on() # Turn on minor ticks\n\n# Set bold tick labels in Times New Roman\nax.tick_params(axis='x', labelsize=12)\nax.tick_params(axis='y', labelsize=12)\nfor label in ax.get_xticklabels() + ax.get_yticklabels():\n label.set_fontweight('bold')\n label.set_fontname(\"Times New Roman\")\n label.set_fontsize(20)\n\n# Set X-axis tick spacing (step size = 2)\nax.xaxis.set_major_locator(MultipleLocator(2))\n\n \n# Define font settings\nfont_settings = {\n \"fontname\": \"Times New Roman\",\n \"fontsize\": 20, # Change this for font size\n \"fontweight\": \"bold\"\n}\n\n# Labeling axes and title\nax.plot(x, y, label= 'Group Wave', color='blue')\nax.set_xlabel('Wave packet length', **font_settings)\nax.set_title('High-Frequency Group Wave Packet', **font_settings) \nax.set_ylabel('Amplitude', **font_settings)\nax.legend(prop={'family': 'Times New Roman', 'weight': 'bold', 'size': 12})\nax.grid(True, linestyle=\"--\", linewidth=0.5)\n#plt.savefig('wave packet ')\nplt.grid(True)\nplt.show()\n```\n\n### Actual outcome\n\nTitle loses bold/dark formatting.\nText properties revert to default settings.\n\n\u003cimg width=\"1107\" height=\"782\" alt=\"Image\" src=\"https://github.com/user-attachments/assets/52d3478f-203c-4725-86f8-af575607b13b\" /\u003e\n\n### Expected outcome\n\nTitle and other text properties should remain intact.\nEditing a label should NOT modify unrelated elements.\n\n\u003cimg width=\"900\" height=\"700\" alt=\"Image\" src=\"https://github.com/user-attachments/assets/06fe523d-f3d4-47e3-8c03-5cbc21b4b613\" /\u003e\n\n\n### Additional information\n\nThis problem interrupt the workflow....\n\n### Operating system\n\nWindows\n\n### Matplotlib Version\n\nMatplotlib: 3.7.0\n\n### Matplotlib Backend\n\nMatplotlib backend: Qt5Agg\n\n### Python version\n\nPython: 3.10.9 | packaged by Anaconda, Inc. | (main, Mar 1 2023, 18:18:15) [MSC v.1916 64 bit (AMD64)]\n\n### Jupyter version\n\n_No response_\n\n### Installation\n\nconda","author":{"url":"https://github.com/mdmalik95","@type":"Person","name":"mdmalik95"},"datePublished":"2025-11-20T09:38:12.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":2},"url":"https://github.com/30770/matplotlib/issues/30770"}
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:a4317b28-ca70-53af-20d6-79ab337291c2 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | EA56:2E826C:63E90E:892180:6A5254CC |
| html-safe-nonce | de2baa032c72ad75dc2ab7d4a758e7bb838e4c82852d4799889dca296a2d22fe |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJFQTU2OjJFODI2Qzo2M0U5MEU6ODkyMTgwOjZBNTI1NENDIiwidmlzaXRvcl9pZCI6IjE1ODgyMzQ5OTYwOTg5NDYyNTIiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | 6dcf4574d613bdeea8893c5d1043bd6773a2882f7e8cfbb7fe7151a5e28d0640 |
| hovercard-subject-tag | issue:3646371487 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/matplotlib/matplotlib/30770/issue_layout |
| twitter:image | https://opengraph.githubassets.com/abff556140921e9f8b5f2e922fa30d5174de3c65ddaf423872fa60ffe546ee3c/matplotlib/matplotlib/issues/30770 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/abff556140921e9f8b5f2e922fa30d5174de3c65ddaf423872fa60ffe546ee3c/matplotlib/matplotlib/issues/30770 |
| og:image:alt | Bug summary When a figure is plotted with a bold/dark title or legend, e.g.: Plot The title appears correctly (bold, dark). But when the user edits any label/title from the interactive Matplotlib p... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | mdmalik95 |
| hostname | github.com |
| expected-hostname | github.com |
| None | b9a586c06a05a7a86fc7e3f4dbd03e42f6869085879aa184aa6369456dbd50fb |
| turbo-cache-control | no-preview |
| go-import | github.com/matplotlib/matplotlib git https://github.com/matplotlib/matplotlib.git |
| octolytics-dimension-user_id | 215947 |
| octolytics-dimension-user_login | matplotlib |
| octolytics-dimension-repository_id | 1385122 |
| octolytics-dimension-repository_nwo | matplotlib/matplotlib |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 1385122 |
| octolytics-dimension-repository_network_root_nwo | matplotlib/matplotlib |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 7aed05249554b889eb33d002851a973eebcc7e91 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width