Skip to content

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

@core-man

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions