Question: I'm trying to plot the Wien and Rayleigh-Jeans laws in a graph of `$I \times \nu$`.

```
Wien Law:
\[ I=\frac{2h\nu^3}{c^2}e^{-\textstyle\frac{h\nu}{kT}}\]

Rayleigh-Jeans Law:
\[I=\frac{2k\nu^2T}{c^2}\]

```

But PGFPlot always crashes because the constants (in SI units) are way too small!
Whats the best way to do this?

Thanks!

Edit: My actual code with just Wien's Law is:

```
\begin{tikzpicture}
\begin{axis}[
    axis lines = left,
    xlabel = $\nu$,
    ylabel = {$I(\nu,T)$ em $T=8.10^{-3}K$},
]

\addplot [
domain=0:10, 
samples=100, 
color=red,
]
{(1.48*10^(-50))*(x^3)*exp((-6*10^(-9))x)};
\addlegendentry{Lei de Wien}
\end{axis}
\end{tikzpicture}

```

I don't know what the best domain is.

Answer: 
A simple application of grouping:

```
\documentclass{article}

\newcount\emphlevel
\DeclareRobustCommand{\emph}[1]{%
  \begingroup
  \normalfont
  \advance\emphlevel by 1
  \ifcase\emphlevel
  \or
    `\aftergroup'\normalfont
  \or
    \normalfont\expandafter\textsc
  \or
    \normalfont\expandafter\textit
  \else
    \normalfont!!!!\expandafter\textbf
  \fi
  {#1}%
  \endgroup
}

\begin{document}

Normal text.
\emph{Single quotes within \emph{Small Caps within \emph{more italics} and} so on}.
Again normal text.

\emph{Single quotes within \emph{Small Caps within \emph{more italics}}}.

\end{document}

```

[![enter image description here](https://i.stack.imgur.com/ezhX2.png)](https://i.stack.imgur.com/ezhX2.png)
I decided to use another command name, but the nesting can be controlled 
with a counter and `\ifcase...\fi` conditional.

The 4th level will provide an usual `\@ctrerr`, but this could be shifted to basically any level. 

```
\documentclass{article}

\newcounter{smartlevel}

\makeatletter
\newcommand{\smartcmd}[1]{%
  \stepcounter{smartlevel}%
  \ifcase\c@smartlevel
  \or'#1'\addtocounter{smartlevel}{-1}%
  \or\textsc{#1}\addtocounter{smartlevel}{-1}%
  \or\textit{#1}\addtocounter{smartlevel}{-1}%
  \else
  \@ctrerr% Too deeply nested
  \fi
}
\makeatother

\begin{document}

\smartcmd{First \smartcmd{Foo \smartcmd{inner} \smartcmd{inner again}}}

\smartcmd{First \smartcmd{Foo} \smartcmd{Foo level \smartcmd{inner again}}} 

\end{document}

```

[![enter image description here](https://i.stack.imgur.com/U1kAh.png)](https://i.stack.imgur.com/U1kAh.png)