Skip to content

Conversation

@PaulWessel
Copy link
Member

@PaulWessel PaulWessel commented Aug 8, 2021

It may be useful to draw a simple one-headed vector as part of a custom symbol, but we had no such capability and the only way to combine a simple vector with a custom symbol was to plot things twice. This PR adds v as a new known symbol to the table displayed in the appendix (and it takes x, y, angle, length). To keep things simple there are some hard-wired decision being made:

  1. The vector has a head at the end of the vector.
  2. The head parameters are derived from the current pen thickness: Head length is 8 x the pen width, and the head apex is 30 degrees, while the shape is set to 0.5.
  3. The head outline is always drawn, and head may be filled if -G is used.

This PR also clarifies how to ensure angles are considered as Cartesian vs geographic azimuths, and allows a trailing a to an angular constant to mean azimuth. Prior to this PR, it was not possible to draw an arc, wedge, or ellipse using azimuths, for instance.

All previous tests pass, but it would be helpful if @KristofKoch given his branch a try given his numerous custom symbols...

It may be useful to draw a simple one-headed vactor as part of a custom symbol, but we had no such capability.  This is now added.  The vector has a head at the end and the size is derived from the current pen thickness.  Head outline is always drawn, and head may be filled if -G is used.  This PR also clarifies how to ensure angles are considered as Cartesian vs geographic azimuths, and allows a trailing a to an angular constant to mean azimuth.
@PaulWessel PaulWessel added the enhancement Improving an existing feature label Aug 8, 2021
@PaulWessel PaulWessel self-assigned this Aug 8, 2021
Copy link
Member

@Esteban82 Esteban82 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I run the GMT_angle-azim.sh and I get this figure. As far as I know it is ok.

@PaulWessel this could be used in animation02, right?

PD: Don't worry Paul. I just solve it (replace plot -Sv by -SV).

GMT_angle-azim

@PaulWessel
Copy link
Member Author

You could, but not sure if it buys you anything, The annotations perhaps? Probably worth a try to see if it looks good etc with the font size.

@PaulWessel PaulWessel merged commit 0b510af into master Aug 22, 2021
@PaulWessel PaulWessel deleted the custom-symbol-vector branch August 22, 2021 03:05
@Esteban82
Copy link
Member

The annotations perhaps?

Ok, I will try it.

@maxrjones maxrjones added the add-changelog Add PR to the changelog label Nov 17, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

add-changelog Add PR to the changelog enhancement Improving an existing feature

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants