Skip to content

Confusion between -W and -L in velo #5353

Closed

Description

@PaulWessel

If the pen for the vector stem (-W) is solid (e.g., -W2p) and the pen for the error ellipse outline -L is dotted (e.g., -L0.25p,.) then there is a mixup and the vector is drawn with the thick pen but in a dotted style:

bad

Activity

  1. added
    bug
    on Jun 18, 2021
  2. self-assigned this
    on Jun 18, 2021
  3. PaulWessel commented on Jun 19, 2021

    @PaulWessel
    ContributorAuthor

    We have test cases that plots vectors with error ellipses but do not specify any of -W -L -E -G (e.g., geodesy_01.sh). Our docs says

    The arrow will be drawn with the pen attributes specified by the -W option and arrow-head can be colored via -G. The ellipse will be filled with the color or shade specified by the -E option [default is transparent], and its outline will be drawn if -L is selected using the pen selected (by -W if not given by -L).

    We can either stick to that and update the code to give errors, or we can update the docs to say that in those cases (no ellipse fill or outline selected, but a nonzero confidence level specified) we default to an outline with the default pen, via

    if (Ctrl->S.symbol == CINE && Ctrl->S.confidence > 0.0 && !(Ctrl->E.active || Ctrl->L.active))
    		Ctrl->L.active = true;	/* If confidence is > 0 but neither -E or -L is set then we turn on -L to pick up -W pen */
    

    Given the history of this working as is, I suggest we do the latter and update the docs. Let me know if anyone objects (@joa-quim @meghanrjones @seisman) - otherwise I will do this.

  4. added a commit that references this issue on Jun 19, 2021
  5. PaulWessel commented on Jun 19, 2021

    @PaulWessel
    ContributorAuthor

    There is more. We have tests that sets the vector head parameters and then these leak into vector stem. In geodesy_03.sh we set -A1c+p3p+e -Wthin,red but what we get is the 3 point wide line requested for head outline (which works) being also applied to the stem, yet in red. Our docs for vector attributes are pretty clear on this:

    +p[pen] sets the vector pen attributes. If no pen is appended then the head outline is not drawn. [Default pen is half the width of stem pen, and head outline is drawn]. Above, we used +p2p,orange. The vector stem attributes are controlled by -W.

    So I think there is not much to do here but declare a bug and fix the test scripts in the process.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

bug

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions