I am trying to replicate the examples given in the help file for texdoc:

To this end, I compiled the following code from the help file:

Code:
texdoc init, logall
/***
\documentclass[a4paper]{article}
\usepackage{graphicx}
\usepackage{stata}
\begin{document}
\noindent
Open my native file and draw a scatter plot of price against
milage using the \stcmd{twoway} command and include a linear fit.

***/

        /*tex
        \section{Exercise 1}
        Open the 1978 Automobile Data and summarize the variables.

        tex*/

        texdoc stlog
        sysuse auto
        summarize
        texdoc stlog close

        /*tex

        \section{Exercise 2}
        Run a regression of price on milage and weight.

        tex*/

        texdoc stlog
        regress price mpg weight
        texdoc stlog close
        
        /*tex

        \section{Exercise 3}
        And now I will try adding a simple scatterplot.

        tex*/


        texdoc stlog
        scatter price mpg
        texdoc stlog close
        texdoc graph
    
        
/***

\end{document}
***/
I have all these commands in a do-file, which I have saved as my_example. Then, I ran

Code:
texdoc do my_example.do
and Stata returned:

Code:
 scatter price mpg
system limit exceeded - see manual
while continually trying to compile the graph multiple times. Can someone please suggest how this issue can be fixed? Thanks!