Title: SymLog scale has too few ticks · Issue #17402 · matplotlib/matplotlib · GitHub
Open Graph Title: SymLog scale has too few ticks · Issue #17402 · matplotlib/matplotlib
X Title: SymLog scale has too few ticks · Issue #17402 · matplotlib/matplotlib
Description: Bug report Bug summary SymLog scale is exactly what I need to display various reinforcement learning related metrics as they can be both positive and negative, interesting mainly in the -10 to 10 range, and frequently explode to very lar...
Open Graph Description: Bug report Bug summary SymLog scale is exactly what I need to display various reinforcement learning related metrics as they can be both positive and negative, interesting mainly in the -10 to 10 r...
X Description: Bug report Bug summary SymLog scale is exactly what I need to display various reinforcement learning related metrics as they can be both positive and negative, interesting mainly in the -10 to 10 r...
Opengraph URL: https://github.com/matplotlib/matplotlib/issues/17402
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"SymLog scale has too few ticks","articleBody":"\u003c!--To help us understand and resolve your issue, please fill out the form to the best of your ability.--\u003e\r\n\u003c!--You can feel free to delete the sections that do not apply.--\u003e\r\n\r\n### Bug report\r\n\r\n**Bug summary**\r\n\r\n\u003c!--A short 1-2 sentences that succinctly describes the bug--\u003e\r\nSymLog scale is exactly what I need to display various reinforcement learning related metrics as they can be both positive and negative, interesting mainly in the -10 to 10 range, and frequently explode to very large values only to come back \"to sanity\" later.\r\n\r\nUnfortunately, if things go well and metrics don't go insane, current SymLog graphs have too few ticks and is not possible to understand what am I looking at. Here is a synthetic example that illustrates the issue quite well:\r\n\r\n**Code for reproduction**\r\n\r\n\u003c!--A minimum code snippet required to reproduce the bug.\r\nPlease make sure to minimize the number of dependencies required, and provide\r\nany necessary plotted data.\r\nAvoid using threads, as Matplotlib is (explicitly) not thread-safe.--\u003e\r\n\r\n```python\r\nimport matplotlib.pyplot as plt\r\nimport numpy as np\r\n\r\nst = np.random.standard_cauchy(size=25)\r\nen = np.random.standard_cauchy(size=25)\r\n\r\nfig, axen = plt.subplots(5, 5, figsize=(20, 20))\r\nfig.tight_layout()\r\nfor ax, s, e in zip(np.ravel(axen), st, en):\r\n ax.plot(np.linspace(s, e, 5))\r\n ax.set_yscale('symlog')\r\n```\r\n\r\n**Actual outcome**\r\n\r\n\u003c!--The output produced by the above code, which may be a screenshot, console output, etc.--\u003e\r\n\r\n\r\n**Expected outcome**\r\n\r\nIt would be awesome to get more ticks and nicer labels!\r\n\r\n\u003c!--A description of the expected outcome from the code snippet--\u003e\r\n\u003c!--If this used to work in an earlier version of Matplotlib, please note the version it used to work on--\u003e\r\n\r\n**Matplotlib version**\r\n\r\nmatplotlib 3.1.1\r\n\r\nI think the versions of all the remaining stuff are irrelevant, as this is an issue in the SymmetricalLogLocator class, which is built on an assumption that does not hold in my case:\r\n\r\n```\r\n # b) has a tick at 0 and only 0 (we assume t is a small\r\n # number, and the linear segment is just an implementation\r\n # detail and not interesting.)\r\n```","author":{"url":"https://github.com/psarka","@type":"Person","name":"psarka"},"datePublished":"2020-05-13T19:26:05.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":9},"url":"https://github.com/17402/matplotlib/issues/17402"}
| 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:718ae9f6-d59b-e81b-2199-36be55023a99 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | D950:1AD2E4:12CB1C:18C7B2:6A52C13C |
| html-safe-nonce | 4e99d9a631bca5187d53b1fc5ff94c73e2bda7439de755ac5cf656be3ebe12e1 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJEOTUwOjFBRDJFNDoxMkNCMUM6MThDN0IyOjZBNTJDMTNDIiwidmlzaXRvcl9pZCI6IjE1MjAxODIwMTIzODc5NjcyOTIiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | 217dd3e6676fb6515b9676e2f60a198ec2a8b6849357598bc53ee2bd8d377471 |
| hovercard-subject-tag | issue:617697125 |
| 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/17402/issue_layout |
| twitter:image | https://opengraph.githubassets.com/81b4ed655a0334f8b5b86cbd07b5f2ecf5df7426949ea1a4c6550fb88a0490fd/matplotlib/matplotlib/issues/17402 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/81b4ed655a0334f8b5b86cbd07b5f2ecf5df7426949ea1a4c6550fb88a0490fd/matplotlib/matplotlib/issues/17402 |
| og:image:alt | Bug report Bug summary SymLog scale is exactly what I need to display various reinforcement learning related metrics as they can be both positive and negative, interesting mainly in the -10 to 10 r... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | psarka |
| 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 | canary-2 |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width