Giter VIP home page Giter VIP logo

Comments (13)

PaulWessel avatar PaulWessel commented on May 16, 2024

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.

seisman avatar seisman commented on May 16, 2024

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.

joa-quim avatar joa-quim commented on May 16, 2024

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.

seisman avatar seisman commented on May 16, 2024

@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.

PaulWessel avatar PaulWessel commented on May 16, 2024

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.

joa-quim avatar joa-quim commented on May 16, 2024

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.

seisman avatar seisman commented on May 16, 2024

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.

joa-quim avatar joa-quim commented on May 16, 2024

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.

PaulWessel avatar PaulWessel commented on May 16, 2024

Try MAP_ORIGIN_X|Y instead...

from gmt.

seisman avatar seisman commented on May 16, 2024

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.

stale avatar stale commented on May 16, 2024

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.

leouieda avatar leouieda commented on May 16, 2024

@seisman any update on this issue?

from gmt.

seisman avatar seisman commented on May 16, 2024

Close this issue, since I've found two solutions.

from gmt.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.