summaryrefslogtreecommitdiff
path: root/tex/context/modules/mkxl/m-tikz-pgfplots.tex
diff options
context:
space:
mode:
Diffstat (limited to 'tex/context/modules/mkxl/m-tikz-pgfplots.tex')
-rw-r--r--tex/context/modules/mkxl/m-tikz-pgfplots.tex46
1 files changed, 46 insertions, 0 deletions
diff --git a/tex/context/modules/mkxl/m-tikz-pgfplots.tex b/tex/context/modules/mkxl/m-tikz-pgfplots.tex
new file mode 100644
index 000000000..1dd06b8b2
--- /dev/null
+++ b/tex/context/modules/mkxl/m-tikz-pgfplots.tex
@@ -0,0 +1,46 @@
+%D See m-tikz.mkxl for comments.
+
+\startmodule [pgfplots]
+
+\writestatus{loading}{ConTeXt User Module / Pgfplots}
+
+\tikzinputfile{pgfplots.revision.tex}
+
+\usetikzlibrary[plotmarks]
+
+\tikzinputfile{pgfplots.code.tex}
+
+\def\pgfplotsincludegraphics[#1]#2%
+ {\externalfigure[#2][#1]}
+
+\starttikzsettings
+ \pgfkeys{/pgfplots/plot graphics/includegraphics cmd=\pgfplotsincludegraphics}
+\stoptikzsettings
+
+\unprotect
+
+\let\pgfplots@ORIG@tikz@installcommands@before@context\tikz@installcommands
+
+\def\tikz@installcommands{%
+ \pgfplots@ORIG@tikz@installcommands@before@context
+ %
+ \let\startaxis=\pgfplots@environment@axis
+ \let\stopaxis=\endpgfplots@environment@axis
+ %
+ \let\startsemilogxaxis=\pgfplots@environment@semilogxaxis
+ \let\stopsemilogxaxis=\endpgfplots@environment@semilogxaxis
+ %
+ \let\startsemilogyaxis=\pgfplots@environment@semilogyaxis
+ \let\stopsemilogyaxis=\endpgfplots@environment@semilogyaxis
+ %
+ \let\startloglogaxis=\pgfplots@environment@loglogaxis
+ \let\stoploglogaxis=\endpgfplots@environment@loglogaxis
+ %
+ \def\startpgfplotsinterruptdatabb{\pgfplotsinterruptdatabb}%
+ \def\stoppgfplotsinterruptdatabb{\endpgfplotsinterruptdatabb}%
+}
+
+\protect
+
+\stopmodule
+