Difference between revisions of "Domum:Languages/graph"

From Compendium of Worldly Lore

Jump to: navigation, search
 
Line 1: Line 1:
<graph>
<graphviz>
{
strict digraph langs {
   "width": 600,
   fontname="Helvetica,Arial,sans-serif"
  "height": 150,
node [
  "background": "#ffffff",
     fontname="Helvetica,Arial,sans-serif",
  "data": [
     margin=1.4,shape=plain
     {
      "name": "tree",
      "values": [
        {"A": "Mammal","B": "Carnivore","C": "Panther" },
        {"A": "Mammal","B": "Carnivore","C": "Lion" },
        {"A": "Mammal","B": "Herbivore","C": "Cow" },
        {"A": "Mammal","B": "Herbivore","C": "Goat" },
        {"A": "Mammal","B": "Omnivore","C": "Human"},
        {"A": "Mammal","B": "Omnivore","C": "Bat"},
        {"A": "Fish","B": "Carnivore","C": "Shark"},
        {"A": "Fish","B": "Carnivore","C": "Electric Eel"},
        {"A": "Fish","B": "Omnivore","C": "Piranha "},
      {"A": "Fish","B": "Omnivore","C": "catfish "}
      ],
      "transform": [
        {
          "type": "treeify",
          "groupby": ["A","B"]
        },
        {
          "type": "hierarchy",
          "mode": "cluster",
          "nodesize": [20,100]
        },
        {
          "type": "formula",
          "field": "align",
          "expr": "'right'"
        },
        {
          "type": "formula",
          "field": "offset",
          "expr": "-10"
        }
      ]
    }
  ],
  "marks": [
    {
      "type": "path",
      "from": {
        "data": "tree",
        "transform": [
          {"type": "filter","test": "datum.parent"},
          {
            "type": "linkpath",
            "sourceX": "parent.layout_y",
            "sourceY": "parent.layout_x",
            "targetX": "layout_y",
            "targetY": "layout_x",
            "shape": "cornerX"
          }
        ]
      },
      "properties": {
        "enter": {
          "path": {"field": "layout_path"},
          "strokeWidth": {"value": 2},
          "stroke": {"value": "#000000"}
        }
      }
     },
    {
      "type": "text",
      "from": {
        "data": "tree",
        "transform": [
          {
            "type": "formula",
            "field": "ff_node_label",
            "expr": "if(datum.layout_depth == 0, 'Animals', if(datum.layout_depth == 1, datum.A, if(datum.layout_depth == 2, datum.B, if(datum.layout_depth == 3, datum.C, ''))))"
          }
        ]
      },
      "properties": {
        "enter": {
          "x": {"field": "layout_y"},
          "dx": {"field": "offset"},
          "y": {"field": "layout_x"},
          "dy": {"value": -8},
          "font": {"value": "Arial"},
          "fontSize": {"value": 16},
          "align": {"field": "align"},
          "baseline": {"value": "middle"},
          "fill": {"value": "#0000ff"},
          "text": {"field": "ff_node_label"}
        }
      }
    }
   ]
   ]
edge [
    fontname="Helvetica,Arial,sans-serif",
  ]
  rankdir="TB";
  splines="ortho";
  concentrate="true";
  labelloc = "t";
  edge[tailport="s",headport="n"]
  // Ancient Languages
  "Ancient Netherese";
  "Saiira";
  "Vak";
  // Isolates
  "Abyssal";
  "Aquan";
  "Auran";
  "Drow Sign Language";
  "Ignan";
  "Terran";
  // Balhaean
  "Saiira" -> "Balhaean"
  "Saiira" -> "Marisan"
  "Saiira" -> "Heptalithian"
  "Saiira" -> "Vanadian"
  "Saiira" -> "Iishi"
  // Regional Precursors
  "Saiira" -> "Proto-Rokugani";
  "Saiira" -> "Old Azuline";
  // Racial Precursors
}
}
</graph>
</graphviz>

Latest revision as of 21:01, 14 October 2022