Questions tagged [tikzdevice]

37 questions
1
vote
0 answers

Troubleshooting: Error in system(latexCmd, intern = TRUE, ignore.stderr = TRUE) : error in running command - tikzDevice in RStudio

so I try to use tikzDevice in order to get a vector graphic which I then want to include in my Overleaf file. However, as I used the instruction from here, I run into a problem. Also, I use RStudio Version 1.3.929 and the newest MikTex. I also…
1
vote
1 answer

How can I knit a .Rnw-file into latex, with plots as tikzpicture environments? (error: formal argument matched by multiple actual arguments)

I'm trying to convert a .Rnw document to latex (to be included in another .tex-document). All plots are generated using the tikz device, but each of them as a standalone document. My goal is to have them in tikzpicture environments. Solution…
1
vote
3 answers

TikzDevice does not output code with umlauts in UTF-8 under Windows

tikzDevice does not output code with Umlauts under Windows in UTF-8 I write a report with RMarkdown and use tikzDevice for plotting. When I use German Umlauts (äöüÖÄÜ), RStudio throws the following error: pandoc.exe: Cannot decode byte '\xd6':…
julianre
  • 21
  • 7
1
vote
1 answer

tikz produces empty file in R loop

I am using the tikzDevice library in R to produce tikzpicture plots in latex. It works when plots are produced one by one. However, when I want to produce the plots in a loop, I get empty files. This issue is illustrated in the following minimal…
matnor
  • 479
  • 1
  • 5
  • 17
1
vote
2 answers

Using tikz graphdrawing library within RMarkdown ... Need to use lualatex engine, but can't get it to work

I have the following code in an rmd file which leverages tikz for diagrams: --- title: "TestNonTufteLua" author: "Me" output: pdf_document : latex_engine: lualatex --- Prove tikz works: ```{r tikTest1, engine =…
1
vote
1 answer

Beamer: use the document main font in plots when using tikzDevice

I am trying to create a Rmd document template that uses the tikz device for its plot outputs. Usually, when doing the same in a Rweave (sweave) document, the font in the tikz graphics is the same as in the document because tikz takes over the…
Martin Schmelzer
  • 23,283
  • 6
  • 73
  • 98
1
vote
0 answers

Multiple graphs output using `{tikzDevice}` to a single tex file in R

I want to output graphs to a single tex file using {tikzDevice}, I wrote following loop trying to make it happen: library{tikzDevice} graphList <- list(...) # ... are the graphs I have made using ggplot2 for (i in 1:length(graphList)) { …
Guanxi Yi
  • 11
  • 4
1
vote
1 answer

Error in tikzDevice with knitr

It seems like there is a conflict with new versions of knitr and/or tikzDevice and/or R. In any case I can't make it work any more. Here is a…
ClementWalter
  • 4,814
  • 1
  • 32
  • 54
0
votes
1 answer

Use tikzdevice in quarto pdf, but standard output in html

When writing for publication, I greatly prefer the tikzDevice functionality of knitr, as it renders my plots in the same font as the document (among other things). I see that Quarto does this nicely in the PDF rendering. Here's a MWE: --- title:…
gregmacfarlane
  • 2,121
  • 3
  • 24
  • 53
0
votes
0 answers

How to load tikz script code (Latex code) on button click using Angular? ( Not in ngOnInit() )

I'm trying show Latex code output on web browser using angular with the help of TikZ library. I'm able to achieve this when I'm calling the loadScript() method in ngOnInit() (Without using setTimeOut) but not able to achieve this on button…
0
votes
0 answers

Can we suppress or change the initial descriptive comments with tikzDevice?

Consider the following R-code: ## Uncomment the following line if tikzDevice is absent ## install.packages('tikzDevice') library(tikzDevice) tikz('test.tex') dev.off() This produces a test.tex in the working directory with the following content: %…
Niranjan
  • 169
  • 9
0
votes
1 answer

R 4.2.1 crashes with tikzDevice

I am trying to use the following simple code in r 4.2.1 using rstudio 2022.07.1 Build 554 but it crashes due to tikzdevice (tried in both r GUI & rstudio and both crash): library(tikzDevice) tikz('simpleEx.tex', width = 3.5, height = 3.5) plot(1,…
MYaseen208
  • 22,666
  • 37
  • 165
  • 309
0
votes
0 answers

Error in getMetricsFromLatex when using \includegraphics before \begin{document}

Following Code compiles successfully, but the plot doesn't work (Error in getMetricsFromLatex(TeXMetrics, verbose =verbose): TeX was unable to calculate metrics…
lna
  • 1
  • 1
0
votes
1 answer

Running R tikzDevice with tinytex: Help troubleshooting `! LaTeX Error: File `tikz.sty' not found`

I am trying to generate a tikz plot using R/ggplot2 via the tikzDevice package. I've had to wade through many errors as I figured out how to install R and tinytex on my docker image, but I've run into the following error which has simply stumped…
Alex P. Miller
  • 2,128
  • 1
  • 23
  • 20
0
votes
1 answer

Changing fonts in main title of plot in R

I am using Sweave and knitr together with <>= for figures. For simplicity, I first will try to explain my problem without providing a minimal working example: I am using the command acf for plotting an autocorrelation function and want…
user144921
  • 103
  • 2