Title: ticklabels font using latex · Issue #11586 · matplotlib/matplotlib · GitHub
Open Graph Title: ticklabels font using latex · Issue #11586 · matplotlib/matplotlib
X Title: ticklabels font using latex · Issue #11586 · matplotlib/matplotlib
Description: I can not change the fontstyle of the ticklabels to "sans-serif" when using latex. import matplotlib.pyplot as plt import numpy as np from matplotlib import rc rc('font',**{'family':'sans-serif','sans-serif':['Helvetica']}) rc('text', us...
Open Graph Description: I can not change the fontstyle of the ticklabels to "sans-serif" when using latex. import matplotlib.pyplot as plt import numpy as np from matplotlib import rc rc('font',**{'family':'sans-serif','s...
X Description: I can not change the fontstyle of the ticklabels to "sans-serif" when using latex. import matplotlib.pyplot as plt import numpy as np from matplotlib import rc rc('font',**{'f...
Opengraph URL: https://github.com/matplotlib/matplotlib/issues/11586
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"ticklabels font using latex","articleBody":"I can not change the fontstyle of the ticklabels to \"sans-serif\" when using latex. \r\n\r\n```python\r\nimport matplotlib.pyplot as plt\r\nimport numpy as np\r\nfrom matplotlib import rc\r\nrc('font',**{'family':'sans-serif','sans-serif':['Helvetica']})\r\nrc('text', usetex=True)\r\n\r\ndef xticklabels_example():\r\n fig = plt.figure() \r\n x = np.arange(20)\r\n y1 = np.cos(x)\r\n y2 = (x**2)\r\n y3 = (x**3)\r\n yn = (y1,y2,y3)\r\n COLORS = ('b','g','k')\r\n for i,y in enumerate(yn):\r\n ax = fig.add_subplot(len(yn),1,i+1)\r\n ax.plot(x, y, ls='solid', color=COLORS[i]) \r\n if i != len(yn) - 1:\r\n # all but last \r\n ax.set_xticklabels( () )\r\n else:\r\n for tick in ax.xaxis.get_major_ticks():\r\n tick.label.set_fontsize(14) \r\n # specify integer or one of preset strings, e.g.\r\n #tick.label.set_fontsize('x-small') \r\n tick.label.set_rotation('vertical')\r\n fig.suptitle('Matplotlib xticklabels Example')\r\n plt.show()\r\n\r\nif __name__ == '__main__':\r\n xticklabels_example()\r\n```\r\n\r\n\r\n\r\n**Matplotlib version**\r\n * Operating system: python 3.6 (itom 3.1.0, www.itom.rocks)\r\n * Matplotlib version: 2.2.2\r\n * Python version: 3.6\r\n\r\n\r\n","author":{"url":"https://github.com/photoniker","@type":"Person","name":"photoniker"},"datePublished":"2018-07-06T12:39:57.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":12},"url":"https://github.com/11586/matplotlib/issues/11586"}
| 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:63e6b954-78cb-73f9-9019-034976042d88 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | AB1C:217E0D:29E691:37C9C1:6A524277 |
| html-safe-nonce | 64adf98d2b7f810c0d68364bdfbe31dd15fbdfe91b83e0bfb5a1ceddb1b85b00 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJBQjFDOjIxN0UwRDoyOUU2OTE6MzdDOUMxOjZBNTI0Mjc3IiwidmlzaXRvcl9pZCI6IjUzNTgxNjc4Mjc4MDQ0OTM5OSIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | bbdddea5c713b63c3fc92800cef03d038788688dbc859cc307c69c65b720e831 |
| hovercard-subject-tag | issue:338924094 |
| 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/11586/issue_layout |
| twitter:image | https://opengraph.githubassets.com/d721b4f6c99217417397c83d538b75d9e0f131e7dffc34b5c9f878d898424cd0/matplotlib/matplotlib/issues/11586 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/d721b4f6c99217417397c83d538b75d9e0f131e7dffc34b5c9f878d898424cd0/matplotlib/matplotlib/issues/11586 |
| og:image:alt | I can not change the fontstyle of the ticklabels to "sans-serif" when using latex. import matplotlib.pyplot as plt import numpy as np from matplotlib import rc rc('font',**{'family':'sans-serif','s... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | photoniker |
| 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