-
Notifications
You must be signed in to change notification settings - Fork 364
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Let inset begin optionally take -R -J to determine inset size instead…
… of via -D (#5903) * Let inset begin take -R -J to determine inset size See #5875 for background. This PR implements that suggestion and adds a new test inset2.sh to demonstrate it. * Create inset2.ps Add original for inset2.sh test * Update inset.c * Clarify margin units
- Loading branch information
1 parent
81e5779
commit 2cf8546
Showing
5 changed files
with
108 additions
and
15 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
Binary file not shown.
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
#!/usr/bin/env bash | ||
# Test the alternative inset form where inset begin takes the -R -J to be used in the inset | ||
# and uses it to determine -D. We plot a coast map in the inset using that size and plot | ||
# a red cross in the middle of the inset and the original map after the inset completes to | ||
# test that we are back to the original Mercator -R -J settings. | ||
gmt begin inset2 ps | ||
gmt grdimage @earth_relief_01m -R-48/-43/-26/-20 -JM16c -B -Cworld | ||
gmt inset begin -DjBR+o0.2c -F+p1p,black -R-80/-28/-43/10 -JM6c | ||
gmt coast -Wthin -Swhite -Ggray | ||
gmt plot -A -Gwhite -W0.25p <<- EOF | ||
-48 -26 | ||
-43 -26 | ||
-43 -20 | ||
-48 -20 | ||
EOF | ||
echo 45:30W 23S | gmt plot -Sx4p -W0.25p,red | ||
gmt inset end | ||
echo 45:30W 23S | gmt plot -Sx12p -W1p,red | ||
gmt end show |