Repository navigation
Closed
Labels
feature requestNew feature wanted
Description
This issue serves as the central place for discussing and tracking the implementation of the Figure.psconvert method in PyGMT. The issue will be closed when the initial implementation is complete. Progress is tracked at PyGMT: Wrapping GMT modules.
Documentation
- GMT: https://docs.generic-mapping-tools.org/dev/psconvert.html
- GMT.jl: https://www.generic-mapping-tools.org/GMTjl_doc/documentation/modules/psconvert
- PyGMT: https://www.pygmt.org/dev/api/generated/pygmt.Figure.psconvert.html
GMT Option Flags and Modifiers
☑️: Implemented; ⬜: To be implemented/discussed; Strikethrough: Won't implement.
-
<psfiles> -
-A[+r][+u] -
-C:gs_option -
-D<dir> -
-E:dpi -
-F:prefix -
-G:gs_path -
-H<scale> -
-I[+m<margins>][+s[m]<width>[/<height>]][+S<scale>]] -
-L<list> -
-Mb|f<psfile> -
-N[+f<fade>][+g<backfill>][+k<fadefill>][+p[<pen>]]] -
-P -
-Q[g|p|t]1|2|4] -
-S -
-Tb|e|E|f|F|g|G|j|m|s|t[+m][+q<quality>]] -
-V:verbose -
-W[+a<mode>[<alt>]][+c][+f<minfade>/<maxfade>][+g][+k][+l<lodmin>/<lodmax>][+n<name>][+o<folder>][+t<title>][+u<URL>]] -
-Z -
-! -
: Use--PAR=<value>pygmt.configinstead.
Notes on Input Formats
Figure.psconvertis a method onpygmt.Figure; it converts the active figure's internal PostScript to the requested format using Ghostscript.- If no active figure exists, an error is raised.
- The
prefixparameter must be a non-empty string pointing to an existing directory; the method raisesFileNotFoundErrorif the parent directory does not exist. - The output format is determined by
fmt(-T); multiple formats can be combined (e.g.,fmt="ef"produces both EPS and PDF). crop=True(default) trims whitespace around the figure; append"+u"to also strip the GMT timestamp.
Linked Pull Requests
- Initial feature implementation – Make the plotting API object oriented #31
- Move
Figure.psconvertto a separate file – Move Figure.psconvert into a separate file #3553 - Add
resize(-I) parameter – Correct docs for "wedge" (w) symbol in gallery example "Multi-parameter symbols" #2406 - Add
bb_style(-N) parameter – Revert "Allow validate_output_table_type to specify the supported output types (#3191)" #3233 - Implement
-D(directory) option to set the output directory - Implement
-L(list) option for batch conversion of multiple files - Implement
-W(world_file) option for GIS-compatible raster output
Related Issues and Discussions
Figure.psconvertis called implicitly byFigure.savefig; users who need more control over Ghostscript options should callFigure.psconvertdirectly.- The
anti_aliasingparameter (-Q) is useful when producing raster images for presentations or publications at lower DPI settings. - The
-L(file list) and-Tf(multi-page PDF) combination is the standard GMT approach for assembling a series of figures into a single PDF document.
Metadata
Metadata
Assignees
Labels
feature requestNew feature wanted
Type
Projects
- StatusShow more project fieldsNo status
Activity