Skip to content

The problem of incomplete image cropping in subplot figure. #1226

Open
@liaoweiyang2017

Description

@liaoweiyang2017

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:

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions