Skip to content
New issue

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

force_points key word removed? #169

Closed
Zethson opened this issue Jan 14, 2024 · 2 comments
Closed

force_points key word removed? #169

Zethson opened this issue Jan 14, 2024 · 2 comments

Comments

@Zethson
Copy link

Zethson commented Jan 14, 2024

The changelog is super short and I cannot see when or why force_points was removed as a keyword argument.


pertpy/tools/_scgen/_scgen.py:476: in plot_reg_mean_plot
    adjust_text(
/opt/hostedtoolcache/Python/3.11.7/x64/lib/python3.11/site-packages/adjustText/__init__.py:589: in adjust_text
    arrowpatch = FancyArrowPatch(
/opt/hostedtoolcache/Python/3.11.7/x64/lib/python3.11/site-packages/matplotlib/patches.py:4148: in __init__
    super().__init__(**kwargs)
/opt/hostedtoolcache/Python/3.11.7/x64/lib/python3.11/site-packages/matplotlib/patches.py:98: in __init__
    self._internal_update(kwargs)
/opt/hostedtoolcache/Python/3.11.7/x64/lib/python3.11/site-packages/matplotlib/artist.py:1219: in _internal_update
    return self._update_props(
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <matplotlib.patches.FancyArrowPatch object at 0x7fd7dcaaefd0>
props = {'force_points': (0.0, 0.0), 'lw': 0.5}
errfmt = '{cls.__name__}.set() got an unexpected keyword argument {prop_name!r}'

    def _update_props(self, props, errfmt):
        """
        Helper for `.Artist.set` and `.Artist.update`.
    
        *errfmt* is used to generate error messages for invalid property
        names; it gets formatted with ``type(self)`` and the property name.
        """
        ret = []
        with cbook._setattr_cm(self, eventson=False):
            for k, v in props.items():
                # Allow attributes we want to be able to update through
                # art.update, art.set, setp.
                if k == "axes":
                    ret.append(setattr(self, k, v))
                else:
                    func = getattr(self, f"set_{k}", None)
                    if not callable(func):
>                       raise AttributeError(
                            errfmt.format(cls=type(self), prop_name=k))
E                       AttributeError: FancyArrowPatch.set() got an unexpected keyword argument 'force_points'

What's the new solution to use force_points?

@Phlya
Copy link
Owner

Phlya commented Jan 14, 2024

There is now force_static, for both points and objects. Please see the docs for the new argument list: https://adjusttext.readthedocs.io/en/latest/

@Zethson
Copy link
Author

Zethson commented Jan 14, 2024

Thank you!

@Zethson Zethson closed this as completed Jan 14, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants