GenericMappingTools / GenericMappingTools/GMT.jl

The problem of incomplete image cropping in subplot figure.

Open
#1,226 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Julia
Stars
221
Forks
36
Avg merge
1h 36m
Merged PRs (30d)
17

Description

Because I want to use Chinese character in my figure, so I use the systemwide gmt, and the gmt version is `v6.4.0`. But the strange problem is that the figure has an incomplete image cropping. And it works well when I use the default artifact gmt `v6.5.0`, but in the `v6.5.0` gmt I cannot input the Chinese characters correctly. Here is my demo code:
```julia
using GMT

gmtbegin("Figure1", fmt="png")
subplot(grid="2x3", panels_size=(8,6), margins="10p")

basemap(
par=(FONT_ANNOT_PRIMARY="8p,Helvetica,black", FONT_LABEL="10p,39,black"),
region=[1e-2, 1e4, 1e2, 1e6], figsize=(-8, 6), proj=:logxy,
xaxis=(annot=1, ticks=3, label=:"电阻率", scale=:pow),
yaxis=(annot=1, ticks=3, label=:"频率", scale=:pow),
panel=(1, 1),
)

basemap!(
par=(FONT_ANNOT_PRIMARY="8p,Helvetica,black", FONT_LABEL="10p,39,black"),
region=[1e-2, 1e4, 1e2, 1e6], figsize=(-8, 6), proj=:logxy,
xaxis=(annot=1, ticks=3, label=:"电阻率", scale=:pow),
yaxis=(annot=1, ticks=3, label=:"频率", scale=:pow),
panel=(1, 2)
)

basemap!(
par=(FONT_ANNOT_PRIMARY="8p,Helvetica,black", FONT_LABEL="10p,39,black"),
region=[1e-2, 1e4, 1e2, 1e6], figsize=(-8, 6), proj=:logxy,
xaxis=(annot=1, ticks=3, label=:"电阻率", scale=:pow),
yaxis=(annot=1, ticks=3, label=:"频率", scale=:pow),
panel=(1, 3)
)

basemap!(
par=(FONT_ANNOT_PRIMARY="8p,Helvetica,black", FONT_LABEL="10p,39,black"),
region=[1e-2, 1e4, 1e2, 1e6], figsize=(-8, 6), proj=:logxy,
xaxis=(annot=1, ticks=3, label=:"电阻率", scale=:pow),
yaxis=(annot=1, ticks=3, label=:"频率", scale=:pow),
panel=(2, 1)
)

subplot()
gmtend()

```
![Figure1](https://raw.githubusercontent.com/liaoweiyang2017/cloudimage/main/img/202308112351553.png)

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.