add tag
BambOo
Original question [here](https://tex.stackexchange.com/q/551067/141947) on tex.se

Upon showing some `nodes near coords` in my plots I stumbled upon a formatting issue related to the use of `/pgf/number format/sci generic` options. 

More specifically, when changing the default mantissa with 

```
\pgfmathprintnumber[sci,sci generic={mantissa sep=\times,exponent={10^{#1}}}]\pgfplotspointmeta
```
The exponent is missing. 

I checked the behavior directly in pure Ti*kZ* output, but this works fine.
The problem only seems to show up in `pgfplots`. At first I thought this would be a precision issue since I ran into this problem with very small values, but even with standard (around unit) values, it shows up. 

Does anybody have a clue on a workaround/patch for this ?

Here is a MWE showing the issue and some tests. 

```
% arara: lwpdflatex
\documentclass{article}
\usepackage[margin=1cm]{geometry}
\usepackage{pgfplots}
\pgfplotsset{compat=1.17,width=5cm,height=5cm}
\begin{document}
Correct output in pure TikZ

\pgfmathprintnumber[sci,sci generic={mantissa sep=\times,exponent={10^{#1}}}]{12.345}

\pgfmathprintnumber[sci,sci generic={mantissa sep=\times,exponent={10^{#1}}}]{12.345e-8}

Correct output in pgfplots with only "nodes near coords"

\begin{tikzpicture}
    \begin{axis}
        \addplot[nodes near coords,domain=0:1,samples=5] {x};
    \end{axis}
\end{tikzpicture}

Correct output in pgfplots with "nodes near coords" with sci formatting and "$\cdot$" (default) mantissa separator

\begin{tikzpicture}
    \begin{axis}
        \addplot[nodes near coords={\pgfmathprintnumber[sci]\pgfplotspointmeta},domain=0:1,samples=5] {x};
    \end{axis}
\end{tikzpicture}

Wrong output in pgfplots with "nodes near coords" with sci formatting and manually set "$\cdot$" mantissa separator

\begin{tikzpicture}
    \begin{axis}
        \addplot[nodes near coords={\pgfmathprintnumber[sci,sci generic={mantissa sep=\cdot,exponent={10^{#1}}}]\pgfplotspointmeta},domain=0:1,samples=5] {x};
    \end{axis}
\end{tikzpicture}

Wrong output in pgfplots with "nodes near coords" with sci formatting and "$\times$" mantissa separator

\begin{tikzpicture}
    \begin{axis}
        \addplot[nodes near coords={\pgfmathprintnumber[sci,sci generic={mantissa sep=\times,exponent={10^{#1}}}]\pgfplotspointmeta},domain=0:1,samples=5] {x};
    \end{axis}
\end{tikzpicture}
\end{document}
```
[![enter image description here][1]][1]


  [1]: https://i.stack.imgur.com/ghQbZ.png

Enter question or answer id or url (and optionally further answer ids/urls from the same question) from

Separate each id/url with a space. No need to list your own answers; they will be imported automatically.