Skip to content

Incorrect kwargs handling in visualize_frame #108

Description

@IkumaUchida

Search before asking

  • I have searched the SoccerTrack issues and found no similar bug report.

SoccerTrack Component

Other

Bug

When visualizing codf, if the information of the marker of home_team is edited from the argument, it is also reflected in the marker information of away_team.

Environment

No response

Minimal Reproducible Example

For example, if home_kwargs is set as follows, the output will be as follows

...

codf.visualize_frame(1, 
                ball_key="BALL", 
                home_kwargs={"zorder": 10, "ms": 10, "markerfacecolor": "w"},
)

...

codf_outpy

Additional

Simply modify the visualize_frame function in cofinatesdataframe.py slightly.

before

        _away_kwargs = merge_dicts(
            _marker_kwargs,
            {"zorder": 10, "ms": 10, "markerfacecolor": "r"},
            marker_kwargs,
            home_kwargs,
        )

after

        _away_kwargs = merge_dicts(
            _marker_kwargs,
            {"zorder": 10, "ms": 10, "markerfacecolor": "r"},
            marker_kwargs,
            away_kwargs,
        )

Are you willing to submit a PR?

  • Yes I'd like to help by submitting a PR!

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions