Questions tagged [diagrammer]

DiagrammeR is a R package for creating diagrams.

DiagrammeR is a R package for creating graph diagrams using text in a Markdown-like syntax. Mermaid (.mmd) or Graphviz (.gv) files can be edited directly within the IDE for .

Graphviz attributes allow you to style your Graphviz graph. Combinations of attributes for nodes, edges, clusters, and for the entire graph provide for highly-customized layouts.

All Graphviz attributes are specified by name-value pairs. Thus, to set the fillcolor of a node abc, one would use

abc [fillcolor = red] Similarly, to set the arrowhead style of an edge abc -> def, one would use

abc -> def [arrowhead = diamond] Quotation marks are important only for multiword attributes, such might be used in the label attribute.

enter image description here

Features The Graphviz layout programs take descriptions of graphs in a simple text language, and make diagrams in useful formats, such as images and SVG for web pages; PDF or Postscript for inclusion in other documents; or display in an interactive graph browser. Graphviz has many useful features for concrete diagrams, such as options for colors, fonts, tabular node layouts, line styles, hyperlinks, and custom shapes.

Roadmap dot - "hierarchical" or layered drawings of directed graphs. This is the default tool to use if edges have directionality.

neato - "spring model'' layouts. This is the default tool to use if the graph is not too large (about 100 nodes) and you don't know anything else about it. Neato attempts to minimize a global energy function, which is equivalent to statistical multi-dimensional scaling.

fdp - "spring model'' layouts similar to those of neato, but does this by reducing forces rather than working with energy.

sfdp - multiscale version of fdp for the layout of large graphs.

twopi - radial layouts, after Graham Wills 97. Nodes are placed on concentric circles depending their distance from a given root node.

circo - circular layout, after Six and Tollis 99, Kauffman and Wiese 02. This is suitable for certain diagrams of multiple cyclic structures, such as certain telecommunications networks.

Links:

207 questions
0
votes
1 answer

R diagrammeR graph

I am using diagrammer for a diagram that should look like the one below but without any success. I have tried the following code library(DiagrammeR) grViz(" digraph boxes_and_circles { graph [layout = circo, overlap =T, outputorder =…
DSTO
  • 265
  • 1
  • 9
0
votes
1 answer

graphViz: How to use fixed positions for nodes from "neato" layout but have pretty curved edges from "dot" layout?

I have this dot code which I use in R's diagrammeR-package: grViz("digraph { graph [layout = neato, overlap = false, outputorder = edgesfirst] node [shape = rectangle] # Error Certainty crt1e[pos = '11.1, 15!', label =…
mkks
  • 23
  • 4
0
votes
1 answer

Drawing diagram of a multiple / parallel mediation model in R

I want to draw a publication-ready diagram of a parallel mediation model in R. I adapted the Diagrammer + Graphviz Code provided here https://stackoverflow.com/questions/46465752/drawing-simple-mediation-diagram-in-r, but I do not seem to get the…
Coztomate
  • 26
  • 3
0
votes
1 answer

Save high-quality {DiagrammeR} node graph

I've made a node graph with {DiagrammeR} and need to save it in high-quality for publication, but none of the usual high-quality saving methods work (e.g. ggsave() -naturally-, svg(), png(), etc.) No need to upload the whole code, but the two final…
Gaspar
  • 49
  • 1
  • 8
0
votes
1 answer

Manually / adjusting order of edge and path

In the diagram below, I'm looking to have the dashed path/edge going through the middle of the diagram (and therefore the A -> C -> D path will be at the bottom). I've spent about 2 hours trying to figure this out, including drawing additional paths…
KWC
  • 61
  • 8
0
votes
0 answers

how to make the edges in equal size in grViz function of DiagrammeR?

I am trying to create a diagram using grViz function from DiagrammeR package in R. But for some reason which I can not understand, two edges that I thought should be of equal length are drawn with different lengths which makes it asymmetrical. Here…
0
votes
0 answers

DiagrammeR grViz Flow Chart Top Alignment

I am using DiagrammeR/grViz in R Studio to make a flow chart from left to right. I have included the R code below. This works fine but I would like to align Block 1 to Block 6 with the top so that they are flush at the top. Any ideas or links to…
rustymarmot
  • 111
  • 1
  • 10
0
votes
2 answers

How to preview mermaid graph in RStudio viewer?

Background: It's possible to "use of an external text file with the .mmd file extension can provide the advantage of syntax coloring and previewing in the RStudio Viewer" (DiagrammeR Docs) What should look like this: Problem: In my minimal working…
Simon Ress
  • 91
  • 10
0
votes
2 answers

R DiagrammeR package Mermaid text using actual calculation results

I would like to utilize the DiagrammeR package for a simple flow chart in my Rmarkdown. However, I couldn't figure out a way to use actual output from a data table into the text. Suppose I have a simple query of a database with total records,…
ponyhd
  • 491
  • 1
  • 4
  • 19
0
votes
2 answers

flowchart using digraph in Diagrammer

I'm trying out DiagrammeR to build some flowcharts and I'm interested in knowing whether I can include values from a secondary data frame (data pulled from a SQL database). I'm using an example from the documentation and I want to add a random value…
TheGoat
  • 2,587
  • 3
  • 25
  • 58
0
votes
1 answer

R DiagrammeR Mermaid for Function Maps

How do you produce the following plot using the R function mermaid from the package DiagrammeR? EDIT: Let's just say we drop the labels "Input" and "Output" along with the red circles. The following is a minimal code for a start in…
rxs2p0
  • 1
  • 1
0
votes
0 answers

How to use box3d shape in graphviz using DiagrammeR?

I want to use the box3d shape in graphviz using DiagrammeR in R: (Screenshot was taken from their official website at https://graphviz.org/doc/info/shapes.html) When I do: DiagrammeR::grViz("digraph { box [label = B, shape =…
bird
  • 2,938
  • 1
  • 6
  • 27
0
votes
1 answer

Plot data.tree, How to customize

I would like to customize my data.tree. The problem is that I would need an arrow from each node to show me my "Salary" in order. It would be exactly the format you get when you type print(data.tree) . To explain: Chef <- Node$new("Chef") Chef2 <-…
0
votes
1 answer

Using Diagrammr package to make a flow DiagrammeR

I am trying to make a flow to show my experimental design. I have something that works, but I would like to add another layer at the bottom-which adds a question box to each group, which should be big enough to read. An example of what I have is…
Gabriella
  • 421
  • 3
  • 11
0
votes
1 answer

DiagrammeR - Adding a horizontal node & increase font size

I employed the code below to create a flowchart. I had two questions that I'd appreciate advice on how do I add an horizontal node, e.g. to tab2, how do I increase font size within each node? library(DiagrammeR) grViz(diagram = "digraph flowchart…
bgreen
  • 63
  • 6