René's URL Explorer Experiment


Title: [Annotations] ValueError: lines do not intersect when computing tight bounding box containing arrow with filled paths · Issue #12820 · matplotlib/matplotlib · GitHub

Open Graph Title: [Annotations] ValueError: lines do not intersect when computing tight bounding box containing arrow with filled paths · Issue #12820 · matplotlib/matplotlib

X Title: [Annotations] ValueError: lines do not intersect when computing tight bounding box containing arrow with filled paths · Issue #12820 · matplotlib/matplotlib

Description: Bug report During computation of tight_layout of subplots containing a histogram one gets a ValueError in bezier.py:35: Given lines do not intersect. Please verify that the angles are not equal or differ by 180 degrees. Could be related ...

Open Graph Description: Bug report During computation of tight_layout of subplots containing a histogram one gets a ValueError in bezier.py:35: Given lines do not intersect. Please verify that the angles are not equal or ...

X Description: Bug report During computation of tight_layout of subplots containing a histogram one gets a ValueError in bezier.py:35: Given lines do not intersect. Please verify that the angles are not equal or ...

Opengraph URL: https://github.com/matplotlib/matplotlib/issues/12820

X: @github

direct link

Domain: github.com


Hey, it has json ld scripts:
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"[Annotations] ValueError: lines do not intersect when computing tight bounding box containing arrow with filled paths","articleBody":"\r\n\u003c!--To help us understand and resolve your issue, please fill out the form to the best of your ability.--\u003e\r\n\u003c!--You can feel free to delete the sections that do not apply.--\u003e\r\n\r\n### Bug report\r\n\r\nDuring computation of tight_layout of subplots containing a histogram one gets a ValueError in bezier.py:35: Given lines do not intersect. Please verify that the angles are not equal or differ by 180 degrees.\r\n\r\nCould be related to #6076\r\n\r\n\u003c!--A short 1-2 sentences that succinctly describes the bug--\u003e\r\n\r\nSee the attached script and csv files to reproduce the bug. I have marked three FIXME code lines, that are all conditions for the bug to be triggered.\r\n\r\n1. use subplots with more than one axes.\r\n2. use annotations with an arrowprops argument.\r\n\r\nThis seems to be a regression in matplotlib 3, since the LTS version is running fine.\r\n\r\ntest files: [files.zip](https://github.com/matplotlib/matplotlib/files/2589658/files.zip)\r\n```python\r\nimport matplotlib.pyplot as plt\r\nimport numpy as np\r\n\r\n\r\ndef plot_1D_histogram_trajectories(data, centers=None,dtrajs=None, max_traj_length=200, ax=None):\r\n    for n, _traj in enumerate(data):\r\n        ax.hist(_traj, bins=30, alpha=.33, density=True, color='C{}'.format(n))\r\n    ylims = ax.get_ylim()\r\n    xlims = ax.get_xlim()\r\n\r\n    for n, _traj in enumerate(data):\r\n        ax.plot(\r\n            _traj[:min(len(_traj), max_traj_length)],\r\n            np.linspace(*ylims, min(len(_traj), max_traj_length)),\r\n            alpha=0.6, color='C{}'.format(n), label='traj {}'.format(n))\r\n        ax.plot(\r\n                centers[dtrajs[n][:min(len(_traj), max_traj_length)]],\r\n                np.linspace(*ylims, min(len(_traj), max_traj_length)),\r\n                '.-', alpha=.6, label='dtraj {}'.format(n), linewidth=.3)\r\n    ax.annotate(\r\n        '', xy=(0.85 * xlims[1], 0.7 * ylims[1]), xytext=(0.85 * xlims[1], 0.3 * ylims[1]),\r\n        # FIXME: if one omits this argument, it succeeds\r\n        arrowprops=dict(),\r\n    )\r\n    ax.text(0.86 * xlims[1], 0.5 * ylims[1], '$x(time)$', ha='left', va='center', rotation=90)\r\n    ax.legend(loc=2)\r\n\r\n# FIXME: if only one subfigure is created it succeeds\r\nfig, axes = plt.subplots(1, 2, figsize=(10, 4))\r\ndata = [np.loadtxt('data.csv')]\r\ndtraj = np.loadtxt('dtraj.csv').astype(int)\r\ncenters = np.loadtxt('centers.csv')\r\n\r\nplot_1D_histogram_trajectories(data, centers=centers, dtrajs=[dtraj], ax=axes[0])\r\naxes[1].plot(x=np.arange(10), y=np.arange(10))\r\nfig.tight_layout()\r\n```\r\nleads to\r\n```\r\n  File \"/home/mi/marscher/sources/pyemma_tutorials/notebooks/minimal_example.py\", line 34, in \u003cmodule\u003e\r\n    fig.tight_layout()\r\n  File \"/srv/public/marscher/miniconda3/envs/nbtut/lib/python3.6/site-packages/matplotlib/figure.py\", line 2374, in tight_layout\r\n    pad=pad, h_pad=h_pad, w_pad=w_pad, rect=rect)\r\n  File \"/srv/public/marscher/miniconda3/envs/nbtut/lib/python3.6/site-packages/matplotlib/tight_layout.py\", line 366, in get_tight_layout_figure\r\n    pad=pad, h_pad=h_pad, w_pad=w_pad)\r\n  File \"/srv/public/marscher/miniconda3/envs/nbtut/lib/python3.6/site-packages/matplotlib/tight_layout.py\", line 115, in auto_adjust_subplotpars\r\n    tight_bbox_raw = union([ax.get_tightbbox(renderer) for ax in subplots\r\n  File \"/srv/public/marscher/miniconda3/envs/nbtut/lib/python3.6/site-packages/matplotlib/tight_layout.py\", line 116, in \u003clistcomp\u003e\r\n    if ax.get_visible()])\r\n  File \"/srv/public/marscher/miniconda3/envs/nbtut/lib/python3.6/site-packages/matplotlib/axes/_base.py\", line 4396, in get_tightbbox\r\n    bbox = a.get_tightbbox(renderer)\r\n  File \"/srv/public/marscher/miniconda3/envs/nbtut/lib/python3.6/site-packages/matplotlib/artist.py\", line 271, in get_tightbbox\r\n    bbox = self.get_window_extent(renderer)\r\n  File \"/srv/public/marscher/miniconda3/envs/nbtut/lib/python3.6/site-packages/matplotlib/text.py\", line 2425, in get_window_extent\r\n    bboxes.append(self.arrow_patch.get_window_extent())\r\n  File \"/srv/public/marscher/miniconda3/envs/nbtut/lib/python3.6/site-packages/matplotlib/patches.py\", line 548, in get_window_extent\r\n    return self.get_path().get_extents(self.get_transform())\r\n  File \"/srv/public/marscher/miniconda3/envs/nbtut/lib/python3.6/site-packages/matplotlib/patches.py\", line 4228, in get_path\r\n    _path, fillable = self.get_path_in_displaycoord()\r\n  File \"/srv/public/marscher/miniconda3/envs/nbtut/lib/python3.6/site-packages/matplotlib/patches.py\", line 4258, in get_path_in_displaycoord\r\n    self.get_mutation_aspect())\r\n  File \"/srv/public/marscher/miniconda3/envs/nbtut/lib/python3.6/site-packages/matplotlib/patches.py\", line 3218, in __call__\r\n    return self.transmute(path, mutation_size, linewidth)\r\n  File \"/srv/public/marscher/miniconda3/envs/nbtut/lib/python3.6/site-packages/matplotlib/patches.py\", line 3718, in transmute\r\n    tail_width / 2.)\r\n  File \"/srv/public/marscher/miniconda3/envs/nbtut/lib/python3.6/site-packages/matplotlib/bezier.py\", line 381, in get_parallels\r\n    cos_t2, sin_t2)\r\n  File \"/srv/public/marscher/miniconda3/envs/nbtut/lib/python3.6/site-packages/matplotlib/bezier.py\", line 35, in get_intersection\r\n    raise ValueError(\"Given lines do not intersect. Please verify that \"\r\nValueError: Given lines do not intersect. Please verify that the angles are not equal or differ by 180 degrees.\r\n```\r\n\r\n**Expected outcome**\r\n\r\nIt works, if the arrowprops are omitted, which means not to draw an arrow.\r\n\r\n**Matplotlib version**\r\n\r\n  * Operating system: linux64\r\n  * Matplotlib version: 3.0.2\r\n  * Matplotlib backend (`print(matplotlib.get_backend())`): module://backend_interagg\r\n  * Python version: 3.6\r\n  * Other libraries: see attached [conda_list.txt](https://github.com/matplotlib/matplotlib/files/2589659/conda_list.txt)\r\n\r\nInstalled with conda from conda-forge.\r\n\r\n","author":{"url":"https://github.com/marscher","@type":"Person","name":"marscher"},"datePublished":"2018-11-16T14:37:12.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":17},"url":"https://github.com/12820/matplotlib/issues/12820"}

route-pattern/_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format)
route-controllervoltron_issues_fragments
route-actionissue_layout
fetch-noncev2:491fa9e6-6562-65bf-c878-49a769fe2acd
current-catalog-service-hash81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114
request-id9FCE:32BAC1:498535:62EE54:6A5296D5
html-safe-noncefa9c10176be325e92a03a3ecbdad5439660645abd92a78680759992fffe2c341
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI5RkNFOjMyQkFDMTo0OTg1MzU6NjJFRTU0OjZBNTI5NkQ1IiwidmlzaXRvcl9pZCI6IjkxMjU5MjE5NDUxMTE2NjQzNDEiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ==
visitor-hmac45f3c3badde5a613032f43569aef6483931aeb6a384bda3bacd397d05188d7ee
hovercard-subject-tagissue:381624938
github-keyboard-shortcutsrepository,issues,copilot
google-site-verificationApib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I
octolytics-urlhttps://collector.github.com/github/collect
analytics-location///voltron/issues_fragments/issue_layout
fb:app_id1401488693436528
apple-itunes-appapp-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/matplotlib/matplotlib/12820/issue_layout
twitter:imagehttps://opengraph.githubassets.com/076842c3fc1c9b4e2fe637d6c00fe468d1c9b05574389a78587f9961236d9d18/matplotlib/matplotlib/issues/12820
twitter:cardsummary_large_image
og:imagehttps://opengraph.githubassets.com/076842c3fc1c9b4e2fe637d6c00fe468d1c9b05574389a78587f9961236d9d18/matplotlib/matplotlib/issues/12820
og:image:altBug report During computation of tight_layout of subplots containing a histogram one gets a ValueError in bezier.py:35: Given lines do not intersect. Please verify that the angles are not equal or ...
og:image:width1200
og:image:height600
og:site_nameGitHub
og:typeobject
og:author:usernamemarscher
hostnamegithub.com
expected-hostnamegithub.com
Noneb9a586c06a05a7a86fc7e3f4dbd03e42f6869085879aa184aa6369456dbd50fb
turbo-cache-controlno-preview
go-importgithub.com/matplotlib/matplotlib git https://github.com/matplotlib/matplotlib.git
octolytics-dimension-user_id215947
octolytics-dimension-user_loginmatplotlib
octolytics-dimension-repository_id1385122
octolytics-dimension-repository_nwomatplotlib/matplotlib
octolytics-dimension-repository_publictrue
octolytics-dimension-repository_is_forkfalse
octolytics-dimension-repository_network_root_id1385122
octolytics-dimension-repository_network_root_nwomatplotlib/matplotlib
turbo-body-classeslogged-out env-production page-responsive
disable-turbofalse
browser-stats-urlhttps://api.github.com/_private/browser/stats
browser-errors-urlhttps://api.github.com/_private/browser/errors
release07a982c1d40157c619b364352b704c3ce66bb332
ui-targetfull
theme-color#1e2327
color-schemelight dark

Links:

Skip to contenthttps://github.com/matplotlib/matplotlib/issues/12820#start-of-content
https://github.com/
Sign in https://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fmatplotlib%2Fmatplotlib%2Fissues%2F12820
GitHub CopilotWrite better code with AIhttps://github.com/features/copilot
GitHub Copilot appDirect agents from issue to mergehttps://github.com/features/ai/github-app
MCP RegistryNewIntegrate external toolshttps://github.com/mcp
ActionsAutomate any workflowhttps://github.com/features/actions
CodespacesInstant dev environmentshttps://github.com/features/codespaces
IssuesPlan and track workhttps://github.com/features/issues
Code ReviewManage code changeshttps://github.com/features/code-review
GitHub Advanced SecurityFind and fix vulnerabilitieshttps://github.com/security/advanced-security
Code securitySecure your code as you buildhttps://github.com/security/advanced-security/code-security
Secret protectionStop leaks before they starthttps://github.com/security/advanced-security/secret-protection
Why GitHubhttps://github.com/why-github
Documentationhttps://docs.github.com
Bloghttps://github.blog
Changeloghttps://github.blog/changelog
Marketplacehttps://github.com/marketplace
View all featureshttps://github.com/features
Enterpriseshttps://github.com/enterprise
Small and medium teamshttps://github.com/team
Startupshttps://github.com/enterprise/startups
Nonprofitshttps://github.com/solutions/industry/nonprofits
App Modernizationhttps://github.com/solutions/use-case/app-modernization
DevSecOpshttps://github.com/solutions/use-case/devsecops
DevOpshttps://github.com/solutions/use-case/devops
CI/CDhttps://github.com/solutions/use-case/ci-cd
View all use caseshttps://github.com/solutions/use-case
Healthcarehttps://github.com/solutions/industry/healthcare
Financial serviceshttps://github.com/solutions/industry/financial-services
Manufacturinghttps://github.com/solutions/industry/manufacturing
Governmenthttps://github.com/solutions/industry/government
View all industrieshttps://github.com/solutions/industry
View all solutionshttps://github.com/solutions
AIhttps://github.com/resources/articles?topic=ai
Software Developmenthttps://github.com/resources/articles?topic=software-development
DevOpshttps://github.com/resources/articles?topic=devops
Securityhttps://github.com/resources/articles?topic=security
View all topicshttps://github.com/resources/articles
Customer storieshttps://github.com/customer-stories
Events & webinarshttps://github.com/resources/events
Ebooks & reportshttps://github.com/resources/whitepapers
Business insightshttps://github.com/solutions/executive-insights
GitHub Skillshttps://skills.github.com
Documentationhttps://docs.github.com
Customer supporthttps://support.github.com
Community forumhttps://github.com/orgs/community/discussions
Trust centerhttps://github.com/trust-center
Partnershttps://github.com/partners
View all resourceshttps://github.com/resources
GitHub SponsorsFund open source developershttps://github.com/open-source/sponsors
Security Labhttps://securitylab.github.com
Maintainer Communityhttps://maintainers.github.com
Acceleratorhttps://github.com/open-source/accelerator
GitHub Starshttps://stars.github.com
Archive Programhttps://archiveprogram.github.com
Topicshttps://github.com/topics
Trendinghttps://github.com/trending
Collectionshttps://github.com/collections
Enterprise platformAI-powered developer platformhttps://github.com/enterprise
GitHub Advanced SecurityEnterprise-grade security featureshttps://github.com/security/advanced-security
Copilot for BusinessEnterprise-grade AI featureshttps://github.com/features/copilot/copilot-business
Premium SupportEnterprise-grade 24/7 supporthttps://github.com/enterprise/premium-support
Pricinghttps://github.com/pricing
Search syntax tipshttps://docs.github.com/search-github/github-code-search/understanding-github-code-search-syntax
documentationhttps://docs.github.com/search-github/github-code-search/understanding-github-code-search-syntax
Sign in https://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fmatplotlib%2Fmatplotlib%2Fissues%2F12820
Sign up https://github.com/signup?ref_cta=Sign+up&ref_loc=header+logged+out&ref_page=%2F%3Cuser-name%3E%2F%3Crepo-name%3E%2Fvoltron%2Fissues_fragments%2Fissue_layout&source=header-repo&source_repo=matplotlib%2Fmatplotlib
Reloadhttps://github.com/matplotlib/matplotlib/issues/12820
Reloadhttps://github.com/matplotlib/matplotlib/issues/12820
Reloadhttps://github.com/matplotlib/matplotlib/issues/12820
Please reload this pagehttps://github.com/matplotlib/matplotlib/issues/12820
matplotlib https://github.com/matplotlib
matplotlibhttps://github.com/matplotlib/matplotlib
Please reload this pagehttps://github.com/matplotlib/matplotlib/issues/12820
Notifications https://github.com/login?return_to=%2Fmatplotlib%2Fmatplotlib
Fork 8.4k https://github.com/login?return_to=%2Fmatplotlib%2Fmatplotlib
Star 23k https://github.com/login?return_to=%2Fmatplotlib%2Fmatplotlib
Code https://github.com/matplotlib/matplotlib
Issues 1.1k https://github.com/matplotlib/matplotlib/issues
Pull requests 408 https://github.com/matplotlib/matplotlib/pulls
Actions https://github.com/matplotlib/matplotlib/actions
Projects https://github.com/matplotlib/matplotlib/projects
Wiki https://github.com/matplotlib/matplotlib/wiki
Security and quality 0 https://github.com/matplotlib/matplotlib/security
Insights https://github.com/matplotlib/matplotlib/pulse
Code https://github.com/matplotlib/matplotlib
Issues https://github.com/matplotlib/matplotlib/issues
Pull requests https://github.com/matplotlib/matplotlib/pulls
Actions https://github.com/matplotlib/matplotlib/actions
Projects https://github.com/matplotlib/matplotlib/projects
Wiki https://github.com/matplotlib/matplotlib/wiki
Security and quality https://github.com/matplotlib/matplotlib/security
Insights https://github.com/matplotlib/matplotlib/pulse
#16682https://github.com/matplotlib/matplotlib/pull/16682
[Annotations] ValueError: lines do not intersect when computing tight bounding box containing arrow with filled pathshttps://github.com/matplotlib/matplotlib/issues/12820#top
#16682https://github.com/matplotlib/matplotlib/pull/16682
v3.2.1https://github.com/matplotlib/matplotlib/milestone/49
https://github.com/marscher
marscherhttps://github.com/marscher
on Nov 16, 2018https://github.com/matplotlib/matplotlib/issues/12820#issue-381624938
#6076https://github.com/matplotlib/matplotlib/issues/6076
files.ziphttps://github.com/matplotlib/matplotlib/files/2589658/files.zip
conda_list.txthttps://github.com/matplotlib/matplotlib/files/2589659/conda_list.txt
v3.2.1https://github.com/matplotlib/matplotlib/milestone/49
https://github.com
Termshttps://docs.github.com/site-policy/github-terms/github-terms-of-service
Privacyhttps://docs.github.com/site-policy/privacy-policies/github-privacy-statement
Securityhttps://github.com/security
Statushttps://www.githubstatus.com/
Communityhttps://github.community/
Docshttps://docs.github.com/
Contacthttps://support.github.com?tags=dotcom-footer

Viewport: width=device-width


URLs of crawlers that visited me.