GenericMappingTools / GenericMappingTools/pygmt

Mix PyGMT and matplotlib

Open
#2,377 1 comment 0 reactions 0 assignees View on GitHub
question
Dominant language
Python
Stars
874
Forks
255
Avg merge
1d 21h
Merged PRs (30d)
40

Description

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.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.