Repository navigation
Conversation
The pen given to -D...+v<pen> accepted the +v line-end modifiers but silently ignored them. Now +vb<vspecs> places a vector head at the data point, shortening the leader so the tip lands on the point. The text end is clipped in PostScript so its end point is unknown in C; +ve (or plain +v) is therefore rejected with an error. The head is skipped when longer than the leader. psxy's end-vector helper moves to gmt_plot.c as gmt_plot_end_vectors so both modules share it. Also stop the paragraph (-M) box from inheriting a stale fill/outline when only a leader line is requested, and do not share (then free) the default pen's vector heads in the -D pen. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Member
|
Didn't we have nothing that does this already? And I think the arrow head should stop at circle's edge, not its center. |
Member
Author
Member
|
Yes, I think a I have this implemented in GMT.jl (https://www.generic-mapping-tools.org/GMTjl_doc/documentation/utilities/annotate.html#vector-lines) but likely I implemented the arrow part separately. |
Member
|
In these type of changes we must strictly insist with Claude that it is not allowed to reinvent solutions that GMT already has. I am thinking for example in |
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

text -D...+v<pen>accepted the pen's+vmodifiers but silently ignored them. This PR makes+vb<specs>draw a vector head at the data point, asplot -Wdoes. psxy's end-vector helper moves togmt_plot.casgmt_plot_end_vectorsso both modules share it (no change toplotoutput).Vector head at the data point
The leader is shortened by the head length so the tip lands on the point. It works with a text box (
-W/-G), rotated text and paragraph mode (-M); a head longer than the leader is skipped.Tested with:
Head at the text end: not supported (error)
A head at the text end (
+ve, or plain+vfor both ends) is rejected with an error:The leader is clipped against the text box in PostScript (
PSL_plotline_clipped_by_textbox), so C does not know where the line meets the box. Supporting it would need that intersection computed in C (e.g. a PSL function returning the text dimensions) or the head drawn in PostScript. Happy to follow up if wanted.Written with Claude Opus 5.5 (implementation and local review); draft by Claude Sonnet 5.5.