Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Handle unit for vector shrinking in grdvector #136

Merged
merged 1 commit into from
Oct 21, 2018
Merged

Conversation

PaulWessel
Copy link
Member

The vector attribute processing keeps track of normalizing length and unit and applies the conversion later since some programs (like psxy) may read such instructions from the command line. In grdcontour, however, there is no such reading and we must convert any length to inches before plotting.

The initial problem was detected by @joa-quim when comparing
-Q0.1i+e+n0.63c
-Q0.1i+e+n0.25c
which should be identical. This PR makes them so.

The vector attribute processing keeps track of normalizing length and unit and applies the conversion later since some programs (like psxy) may read such instructions from the command line.  In grdcontour, however, there is no such reading and we must convert any lenth to inches before plotting.
@PaulWessel PaulWessel requested a review from a team October 21, 2018 04:32
@joa-quim joa-quim merged commit 1e27e10 into master Oct 21, 2018
@joa-quim joa-quim deleted the vectorshrink branch October 21, 2018 18:09
@PaulWessel PaulWessel restored the vectorshrink branch October 21, 2018 18:14
@seisman seisman deleted the vectorshrink branch October 23, 2018 19:40
@joa-quim
Copy link
Member

I'm afraid we have more of these. From endarrows.sh test

gmt psxy -R -J -W1p+o1.25/0.25i+v0.25i+gred -O t.txt -K >> $ps 

also shows a similar bug.

obaney pushed a commit to obaney/gmt that referenced this pull request Aug 18, 2021
…ls#136)

Was using a KML preview loaded on WorldWind Web for the globe preview.
The problem was that the file needed to be in the same folder as the
notebook and couldn't be deleted after the preview was used.
Got around that by using a SurfaceImage layer instead of a KML layer.
The SurfaceImage takes a PNG image and region and displays it on the
globe.
The PNG can be inserted as a base64 encoded string using the Javascript
Image object.
This eliminates the need to keep the preview files around.

I capture the plot region by saving a KML preview and extracting the
bounding box from the KML file.
This is better than intercepting the 'region' argument in the
_preprocess method because it works for ISO country codes as well.
With the region, I can automatically set the view point.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants