Add common alias panel (-c) to all plotting functions#853
Conversation
Used to advance to the selected subplot panel. See https://docs.generic-mapping-tools.org/6.1/gmt.html#c-full, https://github.com/GenericMappingTools/gmt/blob/6.1.1/doc/rst/source/explain_-c_full.rst_, and https://docs.generic-mapping-tools.org/6.1/cookbook/options.html#selecting-subplot-panels-the-c-option. Needed for the `subplot` wrapper at #822. Also added 'ax' to good-names list in pylintrc file.
I'm OK with both, although I prefer
I think it doesn't work, to call |
|
I also find this (https://matplotlib.org/tutorials/intermediate/artists.html):
If I understand it correctly, GMT's subplots also live on a regular rows by columns grid, so it should be called |
Oh, and just FYI, there's a Python library called Panel for making dashboards (i.e. interactive subplots). To be fair, I don't really get the "axes" and "axis" terminology used by matplotlib either, "axes" should be the plural of "axis" but they don't use it that way.
Ok, will leave out
Not sure if it's a good idea to use 'subplot' as an alias for 'c' (if that's what you mean). We'll hit into the same problem as with With all that said, I would still argue that using |
Yes, I agree,
|
|
Little late to the party, but my vote would be |
Ok, if we want to go with |
I think |
|
Co-Authored-By: Dongdong Tian <seisman.info@gmail.com>
…Tools#853) Used to select a specific subplot panel. See https://docs.generic-mapping-tools.org/6.1/gmt.html#c-full, https://github.com/GenericMappingTools/gmt/blob/6.1.1/doc/rst/source/explain_-c_full.rst_, and https://docs.generic-mapping-tools.org/6.1/cookbook/options.html#selecting-subplot-panels-the-c-option. Needed for the `subplot` wrapper at GenericMappingTools#822. * Add panel (c) to list of necessary arguments in basemap * Rename alias ax to panel to follow upstream GMT * Update description of common alias c to be more Pythonic Co-authored-by: Dongdong Tian <seisman.info@gmail.com>
Description of proposed changes
Used to advance to the selected subplot panel. See https://docs.generic-mapping-tools.org/6.1/gmt.html#c-full,
https://github.com/GenericMappingTools/gmt/blob/6.1.1/doc/rst/source/explain_-c_full.rst_, and https://docs.generic-mapping-tools.org/6.1/cookbook/options.html#selecting-subplot-panels-the-c-option. Needed for the
subplotwrapper at #822 to resolve issue #20.Questions:
Just confirming that we want to go withOk, going withax(as with matplotlib) rather thanpanel(used by GMT). See Wrap subplot using with statement #822 (comment).panel-cworks oninset(https://docs.generic-mapping-tools.org/6.1/inset.html), i.e. putting an inset in a subplot panel. If it works, then I'll add the alias to thepygmt/src/inset.pyfile.This can be merged before #822 to reduce the diff there.
Reminders
make formatandmake checkto make sure the code follows the style guide.doc/api/index.rst.Slash Commands
You can write slash commands (
/command) in the first line of a comment to performspecific operations. Supported slash commands are:
/format: automatically format and lint the code/test-gmt-dev: run full tests on the latest GMT development version