Pygmt Subplot Figsize and Subsize

Dear everyone:

,when i use vscode complier to run my pygmt script(I want to use pygmt.Figure().subplot method,not setting its subsize),it warnings:subplot [ERROR]: Option -J: Requires -Fs to determine subplot height!
subplot [ERROR]: No subplot information file!
And then I add subsize=“5c”,it works, hencely I’m curious about whether “subsize” is essential to use pygmt.Figure().subplot ? but the pygmt docs says that " Note that only one of figsize or subsize can be provided at once." in section of “subplot”
Thanks a lot!

I see that you have set projection="Q12c" in both the fig.subplot and fig.grdimage commands. Could you try using projection="Q?" for your grdimage command, while removing the subsize parameter from fig.plot?

Also, are you using the same region and projection for all 4 subplots? If all subplots are using the same projection extent, then it is ok to put them in fig.subplot. But if each subplot has a different projection or region (e.g. like Multiple colormaps — PyGMT), then it is better to remove region and parameter from fig.subplot, and place them in your fig.grdimage call instead (but change any size like projection="Q12c" to projection="Q?")

OK,thank you,I understood, thank you very much!~Good Luck!

On tip for next time posting or if you need more help on this issue, please do not post screenshots but simply copy & past your code and provide all needed data :slightly_smiling_face:. This makes it significantly easier for people to help you, as we can simply copy and run your code. You can format your script as code by placing three backticks in the line before and after the block with the script:

```
your script formated as code
```

Thank you for your sincerely advice ,I’ll notice next time~