Menu

#25 Correct bug that prevents "/tikz/data visualization/also at" from being assigned a list.

Unstable (example)
closed-accepted
nobody
5
2018-05-28
2017-10-15
No

Hello,
I believe the MWE below shows a contradiction between the PGF manual and the behaviour of the also at key for grids in datavisualizations, viz that this key may be assigned a list in the same way as the at key. The proposed patch makes the MWE compile, is it the right way to do it ?
cheers,
Adrian

The following MWE contains three graphs. The first is copied from the
pgfmanual 3.0.1a page 798. The third merely replacest at by also at,
which should be allowed according to the manual p799 (also at can be
fed a list just as at), but compilation fails on this third graph with
a

Package PGF Math Error: Could not parse input '1, 1.5,
2' as a floating point number, sorry. The unreadable part was near the
decimal separator ', 1.5, 2'. Do you need the option 'read comma as
period'?

\documentclass{scrartcl}
\usepackage{tikz}
\usetikzlibrary{datavisualization}
\usetikzlibrary{datavisualization.formats.functions}

\begin{document}

\tikz \datavisualization
[ school book axes, visualize as smooth line,
x axis={grid={minor={at={1, 1.5, 2}}}}]
data [format=function] {
var x : interval [-1.25:2];
func y = \value x * \value x / 2;
};

\tikz \datavisualization
[ school book axes, visualize as smooth line,
x axis={grid={minor={also at={1}, also at={1.5}, also at={2}}}}]
data [format=function] {
var x : interval [-1.25:2];
func y = \value x * \value x / 2;
};

\tikz \datavisualization
[ school book axes, visualize as smooth line,
x axis={grid={minor={also at={1, 1.5, 2}}}}]
data [format=function] {
var x : interval [-1.25:2];
func y = \value x * \value x / 2;
};

\end{document}
1 Attachments

Discussion

  • Stefan Pinnow

    Stefan Pinnow - 2018-05-28
    • status: open --> closed-accepted
     
  • Stefan Pinnow

    Stefan Pinnow - 2018-05-28

    Thank you for reporting and providing the patch.