三角ロジック
Stephen Toulmin(哲学者・イギリス)が提案。
code:d3.js
const graph = `
graph g {
CLAIM -- DATA ;
CLAIM -- WARRANT ;
DATA -- WARRANT ;
{rank = same; DATA; WARRANT}
}
`
code:d3.js
d3.select("#graph").graphviz()
.fade(false)
.renderDot(graph);
code:visScript.js
// create an array with nodes
var nodes = new vis.DataSet([
{ id: 1, label: "CLAIM" },
{ id: 2, label: "WARRANT" },
{ id: 3, label: "DATA" },
]);
// create an array with edges
var edges = new vis.DataSet([
{ from: 1, to: 3 },
{ from: 1, to: 2 },
{ from: 2, to: 3 },
]);
// create a network
var container = document.getElementById("vis");
var data = {
nodes: nodes,
edges: edges,
};
var options = {};
var network = new vis.Network(container, data, options);
vis-script-button.icon ←実行ボタン
code:vizScript.js
const graph = `
graph g {
CLAIM -- DATA ;
CLAIM -- WARRANT ;
DATA -- WARRANT ;
{rank = same; DATA; WARRANT}
}
`;
code:vizScript.js
const viz = new Viz();
viz.renderSVGElement(graph)
.then(function(element) {
const editor = document.getElementById('editor');
editor.appendChild(element);
});
viz-script-button.icon ←実行ボタン
https://plantuml-proxy.vercel.app/svg/https://scrapbox.io/api/code/suto3/三角ロジック/t.pu#.svg
code:t.pu
@startdot
graph triangular {
label="三角ロジック";
CLAIM -- DATA ;
CLAIM -- WARRANT ;
DATA -- WARRANT ;
{rank = same; DATA; WARRANT}
}
@enddot