English 中文(简体)
How to change arrowhead type?
原标题:

I want to simulate non-directional graphs with .dot. To that end, I want the arrowhead type to be "none". How do I set this?

"f" -> "t" [label=2],[arrowhead=none]
"m" -> "d" [label=0],[arrowhead=none]

The above is not working.

问题回答
"f" -> "t" [label=2, arrowhead=none]

For example:

digraph g {
  rankdir="LR";
  dpi=300;
  node[
    fontname="Arial",
    shape="square",
    fixedsize=false,
    width=1.809,
    style=rounded
  ];

  edge [
    arrowhead="none"
  ];

  Node1 -> Node2;
  Node2 -> Node3;
  Node3 -> Node4;
}

Another nice way is to use the dir attribute:

   "f" -> "t" [label=2 dir=none]
   "m" -> "d" [label=0 dir=none]

See also http://martin-loetzsch.de/DOTML/dir.html

You can change the arrow head either locally or globally.

digraph G
{
    edge[arrowhead="odiamond"]; // Globally

    A -> B
    A -> C [arrowhead="vee"]; // Locally
    C -> D
    C -> E
}

You can test it on GraphvizFiddle

All possible values could be found Here

If you don t have to create a digraph, you can use a graph:

  1. Replace digraph { on the top of your dot file by graph {.
  2. Change your node relationships to: a -- b;
"f" -> "t" [label=2 arrowhead=none]
"m" -> "d" [label=0 arrowhead=none]




相关问题
How to change out-of-focus text selection color in Xcode?

Okay, I ll bite. I ve got really pleasant code/window colors set up in Xcode. Ordinarily, my selection color is very visible. When I am doing a project search and iterating through the results, ...

pdo database abstraction

Can someone help me to see what is going wrong with this setup I build the @sql query in the function below like this. The extra quotes are setup in the conditions array. $sql .= " WHERE $...

I wish I could correlate an "inline view"

I have a Patient table: PatientId Admitted --------- --------------- 1 d/m/yy hh:mm:ss 2 d/m/yy hh:mm:ss 3 d/m/yy hh:mm:ss I have a PatientMeasurement table (0 to ...

Syntax help! Php and MYSQL

Original: $sql = "SELECT DATE(TimeAdded) AS Date, $column_name FROM Codes ORDER BY TimeAdded ASC"; Altered: $sql = "SELECT DATE("m", TimeAdded ) AS Date, ColumnName FROM TableName ORDER BY ...

Is this code Equivalent

I am not a fan of the following construction if (self = [super init]) { //do something with self assuming it has been created } Is the following equivalent? self = [super init]; if (self != ...

热门标签