Skip to content

Commit

Permalink
Figure.savefig: Support PPM (.ppm) format
Browse files Browse the repository at this point in the history
  • Loading branch information
seisman committed Oct 26, 2023
1 parent fddf0a3 commit d468a82
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 2 additions & 0 deletions pygmt/figure.py
Original file line number Diff line number Diff line change
Expand Up @@ -263,6 +263,7 @@ def savefig(
- JPEG (``.jpg`` or ``.jpeg``)
- PDF (``.pdf``)
- BMP (``.bmp``)
- PPM (``.ppm``)
- TIFF (``.tif``)
- GeoTIFF (``.tiff``)
- EPS (``.eps``)
Expand Down Expand Up @@ -305,6 +306,7 @@ def savefig(
"pdf": "f",
"jpg": "j",
"bmp": "b",
"ppm": "m",
"eps": "e",
"tif": "t",
"tiff": None, # GeoTIFF doesn't need the -T option
Expand Down
2 changes: 1 addition & 1 deletion pygmt/tests/test_figure.py
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ def test_figure_savefig_exists():
fig = Figure()
fig.basemap(region="10/70/-300/800", projection="X3i/5i", frame="af")
prefix = "test_figure_savefig_exists"
for fmt in "png pdf jpg jpeg bmp eps tif PNG JPG JPEG Png".split():
for fmt in "png pdf jpg jpeg bmp ppm eps tif PNG JPG JPEG Png".split():
fname = ".".join([prefix, fmt])
fig.savefig(fname)

Expand Down

0 comments on commit d468a82

Please sign in to comment.