A number of options contol the operation of UMLGraph class diagram generator. These can be specified on the command line, and most can also be specified through javadoc tags within the diagram, affecting all or some elements.

## What Gets Drawn

-all
  Same as `-attributes` `-operations` `-visibility` `-types` `-enumerations` `-enumconstants`
-attributes
  Show class attributes (Java fields)
-commentname
  Name the element using the text in the javadoc comment, instead of the name of its class.
-constructors
  Show a class's constructors
-enumconstants
  When showing enumerations, also show the values they can take.
-enumerations
  Show enumarations as separate stereotyped primitive types.
-hide
  Specify entities to hide from the graph. Matching is done using a non-anchored regular match. For instance, "`-hide (Big|\.)Widget`" would hide "`com.foo.widgets.Widget`" and "`com.foo.widgets.BigWidget`". Can also be used without arguments, in this case it will hide everything (useful in the context of views to selectively unhide some portions of the graph, see the view chapter for further details).
-operations
  Show class operations (Java methods)
-qualify
  Produce fully-qualified class names.
-types
  Add type information to attributes and operations
-view
  Specify the fully qualified name of a class that contains a view definition. Only the class diagram specified by this view will be generated.
  See the views chapter for more details.
-views
  Generate a class diagram for every view found in the source path.
-visibility
  Adorn class elements according to their visibility (private, public, protected, package)

## Visual Appearance

-bgcolor
  Specify the graph's background color.
-collapsible
  Enhance the javadoc HTML files containing UML diagrams with Javascript that provides a link for showing the (initially collapsed) diagrams.
-edgecolor
  Specify the color for drawing edges.
-edgefontcolor
  Specify the font color to use for edge labels.
-edgefontname
  Specify the font name to use for edge labels.
-edgefontsize
  Specify the font size to use for edge labels.
-horizontal
  Layout the graph in the horizontal direction.
-nodefillcolor
  Specify the color to use to fill the shapes.
-nodefontabstractname
  Specify the font name to use inside abstract class nodes.
-nodefontclassabstractname
  Specify the font name use for the class name of abstract classes.
-nodefontclassname
  Specify the font name to use for the class names.
-nodefontclasssize
  Specify the font size to use for the class names.
-nodefontcolor
  Specify the font color to use inside nodes.
-nodefontname
  Specify the font name to use inside nodes.
-nodefontpackagename
  Specify the font name to use for the package names (used only when the package name is postfixed, see -postfixpackage).
-nodefontpackagesize
  Specify the font size to use for the package names (used only when it package name is postfixed, see -postfixpackage).
-nodefontsize
  Specify the font size to use inside nodes.
-nodefonttagname
  Specify the font name to use for the tag names.
-nodefonttagsize
  Specify the font size to use for the tag names.
-nodesep
  Specify the horizontal separation between the class nodes (0.25 by default). Decreasing this can make a diagram more compact.
-noguillemot
  Specify that guillemot characters should not be used to denote special terms like "interface" and stereotype names. This is used on some platforms to circumvent problems associated with displaying non-ASCII characters.
-postfixpackage
  When using qualified class names, put the package name in the line after the class name, in order to reduce the width of class nodes.
-ranksep
  Specify the vertical separation between the class nodes (0.5 by default). Decreasing this can make a diagram more compact.
-shape
  Specify the shape to use for the rendered element(s). The following UML shapes are available:
  - class (default)
  - node
  - component
  - package
  - collaboration
  - usecase
  - activeclass

All colors can be either a symbolic name (e.g. blue), a tripple specifying hue-saturation-brightness as values 0-1 (e.g. ".13 0.9 1"), or a tripple specifying red-green-blue values as hexadecimal digits prefixed by a # (e.g. "#ff8020"). The symbolic color names are derived from the X Windows System; you can find a complete list in the Graphviz documentation

Font names are passed directly to the dot graph generation back-end. In general the Postcript standard names Times, Helvetica, Courier, and Symbol are safe to use.

## Relationship Inference

-collpackages
  Specify the classes that will be treated as containers for one to many relationships when inference is enabled. Matching is done using a non-anchored regular match. Empty by default.
-inferdep
  Try to automatically infer dependencies between classes by inspecting methods and fields. See the class diagram inference chapter for more details. Disabled by default.
-inferdepinpackage
  Enable or disable dependency inference among classes in the same package. This option is disabled by default, because classes in the same package are supposed to be related anyway, and also because there's no working mechanism to actually detect all of these dependencies since imports are not required to use classes in the same package.
-inferdepvis
  Specifies the lowest visibility level of elements used to infer dependencies among classes. Possible values are private, package, protected, public, in this order. The default value is private. Use higher levels to limit the number of inferred dependencies.
-inferrel
  Try to automatically infer relationships between classes by inspecting field values. See the class diagram inference chapter for further details. Disabled by default.
-inferreltype
  The type of relationship inferred when -inferrel is activated. Defaults to "navassoc" (see the class modelling chapter for a list of relationship types).
-useimports
  Will also use imports to infer dependencies. Disabled by default, since it does not work properly if there are multiple classes in the same source file (will add dependencies to every class in the source file).

## API Hyperlinks

-apidocmap
  Specify the file name of the URL mapping table. The is a standard Java property file, where the property name is a regular expression (as defined in the java.util.regex package) and the property value is an URL "root" as described above. This table is used to resolved external class names (class names that do not belong to the current package being processed by UMLGraph). If no file is provided, external classes will just be mapped to the on-line Java API documentation.
-apidocroot
  Specify the URL that should be used as the "root" for local classes. This URL will be used as a prefix, to which the page name for the local class or package will be appended (following the JavaDoc convention). For example, if the value `http://www.acme.org/apidocs` is provided, the class `org.acme.util.MyClass` will be mapped to the URL `http://www.acme.org/apidocs/org/acme/util/MyClass.html`. This URL will then be added to .dot diagram and can be surfaced in the final class diagram by setting the output to SVG, or by creating an HTML page that associates the diagram static image (a .gif or .png) with a client-side image map.
-link
  A clone of the standard doclet -link option, allows UMLGraph to generate links from class symbols to their external javadoc documentation (image maps are automatically generated in UMLGraphDoc, you'll have to generate them manually with graphviz if using UMLGraph).

## Operation

-compact
  Generate compact dot files, that is, print HTML labels in a single line instead of "pretty printing" them. Useful if the dot file has to be manipulated by an automated tool (e.g., the UMLGraph regression test suite).
-d
  Specify the output directory (defaults to the current directory).
-dotexecutable
  Specify the path of the dot executable.
-linkoffline
  Specify links to javadoc-generated documentation for external referenced classes. The `-linkoffline` option takes two arguments: the first for the string to be embedded in the `href` links, the second telling it where to find the `package-list`. Example:

      -linkoffline http://developer.android.com/reference file:/home/doc/android/

  See the javadoc documentation for more details.
-output
  Specify the output file (default `graph.dot`). If the output directory is provided, -output can only specify a file name, otherwise a full path is accepted as well. If the filename specified is a dash, then the results are printed on the standard output, and can be directly piped into dot. Note that, in order to avoid javadoc messages to contaminate UMLGraph's output, you must execute UMLGraph directly as a jar, not through javadoc.
-outputencoding
  Specify the output encoding character set (default `ISO-8859-1`). When using dot to generate SVG diagrams you should specify `UTF-8` as the output encoding, to have guillemots correctly appearing in the resulting SVG.
-verbose2
  Will print on the standard output details regarding the progress of graph generation. (Note that -verbose is a javadoc option with a different meaning).