Skip to content

Remove the xshift (X) and yshift (Y) aliases from all plotting modules? #924

Closed
@seisman

Description

@seisman

In the Zen of Python:

There should be one-- and preferably only one --obvious way to do it.

Now we have two different methods to shift origins:

  1. passing arguments like xshift="2c", yshift="1c" to any plotting modules
  2. explicitly call Figure.shift_origin(xshift="2c", yshift="1c")

GMT users are familiar with method 1, but IMHO method 2 is more pythonic. As I can see, these two methods are equivalent.

Should we remove xshift and yshift from all plotting modules, so that we can better follow the zen of python, and also make the docstrings shorter.

If yes, we need to do more things:

  1. Remove xshift and yshift alias from docstrings of all plotting functions
  2. Raise a warning/error if xshift, yshift, X or Y is passed.
  3. Improve the docstrings of Figure.shift_origin().

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementImproving an existing feature

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions