Title: ColorbarBase draws edges in slightly wrong positions. · Issue #4584 · matplotlib/matplotlib · GitHub
Open Graph Title: ColorbarBase draws edges in slightly wrong positions. · Issue #4584 · matplotlib/matplotlib
X Title: ColorbarBase draws edges in slightly wrong positions. · Issue #4584 · matplotlib/matplotlib
Description: The code below uses ColorbarBase to print a stacked bar chart of a list of numbers. I use drawedges=True to get vertical lines to separate the colors with a black line. The lines are often, not always, slightly misaligned compared to the...
Open Graph Description: The code below uses ColorbarBase to print a stacked bar chart of a list of numbers. I use drawedges=True to get vertical lines to separate the colors with a black line. The lines are often, not alw...
X Description: The code below uses ColorbarBase to print a stacked bar chart of a list of numbers. I use drawedges=True to get vertical lines to separate the colors with a black line. The lines are often, not alw...
Opengraph URL: https://github.com/matplotlib/matplotlib/issues/4584
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"ColorbarBase draws edges in slightly wrong positions. ","articleBody":"The code below uses ColorbarBase to print a stacked bar chart of a list of numbers. I use `drawedges=True` to get vertical lines to separate the colors with a black line. The lines are often, not always, slightly misaligned compared to the colors and the tick marks, never more than a few pixels. As I drag the matplotlib window larger and slower you can see these edge lines sometimes rendering correctly (right where the colors change) or just a few pixels off. I _think_ the error is always to the right.\n\nI've attached an example image. If you click the image to see if full scale you'll see a several pixel error at 0.3, and perhaps a 1 pixel error at 0.4. If I drag the window to a different size I can make these errors larger or smaller. \n\nEnvironment:\nWindows 7\nAnaconda Python 3.4, 64 bit installation.\nmatplotlib 1.4.3\nQt graphics back end\n\n```\n import matplotlib as mpl\n import matplotlib.pyplot as plt\n\n a = [.0, .1, .3, .4, 1.]\n cmap = mpl.colors.ListedColormap([[0., .4, 1.],\n [0., .8, 1.],\n [1., .8, 0.],\n [1., .4, 0.],\n [0., .4, 1.]])\n fig = plt.figure(figsize=(6,3))\n ax = fig.add_axes([0.05, 0.475, 0.9, 0.15])\n norm = mpl.colors.BoundaryNorm(a, cmap.N)\n mpl.colorbar.ColorbarBase(ax, cmap=cmap,\n norm=norm,\n drawedges=True,\n spacing='proportional',\n orientation='horizontal')\n plt.show()\n```\n\n\n","author":{"url":"https://github.com/rlabbe","@type":"Person","name":"rlabbe"},"datePublished":"2015-07-04T22:51:16.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":8},"url":"https://github.com/4584/matplotlib/issues/4584"}
| 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:b58cb220-74f6-b3fd-984b-29a379baa70c |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | D272:8E3D:25CD61:31230A:6A525950 |
| html-safe-nonce | 5ec257979a2fd9e3a6882b5c74984f71122970d6ef7b0dce23adc6d35d3d685e |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJEMjcyOjhFM0Q6MjVDRDYxOjMxMjMwQTo2QTUyNTk1MCIsInZpc2l0b3JfaWQiOiI3OTM0NzU4MzAwODA5MzIwNzg0IiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0= |
| visitor-hmac | 081c4d10377dc8da41c5829bc5e364309fe6ff891d8d863db38572a1eace455d |
| hovercard-subject-tag | issue:93054878 |
| 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/4584/issue_layout |
| twitter:image | https://opengraph.githubassets.com/b68bb5fa2993328cc8e70fc602573f2dd9e2743d8120d889103e1490525928f0/matplotlib/matplotlib/issues/4584 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/b68bb5fa2993328cc8e70fc602573f2dd9e2743d8120d889103e1490525928f0/matplotlib/matplotlib/issues/4584 |
| og:image:alt | The code below uses ColorbarBase to print a stacked bar chart of a list of numbers. I use drawedges=True to get vertical lines to separate the colors with a black line. The lines are often, not alw... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | rlabbe |
| 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