Skip to content

Figure.hlines/Figure.vlines: Plot horizontal/vertical lines #4546

Description

@seisman

This issue serves as the central place for discussing and tracking the implementation of the hlines and vlines methods in PyGMT. The issue will be closed when the initial implementation is complete. Progress is tracked at PyGMT: Wrapping GMT modules.

Documentation

Parameters

☑️: Implemented; ⬜: To be implemented/discussed; Strikethrough: Won't implement.

Figure.hlines and Figure.vlines are high-level PyGMT wrappers around Figure.plot (which internally uses GMT's plot module). They expose the following subset of Figure.plot parameters:

Notes

Figure.hlines plots horizontal lines at specified Y-coordinates; Figure.vlines plots vertical lines at specified X-coordinates. Both methods internally call Figure.plot with straight_line="x" or straight_line="y" respectively, and resample to at least 4 points to support geographic/polar projections.

The term "horizontal"/"vertical" differs by coordinate system:

  • Cartesian: straight lines
  • Polar: arcs along constant radius / straight lines along constant azimuth
  • Geographic: arcs along parallels (constant latitude) / meridians (constant longitude)

Linked Pull Requests

  • Initial feature implementation
  • Add a tutorial or gallery example

Related Issues and Discussions

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions