You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Description for the "columns" arguments is missing #764
Please describe what could be improved about this page or the typo/mistake that you found:
I would suggest to add a short note regarding the supported syntax for the columns option when using e.g. a data file as input, something like
data (str or 2d array) – Either a data file name or a 2d numpy array with the tabular data. Use option columns (i) to choose which columns are x, y, color, and size, respectively (e.g. columns = [0, 1] if the x values are stored in the first column and y values in the second one, note: zero-based indexing is used).
I tried to fix that suggestion by my own following the instructions given in the Contributing Guidelines under Editing the Documentation, however, the corresponding .rst file is not available in the doc folder.
I would suggest to add a short note regarding the supported syntax for the columns option when using e.g. a data file as input, something like
data (str or 2d array) – Either a data file name or a 2d numpy array with the tabular data. Use option columns (i) to choose which columns are x, y, color, and size, respectively (e.g. columns = [0, 1] if the x values are stored in the first column and y values in the second one, note: zero-based indexing is used).
The description of the columns argument is missing. I think we should add an entry for the "columns" argument (like what for already have for zvalue, intensity), instead of explaining columns in the description of the data argument.
changed the title [-]Suggested improvement for api/generated/pygmt.Figure.plot[/-][+]Description for the "columns" arguments is missing[/+]on Dec 26, 2020
Since renaming the alias for i will be a backwards incompatible break, I would suggest holding #1040 off until v0.4.0 (or we can go ahead with it since the alias already exists, just that it's undocumented in the API docstring).
Do we all agree that we should use incols rather than columns for -i? If so, we need to deprecate columns to incols using the deprecate_parameter decorator.
Do we all agree that we should use incols rather than columns for -i? If so, we need to deprecate columns to incols using the deprecate_parameter decorator.
incol or incols? GMT.jl allows for either I think, while GMT core uses incols. Didn't we have something about using singular instead of plural if possible?
Do we all agree that we should use incols rather than columns for -i? If so, we need to deprecate columns to incols using the deprecate_parameter decorator.
incol or incols? GMT.jl allows for either I think, while GMT core uses incols. Didn't we have something about using singular instead of plural if possible?
For reference, incols rather than incol in GMT core comes from the brief discussion in GenericMappingTools/gmt#4634. There are a few common options where PyGMT conventions differ from the current GMT long options (e.g., nodata). I will work on the organization-wide repo for 'canonical' long options, in case we want to suggest revisions to the current versions in GMT since they are still generally undocumented. Is it decided that PyGMT will only support one alias for each GMT option (in contrast to GMT.jl's strategy), with the exception of aliases that are in the deprecation process?
Activity
seisman commentedon Dec 25, 2020
The documentation is automatically generated from the docstrings in the Python codes, see
https://github.com/GenericMappingTools/pygmt/blob/master/pygmt/base_plotting.py#L649
The description of the
columnsargument is missing. I think we should add an entry for the "columns" argument (like what for already have forzvalue,intensity), instead of explainingcolumnsin the description of thedataargument.michaelgrund commentedon Dec 26, 2020
opened a pull request with the suggested changes (according to your comment @seisman ).
[-]Suggested improvement for api/generated/pygmt.Figure.plot[/-][+]Description for the "columns" arguments is missing[/+]weiji14 commentedon Mar 4, 2021
Reopening this because the "columns" description is missing for
plot3dat https://www.pygmt.org/dev/api/generated/pygmt.Figure.plot3d.html.I'm marking this as a good first issue as it should be easy enough to just copy and paste the "columns" description from https://github.com/GenericMappingTools/pygmt/blob/v0.3.0/pygmt/src/plot.py to https://github.com/GenericMappingTools/pygmt/blob/v0.3.0/pygmt/src/plot3d.py.
seisman commentedon Mar 12, 2021
I'm not sure if we discussed it before (github search shows nothing). Is "columns" a good alias for -i option?
GMT provides both -i and -o, for selecting columns of input and output, respectively (see https://docs.generic-mapping-tools.org/latest/std-opts.html).
GMT uses
incolsandoutcolsfor their long options (see https://github.com/GenericMappingTools/gmt/blob/master/src/gmt_common_longoptions.h).Should we follow the GMT convention? If we choose
columnsfor -i, what can we use for -o?weiji14 commentedon Mar 12, 2021
I think the comment you're looking for is this:
Originally posted by @seisman in #666 (comment)
We kept
columnsas the alias foribecausecontouruses it too:Originally posted by @weiji14 in #666 (comment)
Since renaming the alias for
iwill be a backwards incompatible break, I would suggest holding #1040 off until v0.4.0 (or we can go ahead with it since the alias already exists, just that it's undocumented in the API docstring).seisman commentedon Mar 12, 2021
Great searching skills! 😃
Yes to me.
willschlitzer commentedon Mar 12, 2021
Sounds good. I'll update the milestone on it.
seisman commentedon May 7, 2021
Do we all agree that we should use
incolsrather thancolumnsfor -i? If so, we need to deprecatecolumnstoincolsusing thedeprecate_parameterdecorator.weiji14 commentedon May 7, 2021
incolorincols? GMT.jl allows for either I think, while GMT core usesincols. Didn't we have something about using singular instead of plural if possible?maxrjones commentedon May 7, 2021
For reference,
incolsrather thanincolin GMT core comes from the brief discussion in GenericMappingTools/gmt#4634. There are a few common options where PyGMT conventions differ from the current GMT long options (e.g.,nodata). I will work on the organization-wide repo for 'canonical' long options, in case we want to suggest revisions to the current versions in GMT since they are still generally undocumented. Is it decided that PyGMT will only support one alias for each GMT option (in contrast to GMT.jl's strategy), with the exception of aliases that are in the deprecation process?weiji14 commentedon May 26, 2021
Ok, let's go with
incolsthen as per GenericMappingTools/gmt#4634 (comment) and #764 (comment). Best to have PyGMT follow upstream GMT if a long option name already exists as in this case. I know Meghan started some work at https://github.com/GenericMappingTools/long-options and we should follow that thread closely for new alias naming conventions.Figure.plot: Deprecate parameter "columns" to "incols" (remove in v0.…