Code Monkey home page Code Monkey logo

Comments (5)

welcome avatar welcome commented on June 2, 2024

👋 Thanks for opening your first issue here! Please make sure you filled out the template with as much detail as possible. You might also want to take a look at our contributing guidelines and code of conduct.

from gmt.

seisman avatar seisman commented on June 2, 2024

The equivalent GMT commands also fail. So I'm transfering the issue to the upstream GMT repository. The equivalent GMT commands are:

gmt basemap -Jw-30/0.1 -R-100/-10/0/90 -Bafg -pdf fig4
gmt basemap -Jw-30/0.1 -R-100/20/0/90 -Bafg -pdf fig5
gmt basemap -Jw330/0.1 -R-100/20/0/90 -Bafg -pdf fig6

from gmt.

welcome avatar welcome commented on June 2, 2024

👋 Thanks for opening your first issue here! Please make sure you filled out the template with as much detail as possible. We appreciate that you took the time to contribute!

Please make sure you read our Contributing Guide and abide by our Code of Conduct.

from gmt.

yvonnefroehlich avatar yvonnefroehlich commented on June 2, 2024

The actual need I have is to create a map in a Molleweide projection defined by a central meridian west of 0 longitude and with a range that spans across 0 longitude.

Thanks @thomasAmorrow for your detailed report! I can reproduce this issue with GMT 6.5.0, but it worked with GMT 6.4.0. The analogous issue occurs with the Hammer (H) projection. The projections N, Kf, Ks, I, and R seem to work.

Depending on how fast you need this map and if you do not need any features or bug fixes of GMT 6.5.0, you may want to consider setting up a conda environment with PyGMT and GMT 6.4.0 (, even it is generally recommended to use the latest versions).

For me, the following code works with GMT 6.4.0, but fails with GMT 6.5.0 (the same holds for the equivalent GMT commands by @seisman in comment #8403 (comment)):

import pygmt

dict_J_R = {
    "0/180/0/90": "W30/10c",  # Works
    "-180/0/0/90": "W-30/10c",  # Fails with GMT 6.5.0
    "-20/180/0/90": "W30/10c",  # Works
    "-180/20/0/90": "W-30/10c",  # Fails with GMT 6.5.0
}

fig = pygmt.Figure()

for panel in dict_J_R.keys():
    fig.basemap(
        region=panel,
        projection=dict_J_R[panel],
        frame=["afg", f"+tJ={dict_J_R[panel]}, R={panel}"],
    )
    fig.shift_origin(xshift="+w+1c")

fig.show()
# fig.savefig(fname="mollweide_subregion.png")

Output figure:
mollweide_subregion

from gmt.

joa-quim avatar joa-quim commented on June 2, 2024

Hmm, we are having an issue with central longitudes in [0 360] and regions in [-180 180]. For some reason the central longitude is converted to [0 360] and a test saying

/* For regional (<360) areas we cannot have clon > 180 away from either boundary */

fails. For the moment the solution is to give the -R in [0 360]. e.g., this works

gmt basemap -Jw-30/0.1 -R260/350/0/90 -Bafg -png lixo

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.