Skip to content

Rename the sizes parameter in plot/plot3d to be size #1118

Closed

Description

@core-man

Description of the problem

Both plot and plot3d have the sizes parameter that are used to plot symbols with different sizes. However, size is used in GMT documentation. Shall we rename this parameter to be size? If yes, I think we should do it as early as possible cause this parameter is often used in PyGMT.

Originally posted in #1076 (comment):

like the sizes parameter (I dont' understand why we add a s at the end) of the plot/plot3d method

plot is one of the oldest wrappers in PyGMT, and the parameters are not carefully chosen. We had some discussions in the GMT Community meeting, and I think we agree that we will change sizes to size.


See the format of the -S option in GMT plot:

x y [ z ] [ size ] [ symbol-parameters ] [ symbol ]

See the format of the -S option in GMT plot3d:

x y z [ w ] [ size ] [ symbol-parameters ] [ symbol ]

GMT plot PyGMT plot GMT plot3d PyGMT plot3d
z color w color
size sizes size sizes
intensity intensity intensity intensity
symbol symbol (requested in #1076) symbol symbol (requested in #1076)

Now, sizes is used in the following files:

  • src/plot.py
  • tests/test_plot.py
  • examples/tutorials/plot.py
  • examples/gallery/symbols/scatter.py
  • examples/gallery/symbols/points_categorical.py
  • src/plot3d.py
  • tests/test_plot3d.py
  • examples/gallery/3d_plots/scatter3d.py

Activity

  1. added
    bug
    on Mar 24, 2021
  2. seisman commented on Mar 25, 2021

    @seisman
    Member

    As the sizes parameter is used a lot, we should be careful with backward-compatibility.

  3. added
    deprecation
    and removed
    bug
    on Mar 25, 2021
  4. added this to the 0.4.0 milestone on May 7, 2021
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

    deprecation

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions