# Trying do draw a couple of function with TikZ/PGFPLOTS

I'm having trouble drawing some functions:

\documentclass{scrartcl}
\usepackage{amsmath}
\usepackage[normalem]{ulem}
\usepackage{tikz}
\usepackage{pgfplots}
\begin{document}

\begin{tikzpicture}
\begin{axis}[grid=major,ymax=2500,xmax=2500]
\addplot[no markers, blue, restrict y to domain=0:1714, samples=30000] { 2412 - 2.795e-10*(x^4)};
\end{axis}
\end{tikzpicture}

\end{document}


Code runs through fine but there's no function appearing, only the coordinate system and grid.

Works fine now! -> see below.

What doesn't work is this function:

    \documentclass{scrartcl}
\usepackage{amsmath}
\usepackage[normalem]{ulem}
\usepackage{tikz}
\usepackage{pgfplots}
\begin{document}

\begin{tikzpicture}
\begin{axis}[grid=major,ymax=10000,xmax=10000,xmin=0,ymin=0]
\addplot[no markers, blue, domain=0:10000, samples=10, % you can make it larger
%restrict y to domain=0:1714,% but this filter the results anyway
samples=300
] { 93231-3.552e-10*x^5};
\end{axis}
\end{tikzpicture}

\end{document}


Your code samples should produce the following error messages:

Package pgfplots Warning: the current plot has no coordinates (or all have been filtered away) on input line 11.

Package pgfplots Warning: You have an axis with empty range (in direction y). Replacing it with a default range and clearing all plots. on input line 12.

So pgfplots actually informs you about the empty plotting range. You can fix this by providing a domain range of x values to be plotted.

\documentclass{scrartcl}
\usepackage{amsmath}
\usepackage[normalem]{ulem}
\usepackage{tikz}
\usepackage{pgfplots}
\begin{document}

\begin{tikzpicture}
\begin{axis}[grid=major,ymax=2500,xmax=2500]
\addplot[no markers, blue, domain=1200:1800, % you can make it larger
restrict y to domain=0:1714,% but this filter the results anyway
samples=300 % I reduced the number of samples to speed-up the compilation
] { 2412 - 2.795e-10*(x^4)};
\end{axis}
\end{tikzpicture}

\end{document}


Also in your second example you are filtering to a y range, so that no points are left to be plotted.

\begin{tikzpicture}
\begin{axis}[grid=major,ymax=100000,xmax=10000,xmin=0,ymin=0]