Title: colorbar labelling bug (1.5 regression) · Issue #5673 · matplotlib/matplotlib · GitHub
Open Graph Title: colorbar labelling bug (1.5 regression) · Issue #5673 · matplotlib/matplotlib
X Title: colorbar labelling bug (1.5 regression) · Issue #5673 · matplotlib/matplotlib
Description: This is 1.5 regression, the following test script works in 1.4.3. The bug only occurs when using a custom colormap. import matplotlib.pyplot as plt import numpy as np from matplotlib import mlab, cm, colors # make up fake data. delta = 0...
Open Graph Description: This is 1.5 regression, the following test script works in 1.4.3. The bug only occurs when using a custom colormap. import matplotlib.pyplot as plt import numpy as np from matplotlib import mlab, c...
X Description: This is 1.5 regression, the following test script works in 1.4.3. The bug only occurs when using a custom colormap. import matplotlib.pyplot as plt import numpy as np from matplotlib import mlab, c...
Opengraph URL: https://github.com/matplotlib/matplotlib/issues/5673
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"colorbar labelling bug (1.5 regression)","articleBody":"This is 1.5 regression, the following test script works in 1.4.3.\n\nThe bug only occurs when using a custom colormap.\n\n```\nimport matplotlib.pyplot as plt\nimport numpy as np\nfrom matplotlib import mlab, cm, colors\n# make up fake data.\ndelta = 0.5\nx = np.arange(-3.0, 4.001, delta)\ny = np.arange(-4.0, 3.001, delta)\nX, Y = np.meshgrid(x, y)\nZ1 = mlab.bivariate_normal(X, Y, 1.0, 1.0, 0.0, 0.0)\nZ2 = mlab.bivariate_normal(X, Y, 1.5, 0.5, 1, 1)\nZ = (Z1 - Z2) * 20000 ; Z -= Z.min(); Z *= 0.5\n# levels to contour\nclevs = [0,2,5,10,20,50,100,300,500,700,1000,1500,2000,2500,3000,3500]\n# contour data, make colorbar\nfig = plt.figure(figsize=(9.,6.3))\ncolorst =\\\n['White','#E4FFFF','#C4E8FF','#8FB3FF','#D8F9D8','#A6ECA6','#42F742','Yellow','Gold',\\\n 'Orange','#FCD5D9','#F6A3AE','#FA5257','Orchid','#AD8ADB','#A449FF','LightGray']\ncustom_cm = colors.ListedColormap(colorst, name='colorst', N=None)\nax = fig.add_axes([0.03,.12,0.94,.83])\ncs = plt.contourf(X, Y, Z, clevs, colors=colorst)\ncax = fig.add_axes([0.1,0.05,0.8,0.03])\ncbar = fig.colorbar(cs,extend='neither', \\\n orientation='horizontal',cax=cax,drawedges=True,ticks=clevs)\nplt.show()\n```\n\nThe resulting image\n\n\n\ndoes not show all the colorbar labels.\n","author":{"url":"https://github.com/jswhit","@type":"Person","name":"jswhit"},"datePublished":"2015-12-14T16:42:09.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":2},"url":"https://github.com/5673/matplotlib/issues/5673"}
| 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:3447f687-cc1e-a434-a080-e39f05777002 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | A90A:382280:2D06F03:3DA5638:6A549934 |
| html-safe-nonce | b45d48789ee14fbad194771984dd24ae2ac56eaf01035457392c9090647ecfd3 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJBOTBBOjM4MjI4MDoyRDA2RjAzOjNEQTU2Mzg6NkE1NDk5MzQiLCJ2aXNpdG9yX2lkIjoiMzQxMjQ4MjAzMzkyMjExOTk4OCIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | 367db1d2d0f0f86666e3a21effd45361785a69524b5235b7c322ff55d905d1fc |
| hovercard-subject-tag | issue:122081152 |
| 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/5673/issue_layout |
| twitter:image | https://opengraph.githubassets.com/931c88a58bf29054287caaf2b9f531109e412acdf0e8b9407570e904ad57743a/matplotlib/matplotlib/issues/5673 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/931c88a58bf29054287caaf2b9f531109e412acdf0e8b9407570e904ad57743a/matplotlib/matplotlib/issues/5673 |
| og:image:alt | This is 1.5 regression, the following test script works in 1.4.3. The bug only occurs when using a custom colormap. import matplotlib.pyplot as plt import numpy as np from matplotlib import mlab, c... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | jswhit |
| 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 | f8cfff6384f62259baea531c7f58bc7040f8dd92 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width