Title: contour for cyclic functions · Issue #20548 · matplotlib/matplotlib · GitHub
Open Graph Title: contour for cyclic functions · Issue #20548 · matplotlib/matplotlib
X Title: contour for cyclic functions · Issue #20548 · matplotlib/matplotlib
Description: I tried to get a contour plot of the complex angles of a particular function, but always got one level too many around zeros and infinities. Consider the following MWE which is supposed to plot the contour line for pi / 4 only. It plots ...
Open Graph Description: I tried to get a contour plot of the complex angles of a particular function, but always got one level too many around zeros and infinities. Consider the following MWE which is supposed to plot the...
X Description: I tried to get a contour plot of the complex angles of a particular function, but always got one level too many around zeros and infinities. Consider the following MWE which is supposed to plot the...
Opengraph URL: https://github.com/matplotlib/matplotlib/issues/20548
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"contour for cyclic functions","articleBody":"I tried to get a contour plot of the complex angles of a particular function, but always got one level too many around zeros and infinities. Consider the following MWE which is supposed to plot the contour line for `pi / 4` only. It plots `pi / 4` alright, but also `pi`.\r\n```python\r\nimport numpy as np\r\nimport matplotlib.pyplot as plt\r\n\r\nxmin, xmax = -3.0, 3.0\r\nymin, ymax = -3.0, 3.0\r\nnx, ny = 500, 500\r\n\r\nx = np.linspace(xmin, xmax, nx)\r\ny = np.linspace(ymin, ymax, ny)\r\nX, Y = np.meshgrid(x, y)\r\nfZ = np.angle(X + 1j * Y)\r\n\r\nplt.contour(X, Y, fZ, levels=[0.25 * np.pi], colors=\"k\")\r\nplt.gca().set_aspect(\"equal\")\r\nplt.show()\r\n```\r\n\r\n\r\nThis is with mpl 3.4.2.\r\n\r\n_Edit:_ A very similar report is [on stackoverflow](https://stackoverflow.com/q/16197171/353337).","author":{"url":"https://github.com/nschloe","@type":"Person","name":"nschloe"},"datePublished":"2021-06-30T08:49:30.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":5},"url":"https://github.com/20548/matplotlib/issues/20548"}
| 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:aa380ca9-d0bc-2f40-fbf3-24adfdb32a40 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | B274:E49D9:1C91505:26FE0F5:6A6088CB |
| html-safe-nonce | 3e852e55f809a6269bfaf61c9bd639ae23903453a8dc11fa9cdb8ee1f45313cc |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJCMjc0OkU0OUQ5OjFDOTE1MDU6MjZGRTBGNTo2QTYwODhDQiIsInZpc2l0b3JfaWQiOiIyNDcwOTEwMTc5MTIwNTQ4MDQzIiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0= |
| visitor-hmac | fb18fa33f8d853d78d064f724679ead85a46e67be09f6aa22e5962596bf40424 |
| hovercard-subject-tag | issue:933456597 |
| 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/20548/issue_layout |
| twitter:image | https://opengraph.githubassets.com/f934b8ab58214a4f0ab58a9a6987f0c8e599e5fbcf852e07e8309651f29df2ac/matplotlib/matplotlib/issues/20548 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/f934b8ab58214a4f0ab58a9a6987f0c8e599e5fbcf852e07e8309651f29df2ac/matplotlib/matplotlib/issues/20548 |
| og:image:alt | I tried to get a contour plot of the complex angles of a particular function, but always got one level too many around zeros and infinities. Consider the following MWE which is supposed to plot the... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | nschloe |
| hostname | github.com |
| expected-hostname | github.com |
| None | 60da8c2a42fa2bbf5f7567474990ec467836a84444262a58e200fa91b7f3d2d0 |
| 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 | 9824515e740d83d5eb82168a089b806ab0fe04a1 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width