Public Member Functions | |
def | __getstate__ |
def | __init__ |
def | __setstate__ |
def | create |
def | set_graphviz_executables |
def | set_prog |
def | set_shape_files |
def | write |
Public Attributes | |
formats | |
obj_dict | |
prog | |
progs | |
shape_files |
A container for handling a dot language file. This class implements methods to write and process a dot language file. It is a derived class of the base class 'Graph'.
def rqt_decision_graph.pydot.Dot.__init__ | ( | self, | |
argsl, | |||
argsd | |||
) |
def rqt_decision_graph.pydot.Dot.__getstate__ | ( | self | ) |
Reimplemented from rqt_decision_graph.pydot.Common.
def rqt_decision_graph.pydot.Dot.__setstate__ | ( | self, | |
state | |||
) |
Reimplemented from rqt_decision_graph.pydot.Common.
def rqt_decision_graph.pydot.Dot.create | ( | self, | |
prog = None , |
|||
format = 'ps' |
|||
) |
Creates and returns a Postscript representation of the graph. create will write the graph to a temporary dot file and process it with the program given by 'prog' (which defaults to 'twopi'), reading the Postscript output and returning it as a string is the operation is successful. On failure None is returned. There's also the preferred possibility of using: create_'format'(prog='program') which are automatically defined for all the supported formats. [create_ps(), create_gif(), create_dia(), ...] If 'prog' is a list instead of a string the fist item is expected to be the program name, followed by any optional command-line arguments for it: ['twopi', '-Tdot', '-s10']
def rqt_decision_graph.pydot.Dot.set_graphviz_executables | ( | self, | |
paths | |||
) |
This method allows to manually specify the location of the GraphViz executables. The argument to this method should be a dictionary where the keys are as follows: {'dot': '', 'twopi': '', 'neato': '', 'circo': '', 'fdp': ''} and the values are the paths to the corresponding executable, including the name of the executable itself.
def rqt_decision_graph.pydot.Dot.set_prog | ( | self, | |
prog | |||
) |
def rqt_decision_graph.pydot.Dot.set_shape_files | ( | self, | |
file_paths | |||
) |
Add the paths of the required image files. If the graph needs graphic objects to be used as shapes or otherwise those need to be in the same folder as the graph is going to be rendered from. Alternatively the absolute path to the files can be specified when including the graphics in the graph. The files in the location pointed to by the path(s) specified as arguments to this method will be copied to the same temporary location where the graph is going to be rendered.
def rqt_decision_graph.pydot.Dot.write | ( | self, | |
path, | |||
prog = None , |
|||
format = 'raw' |
|||
) |
Given a filename 'path' it will open/create and truncate such file and write on it a representation of the graph defined by the dot object and in the format specified by 'format'. 'path' can also be an open file-like object, such as a StringIO instance. The format 'raw' is used to dump the string representation of the Dot object, without further processing. The output can be processed by any of graphviz tools, defined in 'prog', which defaults to 'dot' Returns True or False according to the success of the write operation. There's also the preferred possibility of using: write_'format'(path, prog='program') which are automatically defined for all the supported formats. [write_ps(), write_gif(), write_dia(), ...]
Reimplemented from rqt_decision_graph.pydot.Graph.