Copyright | (c) Matthew Sackman Ivan Lazar Miljenovic |
---|---|
License | 3-Clause BSD-style |
Maintainer | Ivan.Miljenovic@gmail.com |
Safe Haskell | None |
Language | Haskell2010 |
If you are just using graphviz to create basic Dot graphs, then you probably want to use Data.GraphViz.Attributes rather than this module.
This module defines the various attributes that different parts of a Graphviz graph can have. These attributes are based on the documentation found at: http://graphviz.org/doc/info/attrs.html
For more information on usage, etc. please see that document.
A summary of known current constraints/limitations/differences:
- Note that for an edge, in Dot parlance if the edge goes from A to B, then A is the tail node and B is the head node (since A is at the tail end of the arrow).
ColorList
,DoubleList
andPointfList
are defined as actual lists (
needs a newtype for other reasons). All of these are assumed to be non-empty lists.LayerList
- For the various
*Color
attributes that take in a list ofAttribute
values, usually only one color is used. TheColor
attribute for edges allows multiple values; for other attributes, two values are supported for gradient fills in Graphviz >= 2.29.0. - Style is implemented as a list of
StyleItem
values; note that empty lists are not allowed. - A lot of values have a possible value of
none
. These now have custom constructors. In fact, most constructors have been expanded upon to give an idea of what they represent rather than using generic terms. Rect
uses twoPoint
values to denote the lower-left and top-right corners.- The two
LabelLoc
attributes have been combined. SplineType
has been replaced with[
.Spline
]- Only polygon-based
Attribute
s are available. - Not every
Attribute
is fully documented/described. However, all those which have specific allowed values should be covered. - Deprecated
Attribute
algorithms are not defined. Furthermore, the ability to specify an integer prefix for use with the fdp layout is not supported. - The global
Orientation
attribute is not defined, as it is difficult to distinguish from the node-basedOrientation
Attribute
; also, its behaviour is duplicated byRotate
. - The
charset
attribute is not available, as graphviz only supports UTF-8 encoding (as it is not currently feasible nor needed to also support Latin1 encoding). - In Graphviz, when a node or edge has a list of attributes, the
colorscheme which is used to identify a color can be set after
that color (e.g.
[colorscheme=x11,color=grey,colorscheme=svg]
uses the svg colorscheme's definition of grey, which is different from the x11 one. Instead, graphviz parses them in order.
Synopsis
- data Attribute
- = Damping Double
- | K Double
- | URL EscString
- | Area Double
- | ArrowHead ArrowType
- | ArrowSize Double
- | ArrowTail ArrowType
- | Background Text
- | BoundingBox Rect
- | BgColor ColorList
- | Center Bool
- | ClusterRank ClusterMode
- | Color ColorList
- | ColorScheme ColorScheme
- | Comment Text
- | Compound Bool
- | Concentrate Bool
- | Constraint Bool
- | Decorate Bool
- | DefaultDist Double
- | Dim Int
- | Dimen Int
- | Dir DirType
- | DirEdgeConstraints DEConstraints
- | Distortion Double
- | DPI Double
- | EdgeURL EscString
- | EdgeTarget EscString
- | EdgeTooltip EscString
- | Epsilon Double
- | ESep DPoint
- | FillColor ColorList
- | FixedSize NodeSize
- | FontColor Color
- | FontName Text
- | FontNames SVGFontNames
- | FontPath Paths
- | FontSize Double
- | ForceLabels Bool
- | GradientAngle Int
- | Group Text
- | HeadURL EscString
- | Head_LP Point
- | HeadClip Bool
- | HeadLabel Label
- | HeadPort PortPos
- | HeadTarget EscString
- | HeadTooltip EscString
- | Height Double
- | ID EscString
- | Image Text
- | ImagePath Paths
- | ImageScale ScaleType
- | InputScale Double
- | Label Label
- | LabelURL EscString
- | LabelScheme LabelScheme
- | LabelAngle Double
- | LabelDistance Double
- | LabelFloat Bool
- | LabelFontColor Color
- | LabelFontName Text
- | LabelFontSize Double
- | LabelJust Justification
- | LabelLoc VerticalPlacement
- | LabelTarget EscString
- | LabelTooltip EscString
- | Landscape Bool
- | Layer LayerRange
- | LayerListSep LayerListSep
- | Layers LayerList
- | LayerSelect LayerRange
- | LayerSep LayerSep
- | Layout GraphvizCommand
- | Len Double
- | Levels Int
- | LevelsGap Double
- | LHead Text
- | LHeight Double
- | LPos Point
- | LTail Text
- | LWidth Double
- | Margin DPoint
- | MaxIter Int
- | MCLimit Double
- | MinDist Double
- | MinLen Int
- | Mode ModeType
- | Model Model
- | Mosek Bool
- | NodeSep Double
- | NoJustify Bool
- | Normalize Normalized
- | NoTranslate Bool
- | Nslimit Double
- | Nslimit1 Double
- | Ordering Order
- | Orientation Double
- | OutputOrder OutputMode
- | Overlap Overlap
- | OverlapScaling Double
- | OverlapShrink Bool
- | Pack Pack
- | PackMode PackMode
- | Pad DPoint
- | Page Point
- | PageDir PageDir
- | PenColor Color
- | PenWidth Double
- | Peripheries Int
- | Pin Bool
- | Pos Pos
- | QuadTree QuadType
- | Quantum Double
- | Rank RankType
- | RankDir RankDir
- | RankSep [Double]
- | Ratio Ratios
- | Rects [Rect]
- | Regular Bool
- | ReMinCross Bool
- | RepulsiveForce Double
- | Root Root
- | Rotate Int
- | Rotation Double
- | SameHead Text
- | SameTail Text
- | SamplePoints Int
- | Scale DPoint
- | SearchSize Int
- | Sep DPoint
- | Shape Shape
- | ShowBoxes Int
- | Sides Int
- | Size GraphSize
- | Skew Double
- | Smoothing SmoothType
- | SortV Word16
- | Splines EdgeType
- | Start StartType
- | Style [StyleItem]
- | StyleSheet Text
- | TailURL EscString
- | Tail_LP Point
- | TailClip Bool
- | TailLabel Label
- | TailPort PortPos
- | TailTarget EscString
- | TailTooltip EscString
- | Target EscString
- | Tooltip EscString
- | TrueColor Bool
- | Vertices [Point]
- | ViewPort ViewPort
- | VoroMargin Double
- | Weight Number
- | Width Double
- | XDotVersion Version
- | XLabel Label
- | XLP Point
- | UnknownAttribute AttributeName Text
- type Attributes = [Attribute]
- sameAttribute :: Attribute -> Attribute -> Bool
- defaultAttributeValue :: Attribute -> Maybe Attribute
- rmUnwantedAttributes :: Attributes -> Attributes
- usedByGraphs :: Attribute -> Bool
- usedBySubGraphs :: Attribute -> Bool
- usedByClusters :: Attribute -> Bool
- usedByNodes :: Attribute -> Bool
- usedByEdges :: Attribute -> Bool
- validUnknown :: AttributeName -> Bool
- type AttributeName = Text
- type CustomAttribute = Attribute
- customAttribute :: AttributeName -> Text -> CustomAttribute
- isCustom :: Attribute -> Bool
- isSpecifiedCustom :: AttributeName -> Attribute -> Bool
- customValue :: CustomAttribute -> Text
- customName :: CustomAttribute -> AttributeName
- findCustoms :: Attributes -> ([CustomAttribute], Attributes)
- findSpecifiedCustom :: AttributeName -> Attributes -> Maybe (CustomAttribute, Attributes)
- deleteCustomAttributes :: Attributes -> Attributes
- deleteSpecifiedCustom :: AttributeName -> Attributes -> Attributes
- module Data.GraphViz.Attributes.Colors
- data Number
- type EscString = Text
- data Label
- data VerticalPlacement
- data LabelScheme
- data SVGFontNames
- type RecordFields = [RecordField]
- data RecordField
- data Rect = Rect Point Point
- data Justification
- data Shape
- = BoxShape
- | Polygon
- | Ellipse
- | Circle
- | PointShape
- | Egg
- | Triangle
- | PlainText
- | DiamondShape
- | Trapezium
- | Parallelogram
- | House
- | Pentagon
- | Hexagon
- | Septagon
- | Octagon
- | DoubleCircle
- | DoubleOctagon
- | TripleOctagon
- | InvTriangle
- | InvTrapezium
- | InvHouse
- | MDiamond
- | MSquare
- | MCircle
- | Square
- | Star
- | Underline
- | Note
- | Tab
- | Folder
- | Box3D
- | Component
- | Promoter
- | CDS
- | Terminator
- | UTR
- | PrimerSite
- | RestrictionSite
- | FivePovOverhang
- | ThreePovOverhang
- | NoOverhang
- | Assembly
- | Signature
- | Insulator
- | Ribosite
- | RNAStab
- | ProteaseSite
- | ProteinStab
- | RPromoter
- | RArrow
- | LArrow
- | LPromoter
- | Record
- | MRecord
- newtype Paths = Paths {}
- data ScaleType
- data NodeSize
- data DirType
- data EdgeType
- newtype PortName = PN {}
- data PortPos
- data CompassPoint
- newtype ArrowType = AType [(ArrowModifier, ArrowShape)]
- data ArrowShape
- data ArrowModifier = ArrMod {}
- data ArrowFill
- data ArrowSide
- noMods :: ArrowModifier
- openMod :: ArrowModifier
- data Point = Point {}
- createPoint :: Double -> Double -> Point
- data Pos
- data Spline = Spline {
- endPoint :: Maybe Point
- startPoint :: Maybe Point
- splinePoints :: [Point]
- data DPoint
- data Normalized
- data GraphvizCommand
- data GraphSize = GSize {}
- data ClusterMode
- data Model
- data Overlap
- data Root
- data Order
- data OutputMode
- data Pack
- = DoPack
- | DontPack
- | PackMargin Int
- data PackMode
- data PageDir
- data QuadType
- data RankType
- = SameRank
- | MinRank
- | SourceRank
- | MaxRank
- | SinkRank
- data RankDir
- data StartType
- data ViewPort = VP {}
- data FocusType
- data Ratios
- data ModeType
- data DEConstraints
- newtype LayerSep = LSep Text
- newtype LayerListSep = LLSep Text
- type LayerRange = [LayerRangeElem]
- data LayerRangeElem
- data LayerID
- newtype LayerList = LL [LayerID]
- data SmoothType
- data STStyle
- data StyleItem = SItem StyleName [Text]
- data StyleName
The actual Dot attributes.
These attributes have been implemented in a permissive manner: that is, rather than split them up based on which type of value they are allowed, they have all been included in the one data type, with functions to determine if they are indeed valid for what they're being applied to.
To interpret the Valid for listings:
G
- Valid for Graphs.
C
- Valid for Clusters.
S
- Valid for Sub-Graphs (and also Clusters).
N
- Valid for Nodes.
E
- Valid for Edges.
The Default listings are those that the various Graphviz commands
use if that Attribute
isn't specified (in cases where this is
none, this is equivalent to a Nothing
value; that is, no value
is used). The Parsing Default listings represent what value is
used (i.e. corresponds to True
) when the Attribute
name is
listed on its own in Dot source code.
Please note that the UnknownAttribute
Attribute
is defined
primarily for backwards-compatibility purposes. It is possible to use
it directly for custom purposes; for more information, please see
CustomAttribute
. The deleteCustomAttributes
can be used to delete
these values.
Attributes are used to customise the layout and design of Dot graphs. Care must be taken to ensure that the attribute you use is valid, as not all attributes can be used everywhere.
Damping Double | Valid for: G; Default: |
K Double | Valid for: GC; Default: |
URL EscString | Valid for: ENGC; Default: none; Notes: svg, postscript, map only |
Area Double | Valid for: NC; Default: |
ArrowHead ArrowType | Valid for: E; Default: |
ArrowSize Double | Valid for: E; Default: |
ArrowTail ArrowType | Valid for: E; Default: |
Background Text | Valid for: G; Default: none; Notes: xdot only |
BoundingBox Rect | Valid for: G; Notes: write only |
BgColor ColorList | Valid for: GC; Default: |
Center Bool | |
ClusterRank ClusterMode | |
Color ColorList | |
ColorScheme ColorScheme | Valid for: ENCG; Default: |
Comment Text | Valid for: ENG; Default: |
Compound Bool | Valid for: G; Default: |
Concentrate Bool | |
Constraint Bool | Valid for: E; Default: |
Decorate Bool | |
DefaultDist Double | Valid for: G; Default: |
Dim Int | Valid for: G; Default: |
Dimen Int | Valid for: G; Default: |
Dir DirType | Valid for: E; Default: |
DirEdgeConstraints DEConstraints | Valid for: G; Default: |
Distortion Double | Valid for: N; Default: |
DPI Double | Valid for: G; Default: |
EdgeURL EscString | Valid for: E; Default: |
EdgeTarget EscString | Valid for: E; Default: none; Notes: svg, map only |
EdgeTooltip EscString | Valid for: E; Default: |
Epsilon Double | Valid for: G; Default: |
ESep DPoint | |
FillColor ColorList | Valid for: NEC; Default: |
FixedSize NodeSize | Valid for: N; Default: |
FontColor Color | |
FontName Text | Valid for: ENGC; Default: |
FontNames SVGFontNames | Valid for: G; Default: |
FontPath Paths | Valid for: G; Default: system dependent |
FontSize Double | Valid for: ENGC; Default: |
ForceLabels Bool | Valid for: G; Default: |
GradientAngle Int | Valid for: NCG; Default: 0; Notes: requires Graphviz >= 2.29.0 |
Group Text | Valid for: N; Default: |
HeadURL EscString | Valid for: E; Default: |
Head_LP Point | Valid for: E; Notes: write only, requires Graphviz >= 2.30.0 |
HeadClip Bool | |
HeadLabel Label | Valid for: E; Default: |
HeadPort PortPos | Valid for: E; Default: |
HeadTarget EscString | Valid for: E; Default: none; Notes: svg, map only |
HeadTooltip EscString | Valid for: E; Default: |
Height Double | Valid for: N; Default: |
ID EscString | Valid for: GNE; Default: |
Image Text | Valid for: N; Default: |
ImagePath Paths | Valid for: G; Default: |
ImageScale ScaleType | Valid for: N; Default: |
InputScale Double | Valid for: N; Default: none; Notes: |
Label Label | Valid for: ENGC; Default: |
LabelURL EscString | Valid for: E; Default: |
LabelScheme LabelScheme | Valid for: G; Default: |
LabelAngle Double | Valid for: E; Default: |
LabelDistance Double | Valid for: E; Default: |
LabelFloat Bool | |
LabelFontColor Color | |
LabelFontName Text | Valid for: E; Default: |
LabelFontSize Double | Valid for: E; Default: |
LabelJust Justification | Valid for: GC; Default: |
LabelLoc VerticalPlacement | Valid for: GCN; Default: |
LabelTarget EscString | Valid for: E; Default: none; Notes: svg, map only |
LabelTooltip EscString | Valid for: E; Default: |
Landscape Bool | |
Layer LayerRange | Valid for: ENC; Default: |
LayerListSep LayerListSep | Valid for: G; Default: |
Layers LayerList | Valid for: G; Default: |
LayerSelect LayerRange | Valid for: G; Default: |
LayerSep LayerSep | Valid for: G; Default: |
Layout GraphvizCommand | Valid for: G |
Len Double | Valid for: E; Default: |
Levels Int | Valid for: G; Default: |
LevelsGap Double | Valid for: G; Default: |
LHead Text | Valid for: E; Default: |
LHeight Double | Valid for: GC; Notes: write only, requires Graphviz >= 2.28.0 |
LPos Point | Valid for: EGC; Notes: write only |
LTail Text | Valid for: E; Default: |
LWidth Double | Valid for: GC; Notes: write only, requires Graphviz >= 2.28.0 |
Margin DPoint | Valid for: NGC; Default: device dependent |
MaxIter Int | Valid for: G; Default: |
MCLimit Double | Valid for: G; Default: |
MinDist Double | Valid for: G; Default: |
MinLen Int | Valid for: E; Default: |
Mode ModeType | Valid for: G; Default: |
Model Model | |
Mosek Bool | Valid for: G; Default: |
NodeSep Double | Valid for: G; Default: |
NoJustify Bool | |
Normalize Normalized | Valid for: G; Default: |
NoTranslate Bool | Valid for: G; Default: |
Nslimit Double | Valid for: G; Notes: |
Nslimit1 Double | Valid for: G; Notes: |
Ordering Order | Valid for: GN; Default: none; Notes: |
Orientation Double | Valid for: N; Default: |
OutputOrder OutputMode | Valid for: G; Default: |
Overlap Overlap | Valid for: G; Default: |
OverlapScaling Double | Valid for: G; Default: |
OverlapShrink Bool | Valid for: G; Default: |
Pack Pack | |
PackMode PackMode | Valid for: G; Default: |
Pad DPoint | Valid for: G; Default: |
Page Point | Valid for: G |
PageDir PageDir | Valid for: G; Default: |
PenColor Color | |
PenWidth Double | Valid for: CNE; Default: |
Peripheries Int | Valid for: NC; Default: shape default (nodes), |
Pin Bool | Valid for: N; Default: |
Pos Pos | Valid for: EN |
QuadTree QuadType | Valid for: G; Default: |
Quantum Double | Valid for: G; Default: |
Rank RankType | Valid for: S; Notes: |
RankDir RankDir | |
RankSep [Double] | Valid for: G; Default: |
Ratio Ratios | Valid for: G |
Rects [Rect] | Valid for: N; Notes: write only |
Regular Bool | |
ReMinCross Bool | Valid for: G; Default: |
RepulsiveForce Double | Valid for: G; Default: |
Root Root | Valid for: GN; Default: |
Rotate Int | Valid for: G; Default: |
Rotation Double | Valid for: G; Default: |
SameHead Text | Valid for: E; Default: |
SameTail Text | Valid for: E; Default: |
SamplePoints Int | Valid for: N; Default: |
Scale DPoint | Valid for: G; Notes: Not |
SearchSize Int | Valid for: G; Default: |
Sep DPoint | |
Shape Shape | Valid for: N; Default: |
ShowBoxes Int | Valid for: ENG; Default: |
Sides Int | Valid for: N; Default: |
Size GraphSize | Valid for: G |
Skew Double | Valid for: N; Default: |
Smoothing SmoothType | |
SortV Word16 | Valid for: GCN; Default: |
Splines EdgeType | Valid for: G; Default: |
Start StartType | Valid for: G; Default: |
Style [StyleItem] | Valid for: ENCG |
StyleSheet Text | Valid for: G; Default: |
TailURL EscString | Valid for: E; Default: |
Tail_LP Point | Valid for: E; Notes: write only, requires Graphviz >= 2.30.0 |
TailClip Bool | |
TailLabel Label | Valid for: E; Default: |
TailPort PortPos | Valid for: E; Default: |
TailTarget EscString | Valid for: E; Default: none; Notes: svg, map only |
TailTooltip EscString | Valid for: E; Default: |
Target EscString | Valid for: ENGC; Default: none; Notes: svg, map only |
Tooltip EscString | Valid for: NEC; Default: |
TrueColor Bool | Valid for: G; Parsing Default: |
Vertices [Point] | Valid for: N; Notes: write only |
ViewPort ViewPort | Valid for: G; Default: none |
VoroMargin Double | Valid for: G; Default: |
Weight Number | Valid for: E; Default: |
Width Double | Valid for: N; Default: |
XDotVersion Version | Valid for: G; Notes: xdot only, requires Graphviz >= 2.34.0, equivalent to specifying version of xdot to be used |
XLabel Label | Valid for: EN; Default: |
XLP Point | Valid for: EN; Notes: write only, requires Graphviz >= 2.29.0 |
UnknownAttribute AttributeName Text | Valid for: Assumed valid for all; the fields are |
type Attributes = [Attribute] Source #
sameAttribute :: Attribute -> Attribute -> Bool Source #
Determine if two Attributes
are the same type of Attribute
.
defaultAttributeValue :: Attribute -> Maybe Attribute Source #
Return the default value for a specific Attribute
if possible; graphcluster values are preferred over nodeedge values.
rmUnwantedAttributes :: Attributes -> Attributes Source #
Remove attributes that we don't want to consider:
- Those that are defaults
- colorscheme (as the colors embed it anyway)
Validity functions on Attribute
values.
usedBySubGraphs :: Attribute -> Bool Source #
Determine if this Attribute
is valid for use with SubGraphs.
usedByClusters :: Attribute -> Bool Source #
Determine if this Attribute
is valid for use with Clusters.
validUnknown :: AttributeName -> Bool Source #
Determine if the provided Text
value is a valid name for an UnknownAttribute
.
Custom attributes.
type AttributeName = Text Source #
The name for an UnknownAttribute; must satisfy validUnknown
.
type CustomAttribute = Attribute Source #
If performing any custom pre-/post-processing on Dot code, you
may wish to utilise some custom Attributes
. These are wrappers
around the UnknownAttribute
constructor (and thus CustomAttribute
is just an alias for Attribute
).
You should ensure that validUnknown
is True
for any potential
custom attribute name.
customAttribute :: AttributeName -> Text -> CustomAttribute Source #
Create a custom attribute.
isSpecifiedCustom :: AttributeName -> Attribute -> Bool Source #
customValue :: CustomAttribute -> Text Source #
The value of a custom attribute. Will throw a
GraphvizException
if the provided Attribute
isn't a custom
one.
customName :: CustomAttribute -> AttributeName Source #
The name of a custom attribute. Will throw a
GraphvizException
if the provided Attribute
isn't a custom
one.
findCustoms :: Attributes -> ([CustomAttribute], Attributes) Source #
Returns all custom attributes and the list of non-custom Attributes.
findSpecifiedCustom :: AttributeName -> Attributes -> Maybe (CustomAttribute, Attributes) Source #
Find the (first instance of the) specified custom attribute and returns it along with all other Attributes.
deleteCustomAttributes :: Attributes -> Attributes Source #
Delete all custom attributes (actually, this will delete all
UnknownAttribute
values; as such it can also be used to remove
legacy attributes).
deleteSpecifiedCustom :: AttributeName -> Attributes -> Attributes Source #
Removes all instances of the specified custom attribute.
Value types for Attribute
s.
Generic types
A numeric type with an explicit separation between integers and floating-point values.
Labels
type EscString = Text Source #
Some Attribute
s (mainly label-like ones) take a String
argument
that allows for extra escape codes. This library doesn't do any
extra checks or special parsing for these escape codes, but usage
of EscString
rather than Text
indicates that the Graphviz
tools will recognise these extra escape codes for these
Attribute
s.
The extra escape codes include (note that these are all Strings):
\N
- Replace with the name of the node (for Node
Attribute
s). \G
- Replace with the name of the graph (for Node
Attribute
s) or the name of the graph or cluster, whichever is applicable (for Graph, Cluster and EdgeAttribute
s). \E
- Replace with the name of the edge, formed by the two
adjoining nodes and the edge type (for Edge
Attribute
s). \T
- Replace with the name of the tail node (for Edge
Attribute
s). \H
- Replace with the name of the head node (for Edge
Attribute
s). \L
- Replace with the object's label (for all
Attribute
s).
Also, if the Attribute
in question is Label
, HeadLabel
or
TailLabel
, then \n
, \l
and \r
split the label into lines
centered, left-justified and right-justified respectively.
StrLabel EscString | |
HtmlLabel Label | If |
RecordLabel RecordFields | For nodes only; requires
either |
data VerticalPlacement Source #
Instances
data LabelScheme Source #
How to treat a node whose name is of the form "|edgelabel|*
"
as a special node representing an edge label.
NotEdgeLabel | No effect |
CloseToCenter | Make node close to center of neighbor |
CloseToOldCenter | Make node close to old center of neighbor |
RemoveAndStraighten | Use a two-step process. |
Instances
data SVGFontNames Source #
The mapping used for FontName
values in SVG output.
More information can be found at http://www.graphviz.org/doc/fontfaq.txt.
SvgNames | Use the legal generic SVG font names. |
PostScriptNames | Use PostScript font names. |
FontConfigNames | Use fontconfig font conventions. |
Instances
Types representing the Dot grammar for records.
type RecordFields = [RecordField] Source #
A RecordFields value should never be empty.
data RecordField Source #
Specifies the sub-values of a record-based label. By default,
the cells are laid out horizontally; use FlipFields
to change
the orientation of the fields (can be applied recursively). To
change the default orientation, use RankDir
.
LabelledTarget PortName EscString | |
PortName PortName | Will result in no label for that cell. |
FieldLabel EscString | |
FlipFields RecordFields |
Instances
Should only have 2D points (i.e. created with createPoint
).
data Justification Source #
Instances
Nodes
Geometries of shapes are affected by the attributes Regular
,
Peripheries
and Orientation
.
BoxShape | Has synonyms of rect and rectangle. |
Polygon | Also affected by |
Ellipse | Has synonym of oval. |
Circle | |
PointShape | Only affected by |
Egg | |
Triangle | |
PlainText | Has synonym of none. Recommended for
|
DiamondShape | |
Trapezium | |
Parallelogram | |
House | |
Pentagon | |
Hexagon | |
Septagon | |
Octagon | |
DoubleCircle | |
DoubleOctagon | |
TripleOctagon | |
InvTriangle | |
InvTrapezium | |
InvHouse | |
MDiamond | |
MSquare | |
MCircle | |
Square | |
Star | Requires Graphviz >= 2.32.0. |
Underline | Requires Graphviz >= 2.36.0. |
Note | |
Tab | |
Folder | |
Box3D | |
Component | |
Promoter | Requires Graphviz >= 2.30.0. |
CDS | Requires Graphviz >= 2.30.0. |
Terminator | Requires Graphviz >= 2.30.0. |
UTR | Requires Graphviz >= 2.30.0. |
PrimerSite | Requires Graphviz >= 2.30.0. |
RestrictionSite | Requires Graphviz >= 2.30.0. |
FivePovOverhang | Requires Graphviz >= 2.30.0. |
ThreePovOverhang | Requires Graphviz >= 2.30.0. |
NoOverhang | Requires Graphviz >= 2.30.0. |
Assembly | Requires Graphviz >= 2.30.0. |
Signature | Requires Graphviz >= 2.30.0. |
Insulator | Requires Graphviz >= 2.30.0. |
Ribosite | Requires Graphviz >= 2.30.0. |
RNAStab | Requires Graphviz >= 2.30.0. |
ProteaseSite | Requires Graphviz >= 2.30.0. |
ProteinStab | Requires Graphviz >= 2.30.0. |
RPromoter | Requires Graphviz >= 2.30.0. |
RArrow | Requires Graphviz >= 2.30.0. |
LArrow | Requires Graphviz >= 2.30.0. |
LPromoter | Requires Graphviz >= 2.30.0. |
Record | Must specify the record shape with a |
MRecord | Must specify the record shape with a |
A list of search paths.
Instances
Bounded ScaleType Source # | |
Enum ScaleType Source # | |
Defined in Data.GraphViz.Attributes.Values succ :: ScaleType -> ScaleType # pred :: ScaleType -> ScaleType # fromEnum :: ScaleType -> Int # enumFrom :: ScaleType -> [ScaleType] # enumFromThen :: ScaleType -> ScaleType -> [ScaleType] # enumFromTo :: ScaleType -> ScaleType -> [ScaleType] # enumFromThenTo :: ScaleType -> ScaleType -> ScaleType -> [ScaleType] # | |
Eq ScaleType Source # | |
Ord ScaleType Source # | |
Defined in Data.GraphViz.Attributes.Values | |
Read ScaleType Source # | |
Show ScaleType Source # | |
ParseDot ScaleType Source # | |
PrintDot ScaleType Source # | |
Determine how the Width
and Height
attributes specify the
size of nodes.
GrowAsNeeded | Nodes will be the smallest width and height
needed to contain the label and any possible
image. |
SetNodeSize |
|
SetShapeSize |
|
Instances
Edges
Specify where to place arrow heads on an edge.
Forward | Draw a directed edge with an arrow to the node it's pointing go. |
Back | Draw a reverse directed edge with an arrow to the node it's coming from. |
Both | Draw arrows on both ends of the edge. |
NoDir | Draw an undirected edge. |
Instances
Controls how (and if) edges are represented.
For Dot
, the default is SplineEdges
; for all other layouts
the default is LineEdges
.
SplineEdges | Except for |
LineEdges | |
NoEdges | |
PolyLine | |
Ortho | Does not handle ports or edge labels in |
Curved | Requires Graphviz >= 2.30.0. |
CompoundEdge |
|
Instances
Modifying where edges point
Specifies a name for ports (used also in record-based and
HTML-like labels). Note that it is not valid for a PortName
value to contain a colon (:
) character; it is assumed that it
doesn't.
Instances
Eq PortName Source # | |
Ord PortName Source # | |
Defined in Data.GraphViz.Attributes.Internal | |
Read PortName Source # | |
Show PortName Source # | |
ParseDot PortName Source # | |
PrintDot PortName Source # | |
Labellable PortName Source # | A shorter variant than using |
Defined in Data.GraphViz.Attributes toLabelValue :: PortName -> Label Source # | |
Labellable (PortName, EscString) Source # | A shorter variant than using |
Defined in Data.GraphViz.Attributes |
data CompassPoint Source #
Instances
Arrows
Dot has a basic grammar of arrow shapes which allows usage of
up to 1,544,761 different shapes from 9 different basic
ArrowShape
s. Note that whilst an explicit list is used in the
definition of ArrowType
, there must be at least one tuple and a
maximum of 4 (since that is what is required by Dot). For more
information, see: http://graphviz.org/doc/info/arrows.html
The 19 basic arrows shown on the overall attributes page have been defined below as a convenience. Parsing of the 5 backward-compatible special cases is also supported.
AType [(ArrowModifier, ArrowShape)] |
data ArrowShape Source #
Instances
data ArrowModifier Source #
What modifications to apply to an ArrowShape
.
Instances
Instances
Bounded ArrowFill Source # | |
Enum ArrowFill Source # | |
Defined in Data.GraphViz.Attributes.Arrows succ :: ArrowFill -> ArrowFill # pred :: ArrowFill -> ArrowFill # fromEnum :: ArrowFill -> Int # enumFrom :: ArrowFill -> [ArrowFill] # enumFromThen :: ArrowFill -> ArrowFill -> [ArrowFill] # enumFromTo :: ArrowFill -> ArrowFill -> [ArrowFill] # enumFromThenTo :: ArrowFill -> ArrowFill -> ArrowFill -> [ArrowFill] # | |
Eq ArrowFill Source # | |
Ord ArrowFill Source # | |
Defined in Data.GraphViz.Attributes.Arrows | |
Read ArrowFill Source # | |
Show ArrowFill Source # | |
ParseDot ArrowFill Source # | |
PrintDot ArrowFill Source # | |
Represents which side (when looking towards the node the arrow is pointing to) is drawn.
Instances
Bounded ArrowSide Source # | |
Enum ArrowSide Source # | |
Defined in Data.GraphViz.Attributes.Arrows succ :: ArrowSide -> ArrowSide # pred :: ArrowSide -> ArrowSide # fromEnum :: ArrowSide -> Int # enumFrom :: ArrowSide -> [ArrowSide] # enumFromThen :: ArrowSide -> ArrowSide -> [ArrowSide] # enumFromTo :: ArrowSide -> ArrowSide -> [ArrowSide] # enumFromThenTo :: ArrowSide -> ArrowSide -> ArrowSide -> [ArrowSide] # | |
Eq ArrowSide Source # | |
Ord ArrowSide Source # | |
Defined in Data.GraphViz.Attributes.Arrows | |
Read ArrowSide Source # | |
Show ArrowSide Source # | |
ParseDot ArrowSide Source # | |
PrintDot ArrowSide Source # | |
ArrowModifier
values
noMods :: ArrowModifier Source #
Apply no modifications to an ArrowShape
.
Positioning
The number of points in the list must be equivalent to 1 mod 3; note that this is not checked.
Spline | |
|
Either a Double
or a (2D) Point
(i.e. created with
createPoint
).
Whilst it is possible to create a Point
value with either a
third co-ordinate or a forced position, these are ignored for
printing/parsing.
An optional prefix of '+'
is allowed when parsing.
data Normalized Source #
If set, normalizes coordinates such that the first point is at the origin and the first edge is at the angle if specified.
IsNormalized | Equivalent to |
NotNormalized | |
NormalizedAngle Double | Angle of first edge when normalized. Requires Graphviz >= 2.32.0. |
Instances
Layout
data GraphvizCommand Source #
The available Graphviz commands. The following directions are
based upon those in the Graphviz man page (available online at
http://graphviz.org/pdf/dot.1.pdf, or if installed on your
system man graphviz
). Note that any command can be used on
both directed and undirected graphs.
When used with the Layout
attribute, it overrides any actual
command called on the dot graph.
Dot | For hierachical graphs (ideal for directed graphs). |
Neato | For symmetric layouts of graphs (ideal for undirected graphs). |
TwoPi | For radial layout of graphs. |
Circo | For circular layout of graphs. |
Fdp | Spring-model approach for undirected graphs. |
Sfdp | As with Fdp, but ideal for large graphs. |
Osage | Filter for drawing clustered graphs, requires Graphviz >= 2.28.0. |
Patchwork | Draw clustered graphs as treemaps, requires Graphviz >= 2.28.0. |
Instances
Maximum width and height of drawing in inches.
data ClusterMode Source #
If Local
, then sub-graphs that are clusters are given special
treatment. Global
and NoCluster
currently appear to be
identical and turn off the special cluster processing.
Instances
How to deal with node overlaps.
Defaults to KeepOverlaps
except for Fdp
and Sfdp
.
The ability to specify the number of tries for Fdp'
s initial
force-directed technique is not supported (by default, Fdp
uses
9
passes of its in-built technique, and then
).PrismOverlap
Nothing
For Sfdp
, the default is
.PrismOverlap
(Just 0)
KeepOverlaps | |
ScaleOverlaps | Remove overlaps by uniformly scaling in x and y. |
ScaleXYOverlaps | Remove overlaps by separately scaling x and y. |
PrismOverlap (Maybe Word16) | Requires the Prism
library to be
available (if not,
this is equivalent to
|
VoronoiOverlap | Requires Graphviz >= 2.30.0. |
CompressOverlap | Scale layout down as much as possible without introducing overlaps, assuming none to begin with. |
VpscOverlap | Uses quadratic optimization to minimize node displacement. |
IpsepOverlap | Only when |
Instances
Eq Overlap Source # | |
Ord Overlap Source # | |
Defined in Data.GraphViz.Attributes.Values | |
Read Overlap Source # | |
Show Overlap Source # | |
ParseDot Overlap Source # | Note that |
PrintDot Overlap Source # | |
Specify the root node either as a Node attribute or a Graph attribute.
IsCentral | For Nodes only |
NotCentral | For Nodes only |
NodeName Text | For Graphs only |
data OutputMode Source #
Instances
DoPack | |
DontPack | |
PackMargin Int | If non-negative, then packs; otherwise doesn't. |
PackNode | |
PackClust | |
PackGraph | |
PackArray Bool Bool (Maybe Int) | Sort by cols, sort by user, number of rows/cols |
Upper-case first character is major order; lower-case second character is minor order.
Instances
Instances
Instances
Instances
For use with ViewPort
.
Modes
For Neato
unless indicated otherwise.
Major | |
KK | |
Hier | |
IpSep | |
SpringMode | For |
MaxEnt | For |
Instances
data DEConstraints Source #
Only when mode ==
.IpSep
Instances
Bounded DEConstraints Source # | |
Defined in Data.GraphViz.Attributes.Values | |
Enum DEConstraints Source # | |
Defined in Data.GraphViz.Attributes.Values succ :: DEConstraints -> DEConstraints # pred :: DEConstraints -> DEConstraints # toEnum :: Int -> DEConstraints # fromEnum :: DEConstraints -> Int # enumFrom :: DEConstraints -> [DEConstraints] # enumFromThen :: DEConstraints -> DEConstraints -> [DEConstraints] # enumFromTo :: DEConstraints -> DEConstraints -> [DEConstraints] # enumFromThenTo :: DEConstraints -> DEConstraints -> DEConstraints -> [DEConstraints] # | |
Eq DEConstraints Source # | |
Defined in Data.GraphViz.Attributes.Values (==) :: DEConstraints -> DEConstraints -> Bool # (/=) :: DEConstraints -> DEConstraints -> Bool # | |
Ord DEConstraints Source # | |
Defined in Data.GraphViz.Attributes.Values compare :: DEConstraints -> DEConstraints -> Ordering # (<) :: DEConstraints -> DEConstraints -> Bool # (<=) :: DEConstraints -> |