0

I'm trying to generate a png image using the below command, however, the code only generates a pdf file, what is the problem?

I used terminal and the command pdflatex --shell-escape test.tex error in terminal

\documentclass[convert={density=300,size=1080x800,outext=.png}]{standalone}
\usepackage{tikz,pgfplots} 
\pgfplotsset{compat=1.5}
\begin{document}
\begin{tikzpicture}
\begin{axis}[
     xlabel={$t$(ms)},
     grid=both,
    grid style={line width=.1pt, draw=gray!10},
    major grid style={line width=.2pt,draw=gray!50},
     ylabel={$v(t)$},
     axis lines=left,
    scaled ticks=false,
    width=15cm,
    axis lines=middle,
    minor tick num=4,
    enlargelimits={abs=0.2},
    xmin = 0, xmax = 2,
    ymin = -1, ymax = 1,
    ytick={-1,1},
    yticklabels={$-100$,$100$},
    xtick={.3333,0.8333,1.3333,1.83333,2.3333},
    xticklabels={5.5557,$13.8890$,$22.2224$,$30.5557$,$38.8891$},
     x tick label style={font=\small, rotate=0,below}                        
            ]

     \addplot[domain=0:2,samples=50,smooth,black, ultra thick] {cos(deg(2*pi*x-(2*pi/3)))};

\end{axis}

    \end{tikzpicture}
\end{document}
  • Do you even have imagemagick installed? That software provides the convert command that is being used. – daleif Oct 21 at 6:08
  • I did download this folder inside my application ImageMagick-7.0.10 – Diana Oct 21 at 6:11
  • but can it find it via the command line? I don't use Mac so I don't know how things work regarding paths on a Mac – daleif Oct 21 at 6:27

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.