Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

format=function choke in tikz

145 views
Skip to first unread message

Dave94705

unread,
May 22, 2015, 10:48:11 AM5/22/15
to
Can anyone tell me why below example, basically copied right off of page 743 of Tikz manual, chokes?

\documentclass[]{article}
\usepackage{tikz}
\usetikzlibrary{datavisualization}

\begin{tikzpicture}[scale=.7]
\datavisualization [school book axes, visualize as smooth line]
data [format=function] {
var x : interval [-2:2];
func y = \value x*\value x + 1;
};
\end{tikzpicture}
\end{document}

Error message given is:


! Package pgf Error: Unknown data format 'function'.

See the pgf package documentation for explanation.
Type H <return> for immediate help.
...

l.7 data [format=function]
{

Ulrike Fischer

unread,
May 22, 2015, 1:23:20 PM5/22/15
to
Am Fri, 22 May 2015 07:48:05 -0700 (PDT) schrieb Dave94705:

> Can anyone tell me why below example, basically copied right off
> of page 743 of Tikz manual, chokes?

> Error message given is:
> ! Package pgf Error: Unknown data format 'function'.

Well apart from the missing \begin{document}: You are not loading
the library for the functions:

\documentclass[]{article}
\usepackage{tikz}
\usetikzlibrary{datavisualization}
\usetikzlibrary{datavisualization.formats.functions} %
\begin{document}
\begin{tikzpicture}[scale=.7]
\datavisualization [school book axes, visualize as smooth line]
data [format=function] {
var x : interval [-2:2];
func y = \value x*\value x + 1;
};
\end{tikzpicture}
\end{document}

see 76.4 Reference: Advanced Formats

--
Ulrike Fischer
http://www.troubleshooting-tex.de/
0 new messages