Title: New rcParams requests · Issue #5618 · matplotlib/matplotlib · GitHub
Open Graph Title: New rcParams requests · Issue #5618 · matplotlib/matplotlib
X Title: New rcParams requests · Issue #5618 · matplotlib/matplotlib
Description: Request 1: imshow should have separate rcParams for removing ticks and grid. The image key should take additional parameters, so that x and y ticks are not present by default, and the grid is not overlaid by default if axes.grid is True....
Open Graph Description: Request 1: imshow should have separate rcParams for removing ticks and grid. The image key should take additional parameters, so that x and y ticks are not present by default, and the grid is not o...
X Description: Request 1: imshow should have separate rcParams for removing ticks and grid. The image key should take additional parameters, so that x and y ticks are not present by default, and the grid is not o...
Opengraph URL: https://github.com/matplotlib/matplotlib/issues/5618
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"New rcParams requests","articleBody":"## Request 1: `imshow` should have separate `rcParams` for removing ticks and grid.\n\nThe `image` key should take additional parameters, so that x and y ticks are not present by default, and the grid is not overlaid by default if `axes.grid` is `True`. For example `image.axis: False` would be ideal. To me, it quite reasonable to want `axes.grid: True` as the default for numerical plots as well a separate default for `imshow` since they have very different use cases.\n\nHere is an example:\n\n```\nimport matplotlib\nmatplotlib.rcdefaults()\nmatplotlib.use('qt4agg') # or whatever\nmatplotlib.rcParams['axes.grid'] = True\nmatplotlib.rcParams['axes.axisbelow'] = True\nmatplotlib.rcParams['grid.linestyle'] = '--'\nmatplotlib.rcParams['grid.color'] = 'red'\nmatplotlib.rcParams['grid.linewidth'] = 2.0\n\nimport matplotlib.pyplot as plt\nfrom numpy import zeros,cos,linspace\n\nx = linspace(0,6.28,100)\n\nfig = plt.figure(figsize=(12,6))\n\nax1 = fig.add_subplot(121)\nax1.plot(x,cos(x+2*cos(2*x)),lw=3)\nax1.set_title('Ticks and grid are a nice\\ndefault for numerical plots.')\n\nax2 = fig.add_subplot(122)\nax2.imshow(zeros((100,100)), cmap=plt.cm.gray)\nax2.set_title('Ticks and grid are not a nice\\ndefault for image plots.')\n\nplt.show()\n```\n\n\n## Request 2: Fix inconsistent `rcParams` behavior with regard to plots that add patches.\n\nSome plots that use patches follow the `axes.prop_cycle`, while others do not. For example `hist` obeys both `axes.prop_cycle` and `patch.edgecolor`, but ignores `patch.facecolor` (even if `axes.prop_cycle` is not set); however, `violinplot` ignores everything except `patch.edgecolor`, which is not apparent due to the default `alpha` setting for `violinplot` (why is this default??). Here is an example:\n\n```\nimport matplotlib\nfrom cycler import cycler\n\nmatplotlib.rcdefaults()\nmatplotlib.use('qt4agg')\nmatplotlib.rcParams['axes.prop_cycle'] = cycler('color', ['pink','purple','salmon'])\nmatplotlib.rcParams['patch.facecolor'] = 'pink'\nmatplotlib.rcParams['patch.edgecolor'] = 'blue'\n\nimport matplotlib.pyplot as plt\nfrom numpy.random import randn\n\nfig = plt.figure(figsize=(12,6))\n\nX = randn(100)\n\nax = fig.add_subplot(121)\nfor i in range(3):\n ax.hist(X+2*i)\n\nax = fig.add_subplot(122)\nfor i in range(3):\n ax.violinplot(X+2*i)\n\nplt.show()\n```\n\n\n","author":{"url":"https://github.com/notmatthancock","@type":"Person","name":"notmatthancock"},"datePublished":"2015-12-04T14:49:43.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":4},"url":"https://github.com/5618/matplotlib/issues/5618"}
| 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:8126364a-0fd7-1cff-f030-9d7af84bd79b |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | B7A2:26D4A7:81CBEE:AB6554:6A5421CC |
| html-safe-nonce | fa20f1cefca3b83f41c639386a0329cc891469440417580f302219ee2d2e53d8 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJCN0EyOjI2RDRBNzo4MUNCRUU6QUI2NTU0OjZBNTQyMUNDIiwidmlzaXRvcl9pZCI6IjcwMTM1MzI5NTE2Mjg3NTEzMDgiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | 55ea20fcc2b6ae6847410139b4970665667b580ccd97d3cb2aa460be2fabff7a |
| hovercard-subject-tag | issue:120415914 |
| 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/5618/issue_layout |
| twitter:image | https://opengraph.githubassets.com/4db2a6055a98aa9a749fc86cfc65fca0d967581ac89d09245babc5a704384620/matplotlib/matplotlib/issues/5618 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/4db2a6055a98aa9a749fc86cfc65fca0d967581ac89d09245babc5a704384620/matplotlib/matplotlib/issues/5618 |
| og:image:alt | Request 1: imshow should have separate rcParams for removing ticks and grid. The image key should take additional parameters, so that x and y ticks are not present by default, and the grid is not o... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | notmatthancock |
| 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