FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

[Doc]: Clarify `offset` parameter in linestyle · Issue #23220 · matplotlib/matplotlib · GitHub

Repository navigation

[Doc]: Clarify offset parameter in linestyle #23220

Closed

Description

Documentation Link

https://matplotlib.org/stable/gallery/lines_bars_and_markers/linestyles.html

Problem

The offset parameter is not an additional "start length", but how much of the dash pattern that will not be shown the first time. Although none of these are explicitly stated in the documentation, several (at least two, including me) have interpreted this as the latter.

Suggested improvement

Try to explain this better somewhere, ideally including a detailed example (now, all examples have a zero offset).

Activity

  1. story645 commented on Jun 8, 2022

    Member

    The Postscript Reference Book page 667 https://www.adobe.com/jp/print/postscript/pdfs/PLRM.pdf

    The offset operand can be thought of as the “phase” of the dash pattern relative to
    the start of the path. It is interpreted as a distance into the dash pattern (measured
    in user space units) at which to start the pattern. Before beginning to stroke a
    path, the stroke operator cycles through the elements of array, adding up dis-
    tances and alternating dashes and gaps as usual, but without generating any out-
    put. When the accumulated distance reaches the value specified by offset, it begins
    stroking from the starting point of the path, using the dash pattern from the point
    that has been reached. Each subpath of a path is treated independently; the dash
    pattern is restarted and the offset reapplied at the beginning of each subpath.

  2. added this to the v3.6.0 milestone on Aug 15, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions


      Back | FazBrowse Home | New Git URL