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

Allow passing an array as intensity for plot3d #1109

Merged
merged 8 commits into from
Mar 24, 2021

Conversation

core-man
Copy link
Member

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

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
@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
@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
@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
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