Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Turn all short aliases into long form #474

Merged
merged 25 commits into from
Jun 4, 2020
Merged
Changes from 1 commit
Commits
Show all changes
25 commits
Select commit Hold shift + click to select a range
c75d2d1
Turn common aliases from short form to long form
weiji14 Jun 1, 2020
1e14b72
Fix fmt_docstring test
weiji14 Jun 1, 2020
144effa
Alias U as timestamp instead of logo
weiji14 Jun 1, 2020
2223ae2
Remove short aliases for makecpt
weiji14 Jun 2, 2020
f5fc1a3
Remove short aliases for surface
weiji14 Jun 2, 2020
8906d59
Add common alias interpolation (n) for grdtrack
weiji14 Jun 2, 2020
db842e7
Remove short alias for which and refactor test
weiji14 Jun 2, 2020
71fb973
Remove short aliases from coast
seisman Jun 2, 2020
f131cd5
Remove short aliases from colorbar
seisman Jun 2, 2020
57f25ea
Improve docstring of colorbar
seisman Jun 2, 2020
ce6e84f
Remove short aliases from grdcontour
seisman Jun 2, 2020
cb5fb41
Remove short aliases from legend
seisman Jun 2, 2020
ac6aad3
Remove short aliases for logo
seisman Jun 2, 2020
52b8d0c
Aliased per_column(C), spacing(I), nearest_multiple(T) for info
weiji14 Jun 3, 2020
aa369dc
Remove short aliases for psconvert and improve fmt docstring
weiji14 Jun 3, 2020
718e786
Add U to docstring of grdcontour
seisman Jun 3, 2020
b8f7b33
Remove short aliases for plot
seisman Jun 3, 2020
30136d5
Remove short aliases for contour
seisman Jun 3, 2020
c320756
Improve docstring of text
weiji14 Jun 3, 2020
d9a3290
Remove short alias from image
weiji14 Jun 3, 2020
d87b7e4
Use frame instead of B for basemap.
weiji14 Jun 3, 2020
e3b5183
Fix a typo "book"->"bool"
seisman Jun 3, 2020
15b9c6b
Alias map_scale(L), rose(Td), compass(Tm) for basemap
weiji14 Jun 3, 2020
a1f5839
Change x, y to x/y in docstrings to make it look nicer
weiji14 Jun 4, 2020
8869feb
Fix string to str in docstrings
seisman Jun 4, 2020
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Remove short aliases for psconvert and improve fmt docstring
  • Loading branch information
weiji14 committed Jun 3, 2020
commit aa369dc2ff057633d9eed6644d7be2eac3cc94a6
41 changes: 25 additions & 16 deletions pygmt/figure.py
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,15 @@ def region(self):
return wesn

@fmt_docstring
@use_alias(F="prefix", T="fmt", A="crop", E="dpi")
@use_alias(
A="crop",
C="gs_option",
E="dpi",
F="prefix",
I="icc_gray",
T="fmt",
Q="anti_aliasing",
)
@kwargs_to_strings()
def psconvert(self, **kwargs):
"""
Expand All @@ -116,45 +124,46 @@ def psconvert(self, **kwargs):

If no input files are given, will convert the current active figure
(see :func:`pygmt.figure`). In this case, an output name must be given
using parameter *F*.
using parameter *prefix*.

Full option list at :gmt-docs:`psconvert.html`

{aliases}

Parameters
----------
A : str or bool
crop : str or bool
Adjust the BoundingBox and HiResBoundingBox to the minimum required
by the image content. Append ``u`` to first remove any GMT-produced
time-stamps. Default is True.
C : str
gs_option : str
Specify a single, custom option that will be passed on to
GhostScript as is.
E : int
dpi : int
Set raster resolution in dpi. Default = 720 for PDF, 300 for
others.
F : str
prefix : str
Force the output file name. By default output names are constructed
using the input names as base, which are appended with an
appropriate extension. Use this option to provide a different name,
but without extension. Extension is still determined automatically.
I : bool
icc_gray : bool
Enforce gray-shades by using ICC profiles.
Q : str
anti_aliasing : str
Set the anti-aliasing options for graphics or text. Append the size
of the subsample box (1, 2, or 4) [4]. Default is no anti-aliasing
(same as bits = 1).
T : str
Sets the output format, where b means BMP, e means EPS, E means EPS
with PageSize command, f means PDF, F means multi-page PDF, j means
JPEG, g means PNG, G means transparent PNG (untouched regions are
transparent), m means PPM, s means SVG, and t means TIFF [default
is JPEG]. To bjgt you can append - in order to get a grayscale
fmt : str
Sets the output format, where *b* means BMP, *e* means EPS, *E*
means EPS with PageSize command, *f* means PDF, *F* means
multi-page PDF, *j* means JPEG, *g* means PNG, *G* means
transparent PNG (untouched regions are transparent), *m* means PPM,
*s* means SVG, and *t* means TIFF [default is JPEG]. To ``'bjgt'``
you can append ``'+m'`` in order to get a monochrome (grayscale)
image. The EPS format can be combined with any of the other
formats. For example, ``'ef'`` creates both an EPS and a PDF file.
The ``'F'`` creates a multi-page PDF file from the list of input PS
or PDF files. It requires the *F* option.
Using ``'F'`` creates a multi-page PDF file from the list of input
PS or PDF files. It requires the *prefix* option.

"""
kwargs = self._preprocess(**kwargs)
Expand Down