I am trying to plot the equation -\frac{7}{6}\frac{1}{16\pi^2}x^3 but I keep getting the error, missing number treating as zero. I have no idea what is going on because I am a newbie at this.

  • 4
    Welcome to TeX-SE! As long as you do not show us what you have tried one cannot really tell you what went wrong. For me the following works: \documentclass[tikz,border=3.14mm]{standalone} \usepackage{pgfplots} \pgfplotsset{compat=1.16} \begin{document} \begin{tikzpicture} \begin{axis} \addplot[mark=none] {(7/(6*16*pi^2))*x^3}; \end{axis} \end{tikzpicture} \end{document} – marmot May 18 at 15:29
  • Welcome to TeX.SX! You can have a look at our starter guide to familiarize yourself further with our format. – erik May 18 at 15:56
  • Yeah I deleted the code out of frustration. But thank you so much and I hope you get your crystal ball back ;) – Araf Haque May 18 at 17:49
  • Never use x^2 or x^3 in calculations! x*x and x*x*x are both faster and more reliable. – John Kormylo May 18 at 21:46

Welcome to TeX-SE! Since you do not provide us with the code that produced the error, and since my crystal ball got stolen, I can only guess. There is a chance that you tried to plot the LaTeX code that typesets the function. However, you need to plot the function itself.

\addplot[mark=none] {-(7/(6*16*pi^2))*x^3}; 

enter image description here

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.