Skip to content

MNT: Discourage alternate strings for 'none' linestyle#29343

Merged
story645 merged 1 commit into
matplotlib:mainfrom
timhoffm:mnt-discourage-linestyle
Dec 19, 2024
Merged

MNT: Discourage alternate strings for 'none' linestyle#29343
story645 merged 1 commit into
matplotlib:mainfrom
timhoffm:mnt-discourage-linestyle

Conversation

@timhoffm

@timhoffm timhoffm commented Dec 18, 2024

Copy link
Copy Markdown
Member

Inspired by but independent of the discussion around the representation of linestyles #29304.

For other linestyles we have a short visual representation (e.g. "--") and a name (e.g."dashed"). "No linestyle" currently has four accepted writings "", " ", "none", "None".

This PR recommends only to use "" (visual representation) and "none" (named representation). It discourages " " and "None". This should guide users towards more canonical usage. We may later decide whether to deprecate the alternatives.

Note also, that we have not used the alternatives in examples.

@timhoffm timhoffm added Maintenance API: consistency Consistency of the matplotlib API, including naming, behavior, defaults, … labels Dec 18, 2024
Comment thread lib/matplotlib/inset.py Outdated
Inspired by but independent of the discussion around the representation of linestyles matplotlib#29304.

For other linestyles we have a short visual representation (e.g. "--") and a name (dashed "dashed"). No linestyle currently has four accepted writings "", " ", "none", "None".

This PR recommends only to use "" (visual representation) and "none" (named representation). It discourages " " and "None".  This should guide users towards more canonical usage. We may later decide whether to deprecate the alternatives.

Note also, that we have not used the alternatives in examples.
@timhoffm timhoffm force-pushed the mnt-discourage-linestyle branch from 39c609f to 55320d3 Compare December 19, 2024 08:26
@QuLogic QuLogic added this to the v3.11.0 milestone Dec 19, 2024
@story645 story645 merged commit a18354a into matplotlib:main Dec 19, 2024
@timhoffm timhoffm deleted the mnt-discourage-linestyle branch December 19, 2024 12:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

API: consistency Consistency of the matplotlib API, including naming, behavior, defaults, … Maintenance

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants