Debian Codegraph @

texmf-dist/tex/latex/pgfplots/pgfplots.sty

raw
1 %--------------------------------------------
2 %
3 % Package pgfplots.sty
4 %
5 % Provides a user-friendly interface to create function plots (normal
6 % plots, semi-logplots and double-logplots).
7 %
8 % It is based on Till Tantau's PGF package.
9 %
10 % Copyright 2007-2013 by Christian Feuersänger.
11 %
12 % This program is free software: you can redistribute it and/or modify
13 % it under the terms of the GNU General Public License as published by
14 % the Free Software Foundation, either version 3 of the License, or
15 % (at your option) any later version.
16 %
17 % This program is distributed in the hope that it will be useful,
18 % but WITHOUT ANY WARRANTY; without even the implied warranty of
19 % MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
20 % GNU General Public License for more details.
21 %
22 % You should have received a copy of the GNU General Public License
23 % along with this program. If not, see <http://www.gnu.org/licenses/>.
24 %
25 %--------------------------------------------
26 \IfFileExists{pgfplots.revision.tex}{\input pgfplots.revision.tex } {%
27 \def\pgfplotsrevision{0}%
28 \def\pgfplotsversion{0.0}%
29 \def\pgfplotsversiondatetime{2014-07-01 00:00:00 +100}%
30 \def\pgfplotsrevisiondatetime{2014-07-01 00:00:00 +100}%
31 \def\pgfplotsversiondate{2014/07/01}%
32 \def\pgfplotsrevisiondate{2014/07/01}%
33 }
34 \ProvidesPackage{pgfplots}[\pgfplotsversiondate\space v\pgfplotsversion\space Data Visualization (\pgfplotsrevision)]
35
36 \RequirePackage{graphicx}
37
38 % ATTENTION:
39 % you MAY need one of
40 % \def\pgfsysdriver{pgfsys-dvipdfm.def}
41 % \def\pgfsysdriver{pgfsys-pdftex.def}
42 % \def\pgfsysdriver{pgfsys-dvips.def}
43 %
44 % BEFORE the first \usepackage{pgf}, \usepackage{tikz} or
45 % \usepackage{pgfplots}.
46 % Default is
47 % 'dvips' for 'latex'
48 % 'pdftex' for 'pdflatex'
49 % -> dvipdfm needs special attention.
50
51 \IfFileExists{pgfsys-luatex.def}{%
52 % OK, proceed as usual
53 }{%
54 % hm. check if we need it:
55 \def\pgfplots@glob@TMPa{luatex.def}%
56 \edef\pgfplots@glob@TMPb{\Gin@driver}%
57 \ifx\pgfplots@glob@TMPb\pgfplots@glob@TMPa
58 % hm. probably
59 \@ifundefined{pgfsysdriver}{%
60 % use a patch shipped with pgfplots:
61 \def\pgfsysdriver{pgfsys-luatexpatch.def}%
62 \immediate\write16{Package pgfplots external lib: activating patch for pgfsys-luatex.def driver (PGF is too old)}
63 }{%
64 \def\pgfplots@glob@TMPa{pgfsys-luatex.def}%
65 \ifx\pgfsysdriver\pgfplots@glob@TMPa
66 % use a patch shipped with pgfplots:
67 \def\pgfsysdriver{pgfsys-luatexpatch.def}%
68 \immediate\write16{Package pgfplots external lib: activating patch for pgfsys-luatex.def driver (PGF is too old)}
69 \fi
70 }%
71 \fi
72 }
73
74 \RequirePackage{tikz}
75
76 % This is *identical* to \pgfutil@IfUndefined . I copied it here
77 % because pgf up to and including version 2.10 does not contain it.
78 \def\pgfplotsutil@IfUndefined#1{%
79 \begingroup\expandafter\expandafter\expandafter\endgroup
80 \expandafter\ifx\csname#1\endcsname\relax
81 \expandafter\pgfutil@firstoftwo
82 \else
83 \expandafter\pgfutil@secondoftwo
84 \fi
85 }
86
87 \gdef\pgfplots@glob@TMPa{}%
88 \pgfplotsutil@IfUndefined{directlua}{}{%
89 \pgfplotsutil@IfUndefined{newcatcodetable}{%
90 % I need \newcatcodetable
91 \gdef\pgfplots@glob@TMPa{\RequirePackage{luatexbase}}%
92 }
93 }%
94
95 \ifx\pgfplots@glob@TMPa\pgfutil@empty
96 \else
97 \expandafter\pgfplots@glob@TMPa
98 \fi
99
100 \def\pgfplots@texdist@protect{\protect}%
101
102 \input pgfplots.code.tex
103
104
105 % checks for xcolor configuration options and will override
106 % mesh/colorspace explicit color output
107 % and
108 % colormap default colorspace
109 % if needed.
110 \def\pgfplots@check@global@colorspace@overrides{%
111 % "bOverridesColorspace"
112 \pgfplots@loc@tmpfalse
113 \ifconvertcolorsD
114 % xcolor converts at *definition* time:
115 \pgfplots@loc@tmptrue
116 \else
117 \ifconvertcolorsU
118 % xcolor converts at *usage* time:
119 \pgfplots@loc@tmptrue
120 \fi
121 \fi
122 %
123 \ifpgfplots@loc@tmp
124 \let\pgfplots@loc@TMPb=\pgfutil@empty%
125 \ifx\XC@tgt@mod\pgfplots@XC@tgt@mod@rgb \def\pgfplots@loc@TMPb{rgb}\fi
126 \ifx\XC@tgt@mod\pgfplots@XC@tgt@mod@RGB \def\pgfplots@loc@TMPb{rgb}\fi
127 \ifx\XC@tgt@mod\pgfplots@XC@tgt@mod@cmyk\def\pgfplots@loc@TMPb{cmyk}\fi
128 \ifx\XC@tgt@mod\pgfplots@XC@tgt@mod@cmy \def\pgfplots@loc@TMPb{cmyk}\fi
129 \ifx\XC@tgt@mod\pgfplots@XC@tgt@mod@gray \def\pgfplots@loc@TMPb{gray}\fi
130 \ifx\XC@tgt@mod\pgfplots@XC@tgt@mod@Gray \def\pgfplots@loc@TMPb{gray}\fi
131 %
132 \ifx\pgfplots@loc@TMPb\pgfutil@empty
133 \else
134 \edef\pgfplots@loc@TMPa{%
135 mesh/colorspace explicit color output=\pgfplots@loc@TMPb,%
136 colormap default colorspace=\pgfplots@loc@TMPb,%
137 }%
138 \pgfplots@log3{Overriding colorspace to \pgfplots@loc@TMPb\space due to xcolor configuration.}%
139 \expandafter\pgfplotsset\expandafter{\pgfplots@loc@TMPa}%
140 \fi
141 \fi
142 }%
143
144 \def\pgfplots@XC@tgt@mod@rgb#1{rgb}
145 \def\pgfplots@XC@tgt@mod@RGB#1{rgb}
146 \def\pgfplots@XC@tgt@mod@cmyk#1{cmyk}
147 \def\pgfplots@XC@tgt@mod@cmy#1{cmy}
148 \def\pgfplots@XC@tgt@mod@gray#1{gray}
149 \def\pgfplots@XC@tgt@mod@Gray#1{gray}
150
151 \usetikzlibrary{plotmarks}
152
153
154
155 \endinput