# pyGmt -savefig()-save location

**URL:** <https://forum.generic-mapping-tools.org/t/pygmt-savefig-save-location/2363>\
**Category:** PyGMT Q&A\
**Created:** [November 24, 2021, 11:31am UTC](https://forum.generic-mapping-tools.org/t/pygmt-savefig-save-location/2363 "2021-11-24T11:31:45Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Guo](https://avatars.discourse-cdn.com/v4/letter/g/3ec8ea/32.png) [@Guo](https://forum.generic-mapping-tools.org/u/Guo)\
**Post date:** [November 24, 2021, 11:31am UTC](https://forum.generic-mapping-tools.org/t/pygmt-savefig-save-location/2363/1 "2021-11-24T11:31:45Z")

</div>

Hello everyone, I would like to ask a question about the pyGMT save path: how to specify the save location of the output image? I wrote the entire path in savefig(), but the image is still saved in local/temp. Another question is, why do I still export PDF when I specify PNG as the output format?  
fig.savefig(“central-america-shorelines.png”)

 ![%S4FAJ{YHQJ)@{@2AX{EFX](https://canada1.discourse-cdn.com/flex047/uploads/gmt/original/2X/e/ebf84ad14d79a66926e6bbef2c348b37dc89c13a.png)

---

<div class="post-metadata">

**Author:** ![maxrjones](https://yyz1.discourse-cdn.com/flex047/user_avatar/forum.generic-mapping-tools.org/maxrjones/32/2698_2.png) [@maxrjones](https://forum.generic-mapping-tools.org/u/maxrjones)\
**Post date:** [November 24, 2021, 4:41pm UTC](https://forum.generic-mapping-tools.org/t/pygmt-savefig-save-location/2363/2 "2021-11-24T16:41:47Z")

</div>

For me, this works to save a figure to the specified absolute file path with a jpeg output. Can you share the code you are using?

```python
import pygmt
fig = pygmt.Figure()
fig.basemap(frame=True, region=[0, 1, 0, 1], projection="X10c")
fig.savefig("/home/User/Documents/test-save-fig.jpg")

```
