Skip to content

[Doc]: .set_linestyle() tuple method is unclear #26784

@pawjast

Description

@pawjast

Documentation Link

https://matplotlib.org/stable/api/_as_gen/matplotlib.patches.Patch.html#matplotlib.patches.Patch.set_linestyle

Problem

I looked up a method for setting plot's spine line style to a custom dash and my lazy eye caught what I highlighted in yellow:

image

I tried this and naturally I got an error:

image

Only after googling some example and reading the doc very carefully I noticed the correct way to change the line style:

image

Suggested improvement

I think the doc should be re-written so it's more explicit:

Alternatively a dash tuple of the following form can be provided:

(offset, (off_ink, on_ink))

Where:

  • offset: definition
  • on_ink/off_ink: definition

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      pFad - Phonifier reborn

      Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

      Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


      Alternative Proxies:

      Alternative Proxy

      pFad Proxy

      pFad v3 Proxy

      pFad v4 Proxy