Skip to content

Mix PyGMT and matplotlib #2377

@seisman

Description

@seisman

Originally posted in https://forum.generic-mapping-tools.org/t/mixing-pygmt-and-matplotlib/3648

Is there a way to put a matplotlib axis next to a pyGMT map? For example in a 2-column setup with the matplotlib plot on the left and pyGMT map on the right. I can imagine that I could generate the matplotlib figure, export it as an eps and then dump it into a pyGMT subplot (or shift x and y) with the “image” command, but that seems a little kludgy. Yes, I could also re-write the matplotlib function using pyGMT commands, but I’d rather not. I’ve also looked at putting a pyGMT figure into a matplotlib subfigure but that doesn’t seem to work either.

I don't have an answer yet, but the idea is interesting.

Metadata

Metadata

Assignees

No one assigned

    Labels

    questionFurther information is requested

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions