I'm trying to include and fetch text from a pgf plot table without succeeding.
When using just numbers, everything goes smoothly:
\documentclass{standalone}
\usepackage{pgfplots}
\usepackage{pgfplotstable}
\usepackage{tikz}
\pgfplotstableread[col sep=comma]{
1
}\mydata
\begin{document}
\begin{tikzpicture}
\pgfplotstablegetelem{0}{0}\of\mydata
\node[draw=black] at (0,0) {\pgfplotsretval};
\end{tikzpicture}
\end{document}
However, when exchanging the number for a letter or a text string, like so
\documentclass{standalone}
\usepackage{pgfplots}
\usepackage{pgfplotstable}
\usepackage{tikz}
\pgfplotstableread[col sep=comma]{
a
}\mydata
\begin{document}
\begin{tikzpicture}
\pgfplotstablegetelem{0}{0}\of\mydata
\node[draw=black] at (0,0) {\pgfplotsretval};
\end{tikzpicture}
\end{document}
I get the following error message:
! Package pgfplots Error: Sorry, could not retrieve column '0' from table '<inl
ine_table>'. Please check spelling (or introduce name aliases)..
See the pgfplots package documentation for explanation.
Type H <return> for immediate help.
...
l.12 \pgfplotstablegetelem{0}{0}\of\mydata
How can I include and fetch text from my pgf plot table? I've tried things like enclosing the text in " or ' to no avail.