I went through this problem years ago. In my cases I wanted to make sure I my tikz/pgfplots
could be done using axes as well as windows
were capable of showing a graph paper background
were able to handle multiple graphs at the same time
Could handle more complicated functions
Now simple functions, such as what you'd see in a high school are easily done ...
We can use R for this by retrieving the relevant data using the tq_get function from the tidyquant package and plotting the candlestick and moving average using ggplot, a function in the tidyverse collection of packages. This example largely follows Matt Dancho's vignette for his tidyquant package posted here: Charting with tidyquant
So the problem is due to the gnuplot software, just installing it won't be enough, it needs to be on Windows PATH. It can be done by checking the box Add gnuplot to PATH during the install procedure or add it manually like shown here
I had a similar problem. What I did is "externalise" the generation of the plots. You do this by including
In your preamble. You have to call Latex with the additional options: -shell-escape. This will cause the compiler to start from scratch for each tikz-picture so your compilation will no longer ...