pygmt.clib.Session.call_module
- Session.call_module(module, args)[source]
- Call a GMT module with the given arguments. - Wraps - GMT_Call_Module.- The - GMT_Call_ModuleAPI function supports passing module arguments in three different ways:- Pass a single string that contains whitespace-separated module arguments. 
- Pass a list of strings and each string contains a module argument. 
- Pass a list of - GMT_OPTIONdata structure.
 - Both options 1 and 2 are implemented in this function, but option 2 is preferred because it can correctly handle special characters like whitespaces and quotation marks in module arguments. - Parameters:
- module ( - str) – The GMT module name to be called (- "coast",- "basemap", etc).
- args ( - str|- list[- str]) – Module arguments that will be passed to the GMT module. It can be either a single string (e.g.,- "-R0/5/0/10 -JX10c -BWSen+t'My Title'") or a list of strings (e.g.,- ["-R0/5/0/10", "-JX10c", "-BWSEN+tMy Title"]).
 
- Raises:
- GMTTypeError – If the - argsargument is not a string or a list of strings.
- GMTCLibError – If the returned status code of the function is non-zero. 
 
- Return type: