I'm trying to plot Planck's law using tikz. This works fine for the most part, but tikz thinks I'm dividing by 0 if I try to plot certain areas of the law. Here's a minimally working example of what I'm trying to do :
\documentclass[8pt,xcolor=dvipsnames,compress]{beamer}
\usepackage{tikz}
\begin{document}
\begin{frame}
\begin{tikzpicture}
\draw[->] (0,0) -- (4.2,0) node[right] {$\lambda$};
\draw[->] (0,0) -- (0,4.2) node[above] {Flux};
\draw[scale=3,domain=0.16:1,smooth,variable=\x,blue] plot ({\x},{((1/(exp(1/\x)-1)*(1/(\x^5)))/20});
\end{tikzpicture}
\end{frame}
\end{document}
Now this works, but notice that my domain start at 0.16. I'd like it to start earlier, at least around 0.1, but if I start my domain at 0.1 I get a division by 0 error :
! Package PGF Math Error: You've asked me to divide `1' by `0.0', but I cannot divide any number by `0.0' (in '{((1/(exp(1/0.1)-1)*(1/(0.1^5)))/20}').
Any ideas as to what's causing this ?


smoothorscale? Which version of TikZ do you have? You can check it by putting\pgfversionsome where on aframe – percusse Jun 01 '15 at 23:45pgfplots. It handles math with more precision for plotting. And I think this is your problem as you miss the parenthesis http://tex.stackexchange.com/questions/41828/using-math-in-tikz – percusse Jun 02 '15 at 00:08