Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Double specifications of plot attributes #19275

Closed
@malinkallen

Description

@malinkallen

Describe the issue

As a part of a research project, me and two co-authors have been mining GitHub for Jupyter notebooks and studied a number of frequent function calls in the notebooks. It appears that color is specified both using fmt and color in 125 different calls to matplotlib.pyplot.plot. Out of these, 120 calls specify different colors using the two different parameters. In worst case, this could lead to users studying the wrong curve in their plots, drawing incorrect conclusions. I think it would be good if the user got an indication that the value is specified twice. A similar indication when both fmt and marker/linestyle are used to specify marker/line style could also be helpful!

Summary
Users may specify attributes using both fmtand color/linestyle/marker, without getting to know about it.

Proposed fix

Issue an error or a warning when the color/line style/marker is specified using both fmtand color/linestyle/marker.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions