From ced128389da6e12bc2da23bc40adfa2ee6eb7eec Mon Sep 17 00:00:00 2001
From: Karl Berry <karl@freefriends.org>
Date: Thu, 11 Jul 2013 23:29:36 +0000
Subject: datatool (10jul13)

git-svn-id: svn://tug.org/texlive/trunk@31174 c570f23f-e606-0410-a88d-b1316a301751
---
 Master/texmf-dist/tex/latex/datatool/dataplot.sty | 21 +++++++++++++++++++--
 1 file changed, 19 insertions(+), 2 deletions(-)

(limited to 'Master/texmf-dist/tex/latex/datatool/dataplot.sty')

diff --git a/Master/texmf-dist/tex/latex/datatool/dataplot.sty b/Master/texmf-dist/tex/latex/datatool/dataplot.sty
index 564cc58d12b..36209d39185 100644
--- a/Master/texmf-dist/tex/latex/datatool/dataplot.sty
+++ b/Master/texmf-dist/tex/latex/datatool/dataplot.sty
@@ -137,6 +137,21 @@
 \newif\ifDTLshowlines
 \DTLshowlinesfalse
 \newcommand*{\DTLplotatbegintikz}{}
+\newcommand*{\@dtlplothandlermark}[1]{%
+  \pgfplothandlermark
+  {%
+    \pgfmathparse{1/\dtl@scale@x}%
+    \pgftransformxscale{\pgfmathresult}%
+    \pgfmathparse{1/\dtl@scale@y}%
+    \pgftransformyscale{\pgfmathresult}%
+   #1%
+   }%
+}
+\newcommand*{\dtlplothandlermark}[1]{%
+   \PackageWarning{dataplot}{\string\dtlplothandlermark\space
+     found outside \string\DTLplot}%
+  \pgfplothandlermark{#1}%
+}
 \newcommand*{\DTLplotatendtikz}{}
 \define@key{dataplot}{x}{%
 \def\dtl@xkey{#1}}
@@ -418,6 +433,7 @@ east,southeast,south,southwest,west,northwest}[northeast]{%
    \begin{scope}
    \pgftransformcm{\dtl@scale@x}{0}{0}{\dtl@scale@y}%
      {\pgfpoint{\dtl@offset@x pt}{\dtl@offset@y pt}}%
+       \let\dtlplothandlermark\@dtlplothandlermark
        \DTLplotatbegintikz
        \ifDTLbox
          \draw (\DTLminX,\DTLminY) -- (\DTLmaxX,\DTLminY) --
@@ -789,6 +805,7 @@ east,southeast,south,southwest,west,northwest}[northeast]{%
         \fi
        \pgftransformcm{\dtl@scale@x}{0}{0}{\dtl@scale@y}%
          {\pgfpoint{\dtl@offset@x pt}{\dtl@offset@y pt}}%
+       \let\dtlplothandlermark\@dtlplothandlermark
         \DTLplotatendtikz
        \end{tikzpicture}
     \fi
@@ -948,10 +965,10 @@ east,southeast,south,southwest,west,northwest}[northeast]{%
 \fi
 \expandafter\toks@\expandafter{\dtl@legendline}%
 \ifx\dtl@legend\@empty
-  \edef\dtl@legend{\noexpand\tikz\the\toks@; \noexpand& #3}%
+  \xdef\dtl@legend{\noexpand\tikz\the\toks@; \noexpand& #3}%
 \else
   \expandafter\@dtl@toks\expandafter{\dtl@legend}%
-  \edef\dtl@legend{\the\@dtl@toks\noexpand\\%
+  \xdef\dtl@legend{\the\@dtl@toks\noexpand\\%
     \noexpand\tikz\the\toks@; \noexpand& #3}%
 \fi
 }
-- 
cgit v1.2.3

