Skip to content

Conversation

@seisman
Copy link
Member

@seisman seisman commented Aug 10, 2025

Description of proposed changes

[g|j|J|n|x]refpoint+wlength[+jjustify][+al|r][+odx[/dy]][+l[label]]

  • [g|j|J|n|x]refpoint[+jjustify][+odx[/dy]]: Position
  • +al|r: label_alignment
  • +wlength: length
  • +l[label]: label

@seisman seisman added the enhancement Improving an existing feature label Sep 18, 2025
@seisman seisman modified the milestones: 0.17.0, 0.18.0 Sep 18, 2025
@seisman seisman changed the base branch from main to params/position December 7, 2025 05:26
Base automatically changed from params/position to main December 11, 2025 01:54
@seisman seisman force-pushed the refactor/wiggle-position branch 2 times, most recently from 9d0c000 to 53e24fc Compare December 15, 2025 07:00
@seisman seisman changed the title Figure.wiggle: Refactor using the new alias system Figure.wiggle: Add parameters position/length/label/label_alignment for the scalebar position and properties Dec 15, 2025
@seisman seisman force-pushed the refactor/wiggle-position branch from 53e24fc to a5b2755 Compare December 15, 2025 07:03
@seisman seisman added the needs review This PR has higher priority and needs review. label Dec 15, 2025
@seisman seisman marked this pull request as ready for review December 15, 2025 07:03
@seisman seisman force-pushed the refactor/wiggle-position branch from a5b2755 to b28fd9b Compare December 19, 2025 05:32
@github-actions
Copy link
Contributor

github-actions bot commented Dec 19, 2025

Summary of changed images

This is an auto-generated report of images that have changed on the DVC remote

Status Path
added pygmt/tests/baseline/test_wiggle_default_position.png

Image diff(s)

Details

Added images

  • test_wiggle_default_position.png

Modified images

Path Old New

Report last updated at commit d74a6eb

@seisman
Copy link
Member Author

seisman commented Dec 19, 2025

This PR is ready for review.

The key point that we need to discuss is the default position. As shown below, the default position is x0/0, which is not ideal. A better position in my opinion is jBL+o0.2, although the offset is chosen arbitrarily.

gmt begin positions png
	gmt basemap -R0/20/0/10 -JX20c/10c -Baf
cat << EOF | gmt sample1d -I5k | gmt mapproject -G+uk | gmt math STDIN -C2 10 DIV COS = line.txt
0   7                                                                                   
1   8                                                                                   
8   3                                                                                   
10  7                                                                                   
7.5 8                                                                                   
3.5 1.5                                                                                 
1.5 3.5                                                                                 
4.5 10                                                                                  
EOF
	gmt wiggle -W0.25p line.txt -Z4c -T0.5p -A -D+w10
	gmt wiggle -W0.25p line.txt -Z4c -T0.5p -A -DjBL+o0.2+w10 --MAP_TICK_PEN_PRIMARY=blue
gmt end show
positions

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

Labels

enhancement Improving an existing feature needs review This PR has higher priority and needs review.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants