Comments (13)
Hm, I print PDF figures all the time. The printer knows its paper size and off it goes. I can even scale the figure if I want to or let it be exactly as is. it tends to center the figure on the paper. Anyway, what you got is probably not what we want but I think you are trying to defeat how GMT is doing things.
from gmt.
Now I understand why GMT tends to center the figure on the paper in modern mode.
I once thought that following codes should work.
gmt begin map png
gmt set PS_MEDIA=A4 PS_CONVERT="" MAP_ORIGIN_X=2i MAP_ORIGIN_Y=2i
gmt basemap -R0/10/0/10 -JX10c -Bafg
gmt end
However, the plot is still not at the lower left corner of the paper. Why does basemap ignore MAP_ORIGIN_X and MAP_ORIGIN_Y?
from gmt.
I've not tested the modern mode much on Win and suspect there are issues in it. Just to check, do you also get this error?
gmt basemap -R0/10/0/10 -JX10c -Bafg --PS_MEDIA=A4 --PS_CONVERT="" --MAP_ORIGIN_X=2i --MAP_ORIGIN_Y=2i map pdf
gmt [ERROR]: Shared GMT module not found: basemap
from gmt.
@joa-quim I think the correct one-line command should be:
gmt basemap -R0/10/0/10 -JX10c -Bafg --PS_MEDIA=A4 --PS_CONVERT="" --MAP_ORIGIN_X=2i --MAP_ORIGIN_Y=2i -pdf map
Please note the dash symbol before pdf
.
from gmt.
Note this gives what you want but PS:
gmt basemap -R0/10/0/10 -JX10c -Bafg --PS_MEDIA=A4 --PS_CONVERT="" --MAP_ORIGIN_X=2i --MAP_ORIGIN_Y=2i -ps map
from gmt.
Right. You can see that have not been practicing modernity. But it respects the X,Y origin. I mean, origin is at 2,2 inch
from gmt.
Two solutions I just find.
gmt begin map ps
gmt basemap -R0/10/0/10 -JX10c -Bafg
gmt end
gmt psconvert map.ps -P -Tf
gmt begin map pdf
gmt set PS_MEDIA=A4 PS_CONVERT=""
gmt basemap -R0/10/0/10 -JX10c -Bafg -X1i -Y1i
gmt end
from gmt.
Sorry, don't get what is the problem. These both work as intended
gmt basemap -R0/10/0/10 -JX10c -Bafg --PS_MEDIA=A4 --PS_CONVERT="" -X1i -Y1i -pdf map
gmt basemap -R0/10/0/10 -JX10c -Bafg --PS_MEDIA=A4 -X1i -Y1i -ps map
from gmt.
Try MAP_ORIGIN_X|Y instead...
from gmt.
MAP_ORIGIN_X and MAP_ORIGIN_Y don't work because they only works for a new plot. For an overlay, the default offset is always zero.
from gmt.
This issue has been automatically marked as stale because it has not had activity in the last 30 days. It will be closed if no further activity occurs within 7 days. Thank you for your contributions.
from gmt.
@seisman any update on this issue?
from gmt.
Close this issue, since I've found two solutions.
from gmt.
Related Issues (20)
- Release of GMT 6.5.1 needed?
- Movie. ffmpeg "Thread message queue blocking" HOT 1
- Bug in Movie -MPNG (with transparency layer)
- How to add legend and scale to the map. HOT 2
- Let Movie only assemble animation (or make a dry run).
- Link Checker Report on 2024-03-10
- Basemap fails with Mollweide projection across prime meridian or negative longitude defining both central meridian and range HOT 5
- Link Checker Report on 2024-03-17
- grdimage [ERROR]: Option -Q: Cannot specify a transparent color for grids when intensities are also used HOT 2
- gmtinfo - extended regions are not correctly output with -C HOT 2
- Setting scale bar's font color HOT 4
- Link Checker Report on 2024-03-24
- Rotations with grdview clips images depending on projection and -Q variant
- Oblique projection (Ob): Partly wrong annotations
- Link Checker Report on 2024-03-31 HOT 2
- Link Checker Report on 2024-04-07
- Move all long2short (l2s) tests into a separate test directory? HOT 8
- Cache data are stored in the wrong directory if GMT_DATA_SERVER is set via environmental variable or via "gmt set" HOT 6
- Several grdimage issues when producing GeoTIFFs HOT 1
- Link Checker Report on 2024-04-14
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from gmt.