Title: colorbar with dates · Issue #17447 · matplotlib/matplotlib · GitHub
Open Graph Title: colorbar with dates · Issue #17447 · matplotlib/matplotlib
X Title: colorbar with dates · Issue #17447 · matplotlib/matplotlib
Description: When using a datetime vector for color mapping a plot, the colorbar treats it as a numerical vector where units are nanoseconds. You can see this in this discussion. It is possible however, to change the scale so that it shows human read...
Open Graph Description: When using a datetime vector for color mapping a plot, the colorbar treats it as a numerical vector where units are nanoseconds. You can see this in this discussion. It is possible however, to chan...
X Description: When using a datetime vector for color mapping a plot, the colorbar treats it as a numerical vector where units are nanoseconds. You can see this in this discussion. It is possible however, to chan...
Opengraph URL: https://github.com/matplotlib/matplotlib/issues/17447
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"colorbar with dates","articleBody":"When using a datetime vector for color mapping a plot, the colorbar treats it as a numerical vector where units are nanoseconds. You can see this in [this discussion](https://github.com/patwmcnamara/GADS11-NYC-Summer2014/issues/50). It is possible however, to change the scale so that it shows human readable dates, but it's quite cumbersome and I had to try many times before finding a working solution [here](https://stackoverflow.com/questions/42749741/matplotlib-colorbar-change-ticks-labels-and-locators).\r\n\r\nI think that the colorbar, in these cases, should have a readable scale by default, and matplotlib already uses it when one of the axes of a plot is datetime, so I think it should be natural to adopt it also for colorbars. Let me know if you agree\r\n\r\n**My matplotlib version**\r\n\u003c!--Please specify your platform and versions of the relevant libraries you are using:--\u003e\r\n * Operating system: windows 10\r\n * Matplotlib version: 3.1.3\r\n * Matplotlib backend (`print(matplotlib.get_backend())`): `module://ipykernel.pylab.backend_inline`\r\n * Python version: 3.7.3\r\n * Jupyter version (if applicable): 6.0.3\r\n\r\nI have installed python from default anaconda package","author":{"url":"https://github.com/c-foschi","@type":"Person","name":"c-foschi"},"datePublished":"2020-05-18T21:13:47.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":6},"url":"https://github.com/17447/matplotlib/issues/17447"}
| 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:1c746a84-88db-0164-ecc6-8a24fdb82265 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | AD3E:13CB91:B6631E:F8ADE0:6A52099D |
| html-safe-nonce | 6247ce398b889f3f11f5c6319d4bcc2dfa8e2d7dc86c1af09e8ab084d6fa64ca |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJBRDNFOjEzQ0I5MTpCNjYzMUU6RjhBREUwOjZBNTIwOTlEIiwidmlzaXRvcl9pZCI6IjEwMDU4NDExNTg3OTI5Mzk5MzMiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | cca187d840ae3051ff1544c1c1b895f16bec3a07489acb0c93f36619c4b4fd63 |
| hovercard-subject-tag | issue:620509600 |
| 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/17447/issue_layout |
| twitter:image | https://opengraph.githubassets.com/8a8a820271d9a41d7a3842770709a7ed74453e379ca70a487b8725fd8e857fb4/matplotlib/matplotlib/issues/17447 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/8a8a820271d9a41d7a3842770709a7ed74453e379ca70a487b8725fd8e857fb4/matplotlib/matplotlib/issues/17447 |
| og:image:alt | When using a datetime vector for color mapping a plot, the colorbar treats it as a numerical vector where units are nanoseconds. You can see this in this discussion. It is possible however, to chan... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | c-foschi |
| 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