Menu

#66 quiver/visualization depends on: support \thisrow and \thisrowno if a table is not loaded from a file

unassigned
open
None
5
2017-02-24
2017-02-18
No

Assume that \addplot table is used with a loaded table, that is: with
\addplot table {\loadedtable};

In this case, the use of \thisrow and \thisrowno is limited to x, y, z, meta, and error bar columns. All other math expressions bail out.

Example:
this here works fine

\documentclass[border=5pt]{standalone}
\usepackage{pgfplots}
\usepackage{pgfplotstable}
    \pgfplotsset{compat=1.14}
    \pgfplotstableread{
    A B C
    1 0 2
    2 1 3
    }\loadedtable
\begin{document}
    \begin{tikzpicture}
        \begin{axis}
            \addplot table [y expr=\thisrow{C}+1] {\loadedtable};
        \end{axis}
    \end{tikzpicture}
\end{document}

whereas the following fails:

\documentclass[border=5pt]{standalone}
\usepackage{pgfplots}
\usepackage{pgfplotstable}
    \pgfplotsset{compat=1.14}
    \pgfplotstableread{
    A B C
    1 0 2
    2 1 3
    }\loadedtable
\begin{document}
    \begin{tikzpicture}
        \begin{axis}
            \addplot+ [
                quiver={
                    u=\thisrow{A},
                    v=\thisrow{B},
                },
            ] table {\loadedtable};
        \end{axis}
    \end{tikzpicture}
\end{document}

with the error

! Package PGF Math Error: Unknown function `thisrow_unavailable_load_table_directly' (in 'thisrow_unavailable_load_table_directly').

Discussion

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.