Skip to content

Problem with automatic legend with grdvector #1499

@amarux

Description

@amarux

Hello,

I am using the grdvector to represent ocean currents and would like to include a reference vector in the legend. I uploaded an example dataset I am using to: https://drive.google.com/file/d/1rrYrVIQMPHJl868BMZrr7Nqkhq6QXKVw/view?usp=sharing

The file contains Cartesian vectors with the eastward (ugos) and northward velocity components. To use the automatic labeling of GMT, I transformed Cartesian to polar coordinates. Finally the code that I used to represent the vector is:

grdvector(Gr, Gtheta, polar=true, spacing=0.5, 
    vec_scale=(scale="4.5c", scale_at_lat=true, refsize=1.), 
    arrow=(shape=:arrow, stop=true, pen=("20p,black",), 
    len=0.16, fill=:black, norm=2.), legend=(label="1 m/s", pos=:MiddleCenter))

However I obtained the following error:

grdvector [ERROR]: Option -S : No vector scale point is allowed for Cartesian vector

Could you help me to identify what I missing?

Thank you

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions