Skip to content

Add optional fraction for terminal shrinking value#6115

Merged
PaulWessel merged 4 commits intomasterfrom
shrink-frac
Dec 13, 2021
Merged

Add optional fraction for terminal shrinking value#6115
PaulWessel merged 4 commits intomasterfrom
shrink-frac

Conversation

@PaulWessel
Copy link
Member

The +nnorm modifier that shrinks down vector attributes for shorter vectors would shrink to 0 by default. This PR adds an optional terminal shrink value [0] that can be set by appending /frac. The shrink_lim.sh test explores how this works. The +n is used to shrink attributes when the vector length is less than 1 inch (-R values are in inches and the gridlines indicates the cutoff):

shrink_lim

Comments:

  1. For very short vectors and relatively large heads, we seem to plot a head that implies a starting point below the vector start (y = 0). See top-left plot for length = 0.1" = 7.2p is less that head length of 12 p
  2. @joa-quim suggested that perhaps default frac should be nonzero and we would claim this is a bug fix. The argument is that when frac goes to zero we can no longer tell the azimuth of the vector as it approaches a point. Perhaps 0.25?

Thoughts?

The +nnorm modifier that shrinks down veector attributes for shorter vectors would shrink to 0 by default.  This PR adds an optional terminal shrink value [0] that can be set by appending /frac.
@PaulWessel PaulWessel added the enhancement Improving an existing feature label Dec 12, 2021
@PaulWessel PaulWessel self-assigned this Dec 12, 2021
@maxrjones
Copy link
Member

I agree that the current behavior could be considered a bug; 0.25 minimum produces a more reasonable plot.

@joa-quim
Copy link
Member

Yes, 0.25 seems a good dfalt.

@PaulWessel
Copy link
Member Author

OK, I will update the docs that way. I think I will fix any tests that use **+**n to have an explicit /0 so that we don't get useless failures. Might as well since this example will exercise the new defaults, and I am working on a wind-vector plot based on #6108 that will do a good job but requires review of #6113.

@PaulWessel PaulWessel changed the title WIP Add optional fraction for terminal shrinking value Add optional fraction for terminal shrinking value Dec 12, 2021
@PaulWessel PaulWessel added this to the 6.4.0 milestone Dec 12, 2021
@PaulWessel
Copy link
Member Author

OK, this PR has been updated, scripts revised to avoid new PS originals, plus the new test case. Ready for a review.

@PaulWessel PaulWessel merged commit a5f9214 into master Dec 13, 2021
@PaulWessel PaulWessel deleted the shrink-frac branch December 13, 2021 19:10
@maxrjones maxrjones added the add-changelog Add PR to the changelog label Jan 25, 2022
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