Title: linscalex/linscaley (for symlog) behaviour and documentation · Issue #10369 · matplotlib/matplotlib · GitHub
Open Graph Title: linscalex/linscaley (for symlog) behaviour and documentation · Issue #10369 · matplotlib/matplotlib
X Title: linscalex/linscaley (for symlog) behaviour and documentation · Issue #10369 · matplotlib/matplotlib
Description: According to the documentation linscalex/linscaley "is the number of decades to use for each half of the linear range." This may be correct for base 10* (incidentally the documentation does not specify that this is the default base) but ...
Open Graph Description: According to the documentation linscalex/linscaley "is the number of decades to use for each half of the linear range." This may be correct for base 10* (incidentally the documentation does not spe...
X Description: According to the documentation linscalex/linscaley "is the number of decades to use for each half of the linear range." This may be correct for base 10* (incidentally the documentation do...
Opengraph URL: https://github.com/matplotlib/matplotlib/issues/10369
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"linscalex/linscaley (for symlog) behaviour and documentation","articleBody":"According to [the documentation](https://matplotlib.org/devdocs/api/_as_gen/matplotlib.pyplot.yscale.html) linscalex/linscaley \"is the number of decades to use for each half of the linear range.\" This may be correct for base 10* (incidentally the documentation does not specify that this is the default base) but with a general base b it seems not to be, nor for a 'b-ade' as opposed to a decade. Also, there is a natural value log(e)/log(b) for this scaling (relative to the 'b-ade') which makes the scale continuous at the threshold and hence does not introduce gradient jumps in smooth curves. This may be a better default than 1.\r\n\r\n- See also issue #7008\r\n\r\n```python\r\nimport matplotlib.pyplot as plt\r\nimport numpy as np\r\n\r\nb = 2. # Try 100. too\r\nt = 1.\r\n\r\n# Define some curves:\r\nx = np.linspace(0.1,3.,100)\r\ny1 = x\r\ny2 = x**2\r\ny3 = np.exp(x)/2.\r\ny4 = np.log(x)*2.\r\n\r\nplt.figure()\r\n\r\nplt.subplot(1,3,1)\r\nplt.title('base 10 default')\r\nplt.ylim(-100,100)\r\nplt.yscale('symlog',linthreshy=t) # should set decade = half-linear\r\nplt.plot(x,y1)\r\nplt.plot(x,y2)\r\nplt.plot(x,y3)\r\nplt.plot(x,y4)\r\n\r\nplt.subplot(1,3,2)\r\nplt.title('base 10 smooth?')\r\nplt.ylim(-100,100)\r\nplt.yscale('symlog',linthreshy=t,linscaley=np.log10(np.e)) # smooth match?\r\nplt.plot(x,y1)\r\nplt.plot(x,y2)\r\nplt.plot(x,y3)\r\nplt.plot(x,y4)\r\n\r\nplt.subplot(1,3,3)\r\nplt.title('base %d default' % (b))\r\nplt.ylim(-100,100)\r\nplt.yscale('symlog',linthreshy=t,basey=b) # doesn't set decade or b-ade = half-linear\r\nplt.plot(x,y1)\r\nplt.plot(x,y2)\r\nplt.plot(x,y3)\r\nplt.plot(x,y4)\r\n\r\nplt.show()\r\n```\r\nLinux; matplotlib 2.0.0, python 2.7.12 via conda\r\n\r\n*actually not; see below","author":{"url":"https://github.com/gregcolyer","@type":"Person","name":"gregcolyer"},"datePublished":"2018-02-02T12:10:56.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":8},"url":"https://github.com/10369/matplotlib/issues/10369"}
| 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:b35b1467-6cf0-1b25-0e0a-05b07def9780 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | D350:1CAF22:357E05:478F1A:6A52EC39 |
| html-safe-nonce | 405983ec9439d84d0c9624565fe94d0f5b962bd069c96fb6f3f54cc6c2f16fb9 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJEMzUwOjFDQUYyMjozNTdFMDU6NDc4RjFBOjZBNTJFQzM5IiwidmlzaXRvcl9pZCI6Ijc1OTM2ODYwNDQzNjY3OTM3ODUiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | c8bdf158996f224ca9ea2ec4ad14b134c065b2e24c4576faa8def625abf76445 |
| hovercard-subject-tag | issue:293868490 |
| 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/10369/issue_layout |
| twitter:image | https://opengraph.githubassets.com/3c71058de4100820b44c56212aeecdcd9df8a55a3e9af6153eb30670dd526830/matplotlib/matplotlib/issues/10369 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/3c71058de4100820b44c56212aeecdcd9df8a55a3e9af6153eb30670dd526830/matplotlib/matplotlib/issues/10369 |
| og:image:alt | According to the documentation linscalex/linscaley "is the number of decades to use for each half of the linear range." This may be correct for base 10* (incidentally the documentation does not spe... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | gregcolyer |
| 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