Skip to content

[MNT]: document linestyle as an mpltype #28745

Open

Description

@story645

Summary

The manual docs for linestyle in #27996 have me thinking of the ideas in #18664 and that we can do a simplified version of this using :mpltypes and _docstring.interp that we can then use to have a consistent way to document linestyle across the library.

Proposed fix

  1. Make something the following table linestyle_doc for _docstyle.interpd:
              ==========================================  =================
              linestyle                                   description
              ==========================================  =================
              ``'-'``  ``'solid'``                      solid line
              ``'--'`` or  ``'dashed'``                   dashed line
              ``'-.'`` or  ``'dashdot'``                  dash-dotted line
              ``':'`` or ``'dotted'``                     dotted line
              ``'none'``, ``'None'``, ``' '``, or ``''``  draw nothing
              ==========================================  =================
  1. Add something like that table to linestyles reference (apparently can't reuse the interp in examples :/)
  2. Add linestyles and a link to the linestyles reference to
    type_to_link_target = {
    'color': 'colors_def',
    }

Activity

  1. timhoffm commented on Aug 22, 2024

    @timhoffm
    Member

    To be clear, the purpose of :mpltype: is to create links for type-like concepts that do not have a direct class representation. Linestyle does fall into this category. The usage should be weighted; disadvantage: indirection, advantage: concise description.

    Note that mpltype and interpolation are independent concepts.

  2. story645 commented on Aug 22, 2024

    @story645
    MemberAuthor

    Note that mpltype and interpolation are independent concepts

    Yeah, and I debated pulling out the interpolation request here b/c I think just defining it as an mpltype and cleaning up the reference page should work here.

    But they're also both ways of building canonical/source of truth docs & I think it'd improve consistency if we could move to that for things that are reused all over the place.

  3. amishamehta99 commented on Mar 14, 2026

    @amishamehta99
    Contributor

    Hi @story645

    Note that mpltype and interpolation are independent concepts

    Yeah, and I debated pulling out the interpolation request here b/c I think just defining it as an mpltype and cleaning up the reference page should work here.

    But they're also both ways of building canonical/source of truth docs & I think it'd improve consistency if we could move to that for things that are reused all over the place.

    Hi! I’m interested in working on this issue.
    From my understanding, the task is to document linestyle using :mpltype: and add a reference table in the linestyles documentation for consistency across the library.

    Please let me know if this issue is still available or if there is a specific part you would recommend starting with. I’d be happy to contribute.

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

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions