tplot: Plot temporal graph via Latex

View source: R/tplot.R

tplotR Documentation

Plot temporal graph via Latex

Description

Generates a plot of a tamat, tpdag or tpag object by use of Latex tikz. Note that a working Latex installation is required. Note also that this function is slower than typical R graphics options and may take some time to terminate.

Usage

tplot(
  x,
  filename = "causaldisco_tplot_temp",
  keepfiles = FALSE,
  bendedges = TRUE,
  ...
)

Arguments

x

A tamat, tpdag, or tpag object as obtained from tamat, tpc, or tfci, respectively.

filename

Name of files that will be used internally during the function's runtime. This filename will be appended with both .rmd and .pdf. Note that unless keepfiles = TRUE, these files will automatically be deleted again.

keepfiles

If FALSE (default), temporary files used for making the plot are deleted, otherwise they are kept and will be placed in the working directory.

bendedges

If TRUE (default), all edges are bent 10 degrees to the right, thereby avoiding edges placed exactly on top of eachother.

...

Additional argument passed to maketikz.

Details

The function renders Latex code using rmarkdown, which relies on a working installation of Latex. Afterwards, the resulting pdf graphic is loaded into R and displayed in a browser. If working in Rstudio it may be opened in the built-in viewer, depending on Rstudio global settings.


causalDisco documentation built on Jan. 20, 2026, 5:09 p.m.