Difference between revisions of "Wgraph:Manual"

From FollowTheScore
Jump to: navigation, search
(New page: {{Type:Manual|section=Index}} '''Wgraph''' is a Mediawiki extension which can generate graphs.)
 
Line 2: Line 2:
  
 
'''[[mw:Extension:Wgraph|Wgraph]]''' is a Mediawiki extension which can generate graphs.
 
'''[[mw:Extension:Wgraph|Wgraph]]''' is a Mediawiki extension which can generate graphs.
 +
 +
== Commands on node / edge level ==
 +
 +
* All the following commands operate on node or edge level. They cannot be used outside a node or edge definition.
 +
* The arguments of identical statements overwrite each other so that the last statement wins.
 +
* Text arguments must be quoted if they contain a space or comma.
 +
 +
=== [node,edge]   textwidth ===
 +
 +
textwidth : <tw>            where <tw> is a positive number      default = 15
 +
 +
wgraph tries to break a text into lines at certain special characters. Lines are at least <tw> characters long.
 +
Special characters are blank, and ",-(;/" plus some others.
 +
 +
== Commands on graph level that refer to nodetypes and edge types ==
 +
 +
* All the following commands operate on graph level. They cannot be used inside a node or edge definition.
 +
* The arguments of identical statements are merged. This means that (skip_nodetypes x,z skip_nodetypes a,b) and (skip_nodetypes x,z,a,b) are equivalent.
 +
* Lists must quoted if they contain spaces.
 +
* List elements are separated by comma, surrounded by optional spaces
 +
 +
 +
=== [graph] &nbsp; nodetypes ===
 +
 +
nodetypes : "comma separated list of (node) type names"
 +
 +
This command is used to define the order in which the layout attributes of nodetypes are applied to nodes.
 +
Note that a node can belong to more than one type. Once a node attribue is set it will not be overwritten by conflicting attributes of types which come later in the priority order.
 +
 +
If no "nodetypes" statement is found the order of applying layout attributes will be determined by the sequence in which the nodetype definitions appear in the WGL code.
 +
 +
 +
=== [graph] &nbsp; edgetypes ===
 +
 +
edgetypes : "comma separated list of (edge) type names"
 +
 +
This works for edges the same way as 'nodetypes' works for nodes.
 +
 +
 +
=== [graph] &nbsp; hide_nodetypes ===
 +
 +
hide_nodetypes : "comma separated list of (node) type names"
 +
 +
Nodes which belong to one of the specified types will be made invisible. Note that they are still there and influence the layout. This is useful if you want to maintain graph layout and just want to "switch off" nodes of a certain type.
 +
As a consequence, all edges connected to invisible nodes will be made invisible, too.
 +
 +
 +
=== [graph] &nbsp; hide_edgetypes ===
 +
 +
hide_edgetypes : "comma separated list of (edge) type names"
 +
 +
Edges which belong to one of the specified types will be made invisible. Note that they are still there and influence the layout. This is useful if you want to maintain graph layout and just want to "switch off" edges of a certain type.
 +
If, as a consequence, certains nodes would only be connected to invisible edges these nodes will be made invisible, too.
 +
 +
 +
=== [graph] &nbsp; show_nodetypes ===
 +
 +
show_nodetypes : "comma separated list of (node) type names"
 +
 +
Only nodes which belong to one of the specified types will be displayed. All other nodes will be skipped (i.e. thrown away).
 +
As a consequence, all edges connected to skipped nodes will be thrown away, too.
 +
Note that the layout will be calculated based on the remaining nodes and edges only.
 +
 +
 +
=== [graph] &nbsp; show_edgetypes ===
 +
 +
show_edgetypes : "comma separated list of (edge) type names"
 +
 +
Only edges which belong to one of the specified types will be displayed. All other edges will be skipped (i.e. thrown away).
 +
As a consequence, all nodes which would only be connected to skipped edges will be thrown away, too.
 +
Note that the layout will be calculated based on the remaining nodes and edges only.
 +
 +
 +
=== [graph] &nbsp; skip_nodetypes ===
 +
 +
skip_nodetypes : "comma separated list of (node) type names"
 +
 +
Nodes which belong to one of the specified types will not be displayed. They will be thrown away and will not influence the layout. As a consequence, all edges connected to skipped nodes will be thrown away, too.
 +
Note that the layout will be calculated based on the remaining nodes and edges only.
 +
 +
 +
=== [graph] &nbsp; skip_edgetypes ===
 +
 +
skip_edgetypes : "comma separated list of (edge) type names"
 +
 +
Edges which belong to one of the specified types will not be displayed. They will be thrown away and will not influence the layout. As a consequence, all nodes which would only be connected to skipped edges will be thrown away, too.
 +
Note that the layout will be calculated based on the remaining nodes and edges only.
 +
 +
 +
 +
 +
 +
 +
 +
 +
== Commands on graph level that refer to nodes ==
 +
 +
* All the following commands operate on graph level. They cannot be used inside a node or edge definition.
 +
* The arguments of identical statements are merged. This means that (skip_nodes x skip_nodes y) and (skip_nodes x,y) are equivalent.
 +
* Lists must quoted if they contain spaces.
 +
* List elements are separated by comma, surrounded by optional spaces
 +
 +
=== [graph] &nbsp; hide_nodes ===
 +
 +
hide_nodes : "comma separated list of node names"
 +
 +
The nodes mentioned will be made invisible. Note that they are still there and influence the layout. This is useful if you want to maintain graph layout and just want to "switch off" certain nodes.
 +
As a consequence, all edges connected to invisible nodes will be made invisible, too.
 +
 +
 +
=== [graph] &nbsp; show_nodes ===
 +
 +
show_nodes : "comma separated list of node names"
 +
 +
Only the nodes mentioned will be displayed. All other nodes will be skipped (i.e. thrown away).
 +
As a consequence, all edges connected to skipped nodes will be thrown away, too.
 +
Note that the layout will be calculated based on the remaining nodes and edges only.
 +
 +
 +
=== [graph] &nbsp; skip_nodes ===
 +
 +
skip_nodes : "comma separated list of node names"
 +
 +
The nodes mentioned will not be displayed. They will be thrown away and will not influence the layout. As a consequence, all edges connected to skipped nodes will be thrown away, too.
 +
Note that the layout will be calculated based on the remaining nodes and edges only.
 +
 +
[[Category:wgraph]]

Revision as of 16:16, 21 July 2007

Template:Type:Manual

Wgraph is a Mediawiki extension which can generate graphs.

Commands on node / edge level

  • All the following commands operate on node or edge level. They cannot be used outside a node or edge definition.
  • The arguments of identical statements overwrite each other so that the last statement wins.
  • Text arguments must be quoted if they contain a space or comma.

[node,edge]   textwidth

textwidth : <tw>            where <tw> is a positive number       default = 15

wgraph tries to break a text into lines at certain special characters. Lines are at least <tw> characters long. Special characters are blank, and ",-(;/" plus some others.

Commands on graph level that refer to nodetypes and edge types

  • All the following commands operate on graph level. They cannot be used inside a node or edge definition.
  • The arguments of identical statements are merged. This means that (skip_nodetypes x,z skip_nodetypes a,b) and (skip_nodetypes x,z,a,b) are equivalent.
  • Lists must quoted if they contain spaces.
  • List elements are separated by comma, surrounded by optional spaces


[graph]   nodetypes

nodetypes : "comma separated list of (node) type names"

This command is used to define the order in which the layout attributes of nodetypes are applied to nodes. Note that a node can belong to more than one type. Once a node attribue is set it will not be overwritten by conflicting attributes of types which come later in the priority order.

If no "nodetypes" statement is found the order of applying layout attributes will be determined by the sequence in which the nodetype definitions appear in the WGL code.


[graph]   edgetypes

edgetypes : "comma separated list of (edge) type names"

This works for edges the same way as 'nodetypes' works for nodes.


[graph]   hide_nodetypes

hide_nodetypes : "comma separated list of (node) type names"

Nodes which belong to one of the specified types will be made invisible. Note that they are still there and influence the layout. This is useful if you want to maintain graph layout and just want to "switch off" nodes of a certain type. As a consequence, all edges connected to invisible nodes will be made invisible, too.


[graph]   hide_edgetypes

hide_edgetypes : "comma separated list of (edge) type names"

Edges which belong to one of the specified types will be made invisible. Note that they are still there and influence the layout. This is useful if you want to maintain graph layout and just want to "switch off" edges of a certain type. If, as a consequence, certains nodes would only be connected to invisible edges these nodes will be made invisible, too.


[graph]   show_nodetypes

show_nodetypes : "comma separated list of (node) type names"

Only nodes which belong to one of the specified types will be displayed. All other nodes will be skipped (i.e. thrown away). As a consequence, all edges connected to skipped nodes will be thrown away, too. Note that the layout will be calculated based on the remaining nodes and edges only.


[graph]   show_edgetypes

show_edgetypes : "comma separated list of (edge) type names"

Only edges which belong to one of the specified types will be displayed. All other edges will be skipped (i.e. thrown away). As a consequence, all nodes which would only be connected to skipped edges will be thrown away, too. Note that the layout will be calculated based on the remaining nodes and edges only.


[graph]   skip_nodetypes

skip_nodetypes : "comma separated list of (node) type names"

Nodes which belong to one of the specified types will not be displayed. They will be thrown away and will not influence the layout. As a consequence, all edges connected to skipped nodes will be thrown away, too. Note that the layout will be calculated based on the remaining nodes and edges only.


[graph]   skip_edgetypes

skip_edgetypes : "comma separated list of (edge) type names"

Edges which belong to one of the specified types will not be displayed. They will be thrown away and will not influence the layout. As a consequence, all nodes which would only be connected to skipped edges will be thrown away, too. Note that the layout will be calculated based on the remaining nodes and edges only.





Commands on graph level that refer to nodes

  • All the following commands operate on graph level. They cannot be used inside a node or edge definition.
  • The arguments of identical statements are merged. This means that (skip_nodes x skip_nodes y) and (skip_nodes x,y) are equivalent.
  • Lists must quoted if they contain spaces.
  • List elements are separated by comma, surrounded by optional spaces

[graph]   hide_nodes

hide_nodes : "comma separated list of node names"

The nodes mentioned will be made invisible. Note that they are still there and influence the layout. This is useful if you want to maintain graph layout and just want to "switch off" certain nodes. As a consequence, all edges connected to invisible nodes will be made invisible, too.


[graph]   show_nodes

show_nodes : "comma separated list of node names"

Only the nodes mentioned will be displayed. All other nodes will be skipped (i.e. thrown away). As a consequence, all edges connected to skipped nodes will be thrown away, too. Note that the layout will be calculated based on the remaining nodes and edges only.


[graph]   skip_nodes

skip_nodes : "comma separated list of node names"

The nodes mentioned will not be displayed. They will be thrown away and will not influence the layout. As a consequence, all edges connected to skipped nodes will be thrown away, too. Note that the layout will be calculated based on the remaining nodes and edges only.