GenericMappingTools / pygmt

A Python interface for the Generic Mapping Tools.
https://www.pygmt.org
BSD 3-Clause "New" or "Revised" License
758 stars 220 forks source link

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

Closed core-man closed 3 years ago

core-man commented 3 years ago

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 https://github.com/GenericMappingTools/pygmt/issues/1076#issuecomment-804986728:

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:

seisman commented 3 years ago

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