Title: BUG: Setting ticksize xx-small broken by #17348 · Issue #17670 · matplotlib/matplotlib · GitHub
Open Graph Title: BUG: Setting ticksize xx-small broken by #17348 · Issue #17670 · matplotlib/matplotlib
X Title: BUG: Setting ticksize xx-small broken by #17348 · Issue #17670 · matplotlib/matplotlib
Description: On commit 9909aeb this code works fine: import matplotlib.pyplot as plt plt.rcParams['xtick.labelsize'] = 'xx-small' fig, ax = plt.subplots() After #17348 (specifically 222b3ba) I get: Traceback >>> Traceback (most recent call last): Fil...
Open Graph Description: On commit 9909aeb this code works fine: import matplotlib.pyplot as plt plt.rcParams['xtick.labelsize'] = 'xx-small' fig, ax = plt.subplots() After #17348 (specifically 222b3ba) I get: Traceback >>...
X Description: On commit 9909aeb this code works fine: import matplotlib.pyplot as plt plt.rcParams['xtick.labelsize'] = 'xx-small' fig, ax = plt.subplots() After #17348 (specifically 222b3ba) I g...
Opengraph URL: https://github.com/matplotlib/matplotlib/issues/17670
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"BUG: Setting ticksize xx-small broken by #17348","articleBody":"On commit 9909aeb43474d12e560695db7e3028623906389e this code works fine:\r\n```\r\nimport matplotlib.pyplot as plt\r\nplt.rcParams['xtick.labelsize'] = 'xx-small'\r\nfig, ax = plt.subplots()\r\n```\r\nAfter #17348 (specifically 222b3ba20dd51572ce30526f93fca1fb4329b3ca) I get:\r\n\r\n\u003cdetails\u003e\r\n\u003csummary\u003eTraceback\u003c/summary\u003e\r\n\r\n```\r\n\u003e\u003e\u003e Traceback (most recent call last):\r\n File \"/home/larsoner/python/matplotlib/lib/matplotlib/fontconfig_pattern.py\", line 127, in parse\r\n self._parser.parseString(pattern)\r\n File \"/home/larsoner/.local/lib/python3.8/site-packages/pyparsing.py\", line 1945, in parseString\r\n raise exc\r\n File \"/home/larsoner/.local/lib/python3.8/site-packages/pyparsing.py\", line 1935, in parseString\r\n loc, tokens = self._parse(instring, 0)\r\n File \"/home/larsoner/.local/lib/python3.8/site-packages/pyparsing.py\", line 1836, in _parseCache\r\n value = self._parseNoCache(instring, loc, doActions, callPreParse)\r\n File \"/home/larsoner/.local/lib/python3.8/site-packages/pyparsing.py\", line 1675, in _parseNoCache\r\n loc, tokens = self.parseImpl(instring, preloc, doActions)\r\n File \"/home/larsoner/.local/lib/python3.8/site-packages/pyparsing.py\", line 4050, in parseImpl\r\n loc, exprtokens = e._parse(instring, loc, doActions)\r\n File \"/home/larsoner/.local/lib/python3.8/site-packages/pyparsing.py\", line 1836, in _parseCache\r\n value = self._parseNoCache(instring, loc, doActions, callPreParse)\r\n File \"/home/larsoner/.local/lib/python3.8/site-packages/pyparsing.py\", line 1679, in _parseNoCache\r\n loc, tokens = self.parseImpl(instring, preloc, doActions)\r\n File \"/home/larsoner/.local/lib/python3.8/site-packages/pyparsing.py\", line 3796, in parseImpl\r\n raise ParseException(instring, loc, self.errmsg, self)\r\npyparsing.ParseException: Expected end of text, found '-' (at char 2), (line:1, col:3)\r\n\r\nThe above exception was the direct cause of the following exception:\r\n\r\nTraceback (most recent call last):\r\n File \"/home/larsoner/python/matplotlib/lib/matplotlib/backends/backend_qt5.py\", line 471, in _draw_idle\r\n self.draw()\r\n File \"/home/larsoner/python/matplotlib/lib/matplotlib/backends/backend_agg.py\", line 397, in draw\r\n self.figure.draw(self.renderer)\r\n File \"/home/larsoner/python/matplotlib/lib/matplotlib/artist.py\", line 41, in draw_wrapper\r\n return draw(artist, renderer, *args, **kwargs)\r\n File \"/home/larsoner/python/matplotlib/lib/matplotlib/figure.py\", line 1681, in draw\r\n mimage._draw_list_compositing_images(\r\n File \"/home/larsoner/python/matplotlib/lib/matplotlib/image.py\", line 132, in _draw_list_compositing_images\r\n a.draw(renderer)\r\n File \"/home/larsoner/python/matplotlib/lib/matplotlib/artist.py\", line 41, in draw_wrapper\r\n return draw(artist, renderer, *args, **kwargs)\r\n File \"/home/larsoner/python/matplotlib/lib/matplotlib/cbook/deprecation.py\", line 410, in wrapper\r\n return func(*inner_args, **inner_kwargs)\r\n File \"/home/larsoner/python/matplotlib/lib/matplotlib/axes/_base.py\", line 2747, in draw\r\n mimage._draw_list_compositing_images(renderer, self, artists)\r\n File \"/home/larsoner/python/matplotlib/lib/matplotlib/image.py\", line 132, in _draw_list_compositing_images\r\n a.draw(renderer)\r\n File \"/home/larsoner/python/matplotlib/lib/matplotlib/artist.py\", line 41, in draw_wrapper\r\n return draw(artist, renderer, *args, **kwargs)\r\n File \"/home/larsoner/python/matplotlib/lib/matplotlib/axis.py\", line 1149, in draw\r\n ticks_to_draw = self._update_ticks()\r\n File \"/home/larsoner/python/matplotlib/lib/matplotlib/axis.py\", line 1007, in _update_ticks\r\n major_locs = self.get_majorticklocs()\r\n File \"/home/larsoner/python/matplotlib/lib/matplotlib/axis.py\", line 1268, in get_majorticklocs\r\n return self.major.locator()\r\n File \"/home/larsoner/python/matplotlib/lib/matplotlib/ticker.py\", line 2169, in __call__\r\n return self.tick_values(vmin, vmax)\r\n File \"/home/larsoner/python/matplotlib/lib/matplotlib/ticker.py\", line 2177, in tick_values\r\n locs = self._raw_ticks(vmin, vmax)\r\n File \"/home/larsoner/python/matplotlib/lib/matplotlib/ticker.py\", line 2116, in _raw_ticks\r\n nbins = np.clip(self.axis.get_tick_space(),\r\n File \"/home/larsoner/python/matplotlib/lib/matplotlib/axis.py\", line 2203, in get_tick_space\r\n size = self._get_tick_label_size('x') * 3\r\n File \"/home/larsoner/python/matplotlib/lib/matplotlib/axis.py\", line 1328, in _get_tick_label_size\r\n return mtext.FontProperties(size).get_size_in_points()\r\n File \"/home/larsoner/python/matplotlib/lib/matplotlib/font_manager.py\", line 628, in __init__\r\n self.set_fontconfig_pattern(family)\r\n File \"/home/larsoner/python/matplotlib/lib/matplotlib/font_manager.py\", line 840, in set_fontconfig_pattern\r\n for key, val in parse_fontconfig_pattern(pattern).items():\r\n File \"/home/larsoner/python/matplotlib/lib/matplotlib/fontconfig_pattern.py\", line 129, in parse\r\n raise ValueError(\r\nValueError: Could not parse font string: 'xx-small'\r\nExpected end of text, found '-' (at char 2), (line:1, col:3)\r\nTraceback (most recent call last):\r\n File \"/home/larsoner/python/matplotlib/lib/matplotlib/fontconfig_pattern.py\", line 127, in parse\r\n self._parser.parseString(pattern)\r\n File \"/home/larsoner/.local/lib/python3.8/site-packages/pyparsing.py\", line 1945, in parseString\r\n raise exc\r\n File \"/home/larsoner/.local/lib/python3.8/site-packages/pyparsing.py\", line 1935, in parseString\r\n loc, tokens = self._parse(instring, 0)\r\n File \"/home/larsoner/.local/lib/python3.8/site-packages/pyparsing.py\", line 1836, in _parseCache\r\n value = self._parseNoCache(instring, loc, doActions, callPreParse)\r\n File \"/home/larsoner/.local/lib/python3.8/site-packages/pyparsing.py\", line 1675, in _parseNoCache\r\n loc, tokens = self.parseImpl(instring, preloc, doActions)\r\n File \"/home/larsoner/.local/lib/python3.8/site-packages/pyparsing.py\", line 4050, in parseImpl\r\n loc, exprtokens = e._parse(instring, loc, doActions)\r\n File \"/home/larsoner/.local/lib/python3.8/site-packages/pyparsing.py\", line 1836, in _parseCache\r\n value = self._parseNoCache(instring, loc, doActions, callPreParse)\r\n File \"/home/larsoner/.local/lib/python3.8/site-packages/pyparsing.py\", line 1679, in _parseNoCache\r\n loc, tokens = self.parseImpl(instring, preloc, doActions)\r\n File \"/home/larsoner/.local/lib/python3.8/site-packages/pyparsing.py\", line 3796, in parseImpl\r\n raise ParseException(instring, loc, self.errmsg, self)\r\npyparsing.ParseException: Expected end of text, found '-' (at char 2), (line:1, col:3)\r\n\r\nThe above exception was the direct cause of the following exception:\r\n\r\nTraceback (most recent call last):\r\n File \"/home/larsoner/python/matplotlib/lib/matplotlib/backends/backend_qt5.py\", line 471, in _draw_idle\r\n self.draw()\r\n File \"/home/larsoner/python/matplotlib/lib/matplotlib/backends/backend_agg.py\", line 397, in draw\r\n self.figure.draw(self.renderer)\r\n File \"/home/larsoner/python/matplotlib/lib/matplotlib/artist.py\", line 41, in draw_wrapper\r\n return draw(artist, renderer, *args, **kwargs)\r\n File \"/home/larsoner/python/matplotlib/lib/matplotlib/figure.py\", line 1681, in draw\r\n mimage._draw_list_compositing_images(\r\n File \"/home/larsoner/python/matplotlib/lib/matplotlib/image.py\", line 132, in _draw_list_compositing_images\r\n a.draw(renderer)\r\n File \"/home/larsoner/python/matplotlib/lib/matplotlib/artist.py\", line 41, in draw_wrapper\r\n return draw(artist, renderer, *args, **kwargs)\r\n File \"/home/larsoner/python/matplotlib/lib/matplotlib/cbook/deprecation.py\", line 410, in wrapper\r\n return func(*inner_args, **inner_kwargs)\r\n File \"/home/larsoner/python/matplotlib/lib/matplotlib/axes/_base.py\", line 2747, in draw\r\n mimage._draw_list_compositing_images(renderer, self, artists)\r\n File \"/home/larsoner/python/matplotlib/lib/matplotlib/image.py\", line 132, in _draw_list_compositing_images\r\n a.draw(renderer)\r\n File \"/home/larsoner/python/matplotlib/lib/matplotlib/artist.py\", line 41, in draw_wrapper\r\n return draw(artist, renderer, *args, **kwargs)\r\n File \"/home/larsoner/python/matplotlib/lib/matplotlib/axis.py\", line 1149, in draw\r\n ticks_to_draw = self._update_ticks()\r\n File \"/home/larsoner/python/matplotlib/lib/matplotlib/axis.py\", line 1007, in _update_ticks\r\n major_locs = self.get_majorticklocs()\r\n File \"/home/larsoner/python/matplotlib/lib/matplotlib/axis.py\", line 1268, in get_majorticklocs\r\n return self.major.locator()\r\n File \"/home/larsoner/python/matplotlib/lib/matplotlib/ticker.py\", line 2169, in __call__\r\n return self.tick_values(vmin, vmax)\r\n File \"/home/larsoner/python/matplotlib/lib/matplotlib/ticker.py\", line 2177, in tick_values\r\n locs = self._raw_ticks(vmin, vmax)\r\n File \"/home/larsoner/python/matplotlib/lib/matplotlib/ticker.py\", line 2116, in _raw_ticks\r\n nbins = np.clip(self.axis.get_tick_space(),\r\n File \"/home/larsoner/python/matplotlib/lib/matplotlib/axis.py\", line 2203, in get_tick_space\r\n size = self._get_tick_label_size('x') * 3\r\n File \"/home/larsoner/python/matplotlib/lib/matplotlib/axis.py\", line 1328, in _get_tick_label_size\r\n return mtext.FontProperties(size).get_size_in_points()\r\n File \"/home/larsoner/python/matplotlib/lib/matplotlib/font_manager.py\", line 628, in __init__\r\n self.set_fontconfig_pattern(family)\r\n File \"/home/larsoner/python/matplotlib/lib/matplotlib/font_manager.py\", line 840, in set_fontconfig_pattern\r\n for key, val in parse_fontconfig_pattern(pattern).items():\r\n File \"/home/larsoner/python/matplotlib/lib/matplotlib/fontconfig_pattern.py\", line 129, in parse\r\n raise ValueError(\r\nValueError: Could not parse font string: 'xx-small'\r\nExpected end of text, found '-' (at char 2), (line:1, col:3)\r\n```\r\n\r\n\u003c/details\u003e\r\n\r\ncc author of the PR @QuLogic and committer @timhoffm","author":{"url":"https://github.com/larsoner","@type":"Person","name":"larsoner"},"datePublished":"2020-06-18T16:30:47.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":2},"url":"https://github.com/17670/matplotlib/issues/17670"}
| 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:2b075ef5-b152-e6a2-19f5-438b1263f657 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | B972:279B75:2BBC60:3AD141:6A52EAED |
| html-safe-nonce | 302722e2895b235fa440a3db61b08220001862364454c9739d55192fe84e89d5 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJCOTcyOjI3OUI3NToyQkJDNjA6M0FEMTQxOjZBNTJFQUVEIiwidmlzaXRvcl9pZCI6IjkxMjkzMTg3MTg3ODE5NzUyNzciLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | bfb36ef0734dc1bf33ab3bd0adf1899b5fbb42a75e24f1a1116211b5ebbee8b9 |
| hovercard-subject-tag | issue:641365715 |
| 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/17670/issue_layout |
| twitter:image | https://opengraph.githubassets.com/6d918eea929e286837ef402d666211decfa0855a71f55d6bc5f8a1dd0fa9c1e9/matplotlib/matplotlib/issues/17670 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/6d918eea929e286837ef402d666211decfa0855a71f55d6bc5f8a1dd0fa9c1e9/matplotlib/matplotlib/issues/17670 |
| og:image:alt | On commit 9909aeb this code works fine: import matplotlib.pyplot as plt plt.rcParams['xtick.labelsize'] = 'xx-small' fig, ax = plt.subplots() After #17348 (specifically 222b3ba) I get: Traceback >>... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | larsoner |
| 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 | 07a982c1d40157c619b364352b704c3ce66bb332 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width