We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
In Matplotlib 3.6, most arguments to patches were made keyword-only with a deprecation. Starting with Matplotlib 3.8.0rc1, this test fails as the deprecations have been removed:
___________________________ test_tree_diameter_real ____________________________ get_fig_2d = (<Figure size 640x480 with 1 Axes>, <Axes: >) def test_tree_diameter_real(get_fig_2d): m = load_morphology(SWC_PATH / 'simple-different-section-types.swc') fig, ax = get_fig_2d tree = m.neurites[0] for input_color, expected_colors in tree_colors.items(): > matplotlib_impl.plot_tree(tree, ax, color=input_color, alpha=1., linewidth=1.2, realistic_diameters=True) tests/view/test_matplotlib_impl.py:65: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ ../../BUILDROOT/python-neurom-3.2.2-4.fc40.x86_64/usr/lib/python3.12/site-packages/neurom/view/matplotlib_impl.py:73: in wrapper res = plot_func(*args, **kwargs) ../../BUILDROOT/python-neurom-3.2.2-4.fc40.x86_64/usr/lib/python3.12/site-packages/neurom/view/matplotlib_impl.py:151: in plot_tree segs = [_get_rectangle((seg[0][plane0], seg[0][plane1]), _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ x = array([0., 0.]), y = array([0., 5.]), linewidth = 2.0 def _get_rectangle(x, y, linewidth): """Draw a rectangle to represent a secgment.""" x, y = np.array(x), np.array(y) diff = y - x angle = np.arctan2(diff[1], diff[0]) % (2 * np.pi) > return Rectangle(x - linewidth / 2. * np.array([-np.sin(angle), np.cos(angle)]), np.linalg.norm(diff), linewidth, np.rad2deg(angle)) E TypeError: Rectangle.__init__() takes 4 positional arguments but 5 were given ../../BUILDROOT/python-neurom-3.2.2-4.fc40.x86_64/usr/lib/python3.12/site-packages/neurom/view/matplotlib_impl.py:146: TypeError
The text was updated successfully, but these errors were encountered:
Wow, thanks for the heads up. We will have to look into the best way of handling this.
Sorry, something went wrong.
I believe passing it as angle=np.rad2deg(angle) should be sufficient.
angle=np.rad2deg(angle)
Successfully merging a pull request may close this issue.
In Matplotlib 3.6, most arguments to patches were made keyword-only with a deprecation. Starting with Matplotlib 3.8.0rc1, this test fails as the deprecations have been removed:
The text was updated successfully, but these errors were encountered: