Skip to content

Allow passing an array as intensity for plot3d - #1109

Merged
seisman merged 8 commits into
GenericMappingTools:masterfrom
core-man:array-intensity-plot3d
Mar 24, 2021
Merged

seisman merged 8 commits into
GenericMappingTools:masterfrom
core-man:array-intensity-plot3d

Conversation

@core-man

@core-man core-man commented Mar 23, 2021 •

Copy link
Copy Markdown
Member

Description of proposed changes

Currently, we can have two ways to specify an intensity/intensities using the plot3d method.

  • Simply give a constant intensity like intensity=0.5, which works for both x/y/z and data input. This is similar to -I0.5 in the GMT command line.
  • Set intensity=True, and read intensities from an input file or from a 2D array, which is only for the data parameter. This is similar to -I in the GMT command line.

So, when we want to change the intensities for different points, we can only use the data parameter now. This PR tries to pass an array to intensity so that we can set different intensities when we use x/y/z as point input. This way will not work for data input.

Related to #891

Reminders

  • Run make format and make check to make sure the code follows the style guide.
  • Add tests for new features or tests that would have caught the bug that you're fixing.
  • Add new public functions/methods/classes to doc/api/index.rst.
  • Write detailed docstrings for all functions/methods.
  • If adding new functionality, add an example to docstrings or tutorials.

Slash Commands

You can write slash commands (/command) in the first line of a comment to perform
specific operations. Supported slash commands are:

  • /format: automatically format and lint the code
  • /test-gmt-dev: run full tests on the latest GMT development version

@core-man
core-man requested a review from seisman March 23, 2021 08:25
@weiji14 weiji14 added the enhancement Improving an existing feature label Mar 23, 2021
@weiji14 weiji14 changed the title Allow passing a array as intensity for plot3d Allow passing an array as intensity for plot3d Mar 23, 2021
@seisman seisman added this to the 0.4.0 milestone Mar 23, 2021
Comment thread pygmt/src/plot3d.py Resolved
Comment thread pygmt/tests/test_plot3d.py Resolved
@core-man
core-man marked this pull request as draft March 23, 2021 13:05
@core-man
core-man marked this pull request as ready for review March 23, 2021 13:09
Comment thread pygmt/tests/test_plot3d.py Resolved
Comment thread pygmt/tests/test_plot3d.py Resolved
@core-man
core-man marked this pull request as draft March 23, 2021 13:54
@seisman
seisman marked this pull request as ready for review March 23, 2021 14:35
@seisman seisman added the final review call This PR requires final review and approval from a second reviewer label Mar 23, 2021
Comment thread pygmt/tests/test_plot3d.py Resolved
@seisman seisman removed the final review call This PR requires final review and approval from a second reviewer label Mar 24, 2021
@seisman
seisman merged commit 65f5aee into GenericMappingTools:master Mar 24, 2021
@core-man
core-man deleted the array-intensity-plot3d branch March 24, 2021 05:38
sixy6e pushed a commit to sixy6e/pygmt that referenced this pull request Dec 21, 2022

This branch was previously deployed

1 inactive deployment
Preview — 7b56f3d2 Deployed Mar 24, 2021 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement Improving an existing feature

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants