Skip to content

plot and plot3d: Allow passing a numpy array as intensity #891

@seisman

Description

@seisman

If using intensity=True, we will instead read intens from the first data column after the symbols parameters.

As I understand it, there are at least three or four different ways to specify an intensity/intensities.

  • Simply give a constant intensity like intensity=0.5
  • Pass a numpy array to intensity (similar to the x, y, size parameters): I think it's not implemented yet
  • Set intensity=True, and read data from an input file or from a 2D numpy array (via the data parameter).

The format of the input file of plot is (https://docs.generic-mapping-tools.org/latest/plot.html#s):

x y [ z ] [ size ] [ symbol-parameters ] [ symbol ]

So, for the 3rd case, the format of the input file should be:

x y [ z ] [ size ] [ symbol-parameters ] intensity [ symbol ]

Originally posted by @seisman in #881 (comment)

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions