Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
core-man opened this issue Mar 24, 2021 · 1 comment · Fixed by #1258
Closed

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

core-man opened this issue Mar 24, 2021 · 1 comment · Fixed by #1258
Labels
deprecation Deprecating a feature
Milestone

Comments

@core-man
Copy link
Member

core-man commented Mar 24, 2021

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
@core-man core-man added the bug Something isn't working label Mar 24, 2021
@seisman
Copy link
Member

seisman commented Mar 25, 2021

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
deprecation Deprecating a feature
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants