summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/latex/numericplots
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2013-04-24 23:18:04 +0000
committerKarl Berry <karl@freefriends.org>2013-04-24 23:18:04 +0000
commitcb816f38f1e3873a1da8f2b33f2b630ccf8e8fa6 (patch)
treec63b1aab3c2ee6387acd9ccf4e077f81675d2952 /Master/texmf-dist/tex/latex/numericplots
parenteb6cd746c2e19735a17b67414c8b427fde92ce23 (diff)
numericplots (21apr13)
git-svn-id: svn://tug.org/texlive/trunk@30097 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/latex/numericplots')
-rw-r--r--Master/texmf-dist/tex/latex/numericplots/NumericPlots.sty716
-rw-r--r--Master/texmf-dist/tex/latex/numericplots/NumericPlots_TickLabels.tex144
-rw-r--r--Master/texmf-dist/tex/latex/numericplots/NumericPlots_labels.tex167
-rw-r--r--Master/texmf-dist/tex/latex/numericplots/NumericPlots_legend.tex112
-rw-r--r--Master/texmf-dist/tex/latex/numericplots/NumericPlots_macros.tex155
-rw-r--r--Master/texmf-dist/tex/latex/numericplots/NumericPlots_styles.tex70
6 files changed, 863 insertions, 501 deletions
diff --git a/Master/texmf-dist/tex/latex/numericplots/NumericPlots.sty b/Master/texmf-dist/tex/latex/numericplots/NumericPlots.sty
index 8c50ac87cf9..c6bc42e9c4b 100644
--- a/Master/texmf-dist/tex/latex/numericplots/NumericPlots.sty
+++ b/Master/texmf-dist/tex/latex/numericplots/NumericPlots.sty
@@ -1,4 +1,4 @@
-% Copyright 2010 Thomas Koenig, Alexander Michel, Michael Baumgart
+% Copyright 2013 Thomas Koenig, Alexander Michel, Michael Baumgart
%
% This file is part of NumericPlots.
%
@@ -17,16 +17,8 @@
\NeedsTeXFormat{LaTeX2e}
-\ProvidesPackage{NumericPlots}[2011/01/07 LaTeX package to plot numeric data]
-
-% ==========================================================
-% || TODO
-% ||
-% || - implementation should be independant of psset
-% || - factor for x and y axis?
-% || - add option beamer (change default Sep/Sizes..)
-% || - change calculation of lengths (LabelSep) -> see TickLength
-
+\ProvidesPackage{NumericPlots}%
+ [2013/04/19 v. 2.0 LaTeX package to plot numeric data]
\RequirePackage{calc}
@@ -41,6 +33,11 @@
\RequirePackage{xcolor}
+% \makeatletter
+% \newcommand*{\getlengthwounit}[1]{\strip@pt#1}
+% \makeatother
+
+
% =======================================
% === Definition of keys and commands ===
@@ -53,6 +50,9 @@
\RequirePackage{xkeyval}
\RequirePackage{xkvview} % keep track of all keys that are defined
+\newcommand{\testframe}[1]{#1}
+
+
% globally needed values as newcommands
\newcommand{\NumDataPlotxRange}{1}
\newcommand{\NumDataPlotxCoordRange}{1}
@@ -69,6 +69,7 @@
\newcommand{\NDPputXcoord}{0}
\newcommand{\NDPputYcoord}{0}
\newcommand{\NDPRefPoint}{c}
+\newcommand{\NDPputRotation}{0}
\newcommand{\NumDataPlotBuffer}{0}
\newcommand{\NumDataPlotBufferI}{0}
@@ -76,11 +77,17 @@
\newcommand{\TicksXLeft}{0}
\newcommand{\TicksYRight}{0}
\newcommand{\TicksYLeft}{0}
+\newcommand{\TickLabelsXRight}{0}
+\newcommand{\TickLabelsXLeft}{0}
+\newcommand{\TickLabelsYRight}{0}
+\newcommand{\TickLabelsYLeft}{0}
\newcommand{\xTickLength}{-10}
\newcommand{\yTickLength}{-10}
\newcommand{\xNrTicks}{1}
\newcommand{\yNrTicks}{1}
+\newcommand{\xNrTickLabels}{1}
+\newcommand{\yNrTickLabels}{1}
\newboolean{PlotLeftAxis}
\setboolean{PlotLeftAxis}{true}
@@ -93,8 +100,6 @@
\setboolean{PlotUpperAxis}{true}
\newcommand{\nrLegendCols}{1}
-\newcommand{\StdLabelOption}{{}}
-\newcommand{\StdTickLabelOption}{{}}
\newlength{\LegLineWidth}\setlength{\LegLineWidth}{20pt}
\newboolean{LegendOrientationLeft}
@@ -106,9 +111,10 @@
\newcommand{\LogxAxis}{}
-\newcommand{\LogxAxisLabel}[1]{#1}
+\newcommand{\LogxAxisLabel}[1]{$#1$}
\newcommand{\LogyAxis}{}
-\newcommand{\LogyAxisLabel}[1]{#1}
+\newcommand{\LogyAxisLabel}[1]{$#1$}
+
\newcounter{BufferCounter}
% ----------------------------------------------------------------------------
@@ -130,31 +136,25 @@
dy, % so far, these are always calculated and cannot be set by user
yCoordMax, yCoordMin
}
-
-\define@cmdkeys[NumericDataPlot]{xAxis}[NumDataPlotx]{
- LabelRotation, LabelPos, TickSep, LabelOption, TickLabelOption
- }
-\define@cmdkeys[NumericDataPlot]{yAxis}[NumDataPloty]{
- LabelRotation, LabelPos, TickSep, LabelOption, TickLabelOption
- }
+
\define@boolkey[NumericDataPlot]{Axis}{xLog}[true]{
\ifNumericDataPlot@Axis@xLog
\renewcommand{\LogxAxis}{log}
- \renewcommand{\LogxAxisLabel}[1]{10^{##1}}
+ \renewcommand{\LogxAxisLabel}[1]{$10^{##1}$}
\else
\renewcommand{\LogxAxis}{}
- \renewcommand{\LogxAxisLabel}[1]{##1}
+ \renewcommand{\LogxAxisLabel}[1]{$##1$}
\fi
}
\define@boolkey[NumericDataPlot]{Axis}{yLog}[true]{
\ifNumericDataPlot@Axis@yLog
\renewcommand{\LogyAxis}{log}
- \renewcommand{\LogyAxisLabel}[1]{10^{##1}}
+ \renewcommand{\LogyAxisLabel}[1]{$10^{##1}$}
\else
\renewcommand{\LogyAxis}{}
- \renewcommand{\LogyAxisLabel}[1]{##1}
+ \renewcommand{\LogyAxisLabel}[1]{$##1$}
\fi
}
@@ -166,7 +166,9 @@
% \setkeys[NumericDataPlot]{Axis}{<list of keys>}
% \setrmkeys[NumericDataPlot]{AxisWait}
% where <list of keys> can contain all the keys from Axis and from AxisWait)
-\define@cmdkeys[NumericDataPlot]{AxisWait}[NumDataPlot]{xO, yO}{}
+% same goes for DDy and DDx (Dy for labels): By default, the values of dy and dx
+% will be used.
+\define@cmdkeys[NumericDataPlot]{AxisWait}[NumDataPlot]{xO, yO, DDy, DDx}{}
\define@boolkeys[NumericDataPlot]{xAxis}
{NoGrid, NoTicks, NoLabel, NoTickLabel}[true]
@@ -174,8 +176,7 @@
\define@boolkeys[NumericDataPlot]{yAxis}
{NoGrid, NoTicks, NoLabel, NoTickLabel}[true]
-\define@key[NumericDataPlot]{yAxis}{yLabelSep}[\origXLabelSep]{\setlength{\yLabelSep}{#1}}
-\define@key[NumericDataPlot]{xAxis}{xLabelSep}[\origYLabelSep]{\setlength{\xLabelSep}{#1}}
+
\define@choicekey+[NumericDataPlot]{xAxis}{AxisStyle}[\val\nrAxisStyle]
{Boxed,Lower,Upper,None}{
@@ -224,53 +225,34 @@
% | picture width etc.
% ----------------------------------------------------------------------------
-\define@cmdkeys[NumericDataPlot]{General}[NumDataPlotG]{
- xPicMin, yPicMin, xPicMax, yPicMax,
- TickLength
+\define@cmdkeys[NumericDataPlot]{General}[NumDataPlotG]{%
+ xPicMin, yPicMin, xPicMax, yPicMax, TickLength%
}
-\define@key[NumericDataPlot]{General}{llx}[\StdLLX]{
- \psset{llx=-#1}
- \addtolength{\OffsetWidth}{\StdLLX}
- \addtolength{\OffsetWidth}{-#1}
+\define@key[NumericDataPlot]{General}{llx}[\StdLLX]{%
+ \psset{llx=-#1}%
+ \addtolength{\OffsetWidth}{-\StdLLX}%
+ \addtolength{\OffsetWidth}{#1}%
}
-\define@key[NumericDataPlot]{General}{urx}[\StdURX]{
- \psset{urx=#1}
- \addtolength{\OffsetWidth}{-\StdURX}
- \addtolength{\OffsetWidth}{#1}
+\define@key[NumericDataPlot]{General}{urx}[\StdURX]{%
+ \psset{urx=#1}%
+ \addtolength{\OffsetWidth}{-\StdURX}%
+ \addtolength{\OffsetWidth}{#1}%
}
-\define@key[NumericDataPlot]{General}{lly}[\StdLLY]{\psset{lly=#1}}
-\define@key[NumericDataPlot]{General}{ury}[\StdURY]{\psset{ury=#1}}
-
-
-% ----------------------------------------------------------------------------
-% | keys for the legend
-% ----------------------------------------------------------------------------
-
-\define@key[NumericDataPlot]{Legend}{nrCols}[1]{\renewcommand{\nrLegendCols}{#1}}%
-\define@key[NumericDataPlot]{Legend}{LegLineWidth}[20pt]{\setlength{\LegLineWidth}{#1}}%
-
-\define@choicekey+[NumericDataPlot]{Legend}{LabelOrientation}[\val\nrLegOrient]
-{r,l,c}{%
- \ifcase\nrLegOrient\relax%
- \setboolean{LegendOrientationLeft}{false}%
- \setboolean{LegendOrientationRight}{true}%
- \setboolean{LegendOrientationCenter}{false}%
- \or%
- \setboolean{LegendOrientationLeft}{true}%
- \setboolean{LegendOrientationRight}{false}%
- \setboolean{LegendOrientationCenter}{false}%
- \or%
- \setboolean{LegendOrientationLeft}{false}%
- \setboolean{LegendOrientationRight}{false}%
- \setboolean{LegendOrientationCenter}{true}%
- \fi%
-}{
- \PackageWarning{NumericPlots}{LabelOrientation #1 not defined. Use r, l or c}%
+\define@key[NumericDataPlot]{General}{lly}[\StdLLY]{%
+ \psset{lly=-#1}%
+ \addtolength{\OffsetHeight}{-\StdLLY}%
+ \addtolength{\OffsetHeight}{#1}%
+}
+\define@key[NumericDataPlot]{General}{ury}[\StdURY]{%
+ \psset{ury=#1}%
+ \addtolength{\OffsetHeight}{-\StdURY}%
+ \addtolength{\OffsetHeight}{#1}%
}
+
% ------------------------------------------------------------------------------
% | keys for the put commands
% ------------------------------------------------------------------------------
@@ -288,158 +270,31 @@
\define@key[NumericDataPlot]{put}{RefPoint}[c]{
\renewcommand{\NDPRefPoint}{#1}
}
+\define@key[NumericDataPlot]{put}{Rot}[0]{
+ \renewcommand{\NDPputRotation}{#1}
+}
%-------------------------------------------------------------------------------
+\input{NumericPlots_labels}
+\input{NumericPlots_TickLabels}
-
-\newlength{\picwidth}
+%
+%\newlength{\picwidth}
\newlength{\CPicWidth}
-\newlength{\StdLLX}\setlength{\StdLLX}{-1.5cm}
-\newlength{\StdLLY}\setlength{\StdLLY}{-1.25cm}
-\newlength{\StdURX}\setlength{\StdURX}{2pt}
-\newlength{\StdURY}\setlength{\StdURY}{2pt}
+\newlength{\CPicHeight}
+\newlength{\StdLLX}\setlength{\StdLLX}{7ex +\baselineskip+2pt}
+\newlength{\StdLLY}\setlength{\StdLLY}{2\baselineskip+1ex+2pt}
+\newlength{\StdURX}\setlength{\StdURX}{2ex}
+\newlength{\StdURY}\setlength{\StdURY}{0.5em}
\newlength{\OffsetWidth}
+\newlength{\OffsetHeight}
-\newlength{\origXLabelSep}\setlength{\origXLabelSep}{10pt}
-\newlength{\origYLabelSep}\setlength{\origYLabelSep}{20pt}
-\newlength{\xLabelSep}\setlength{\xLabelSep}{\origXLabelSep}
-\newlength{\yLabelSep}\setlength{\yLabelSep}{\origYLabelSep}
-
-% ==============================================================================
-% ||
-% || legend
-% ||
-% ==============================================================================
-\newcommand{\LegLineOld}[2][]{%
- \setkeys[NumericDataPlot]{Legend}{#1}
- %
- \centering\Rnode{lab#2}{}%
- \psline[style=#2,showpoints=false]([nodesep=0.5\LegLineWidth]lab#2)([nodesep=-0.5\LegLineWidth]lab#2)%
- \psline[style=#2](lab#2)(lab#2)%
-}
-
-% \newcommand{\LegLine}[2][]{%
-% \setkeys[NumericDataPlot]{Legend}{#1}
-% %
-% \centering\Rnode{LegLineNode}{}%
-% \psline[#2,showpoints=false]([nodesep=0.5\LegLineWidth]LegLineNode)([nodesep=-0.5\LegLineWidth]LegLineNode)%
-% \psline[#2, linestyle=none](LegLineNode)(LegLineNode)
-% }
-%
-%
-% \newcommand{\LegendDefinition}[2][nrCols]{%
-% \setkeys[NumericDataPlot]{Legend}{#1}%
-% %
-% \psframebox[style=LegendBoxStyle]{%
-% \ifLegendOrientationLeft
-% \begin{tabular}{*{\nrLegendCols}{p{\LegLineWidth}l}}%
-% #2%
-% \end{tabular}%
-% \fi
-% \ifLegendOrientationCenter
-% \begin{tabular}{*{\nrLegendCols}{p{\LegLineWidth}c}}
-% #2
-% \end{tabular}
-% \fi
-% \ifLegendOrientationRight
-% \begin{tabular}{*{\nrLegendCols}{p{\LegLineWidth}r}}
-% #2
-% \end{tabular}
-% \fi
-% }%psframebox
-% }
-
-\newcommand{\LegLine}[2][]{%
- \setkeys[NumericDataPlot]{Legend}{#1}%
- \parbox[t]{\LegLineWidth}{%
- \centering\Rnode{LegLineNode}{}%
- \psline[#2,showpoints=false]([nodesep=0.5\LegLineWidth]LegLineNode)([nodesep=-0.5\LegLineWidth]LegLineNode)%
- \psline[#2, linestyle=none](LegLineNode)(LegLineNode)%
- }
-}
-
-
-\newcommand{\LegendDefinition}[2][nrCols]{%
- \setkeys[NumericDataPlot]{Legend}{#1}%
- %
- \psframebox[style=LegendBoxStyle]{%
- \ifLegendOrientationLeft%
- \begin{tabular}{*{\nrLegendCols}{ll}}%
- #2%
- \end{tabular}%
- \fi
- \ifLegendOrientationCenter
- \begin{tabular}{*{\nrLegendCols}{cc}}
- #2
- \end{tabular}
- \fi
- \ifLegendOrientationRight
- \begin{tabular}{*{\nrLegendCols}{cr}}
- #2
- \end{tabular}
- \fi
- }%psframebox
-}
% ==============================================================================
% ||
-% || axis labels
-% ||
-% ==============================================================================
-
-
-\newcommand{\LeftyLabel}[1]{
- \rput[b]
- {!90 \NumDataPlotyLabelRotation\space add}
- (!\NumDataPlotxCoordMin\space
- \NumDataPlotyCoordRange\space \NumDataPlotyLabelPos\space mul
- \NumDataPlotyCoordMin\space add){
- \begin{tabular}{c}
- \NumDataPlotyLabelOption{}#1\\
- \vspace{\yLabelSep}
- \end{tabular}}
- \setlength{\yLabelSep}{\origYLabelSep}
-}
-
-\newcommand{\RightyLabel}[1]{
- \rput[b]
- {!270 \NumDataPlotyLabelRotation\space add}
- (!\NumDataPlotxCoordMax\space
- \NumDataPlotyCoordRange\space \NumDataPlotyLabelPos\space mul
- \NumDataPlotyCoordMin\space add){
- \begin{tabular}{c}
- \NumDataPlotyLabelOption{}#1\\
- \vspace{\yLabelSep}
- \end{tabular}}
- \setlength{\yLabelSep}{\origYLabelSep}
-}
-
-\newcommand{\UpperxLabel}[1]{
- \rput[b]{!0 \NumDataPlotxLabelRotation\space add}
- (!\NumDataPlotxCoordRange\space \NumDataPlotxLabelPos\space mul
- \NumDataPlotxCoordMin\space add \NumDataPlotyCoordMax){
- \begin{tabular}{c}
- \NumDataPlotxLabelOption{}#1\\
- \vspace{\xLabelSep}
- \end{tabular}}
- \setlength{\xLabelSep}{\origXLabelSep}
-}
-
-\newcommand{\LowerxLabel}[1]{
- \rput[t]{!0 \NumDataPlotxLabelRotation\space add}
- (!\NumDataPlotxCoordRange\space \NumDataPlotxLabelPos\space mul
- \NumDataPlotxCoordMin\space add \NumDataPlotyCoordMin){
- \begin{tabular}{c}
- \vspace{\xLabelSep}\\
- \NumDataPlotxLabelOption{}#1
- \end{tabular}}
- \setlength{\xLabelSep}{\origXLabelSep}
-}
-% ==============================================================================
-% ||
% || Axis (Scaling)
% ||
% ==============================================================================
@@ -471,8 +326,8 @@
% (xMin and yMin also set xO and yO but when xO and yO are set by the user,
% these values should be overwritten.)
\setkeys*[NumericDataPlot]{Axis}
- [yO, yMin, yMax, Dy, dy, yCoordMin, yCoordMax, yLog]{#1}
- \setrmkeys[NumericDataPlot]{AxisWait}[yO]
+ [yMin, yMax, Dy, dy, yCoordMin, yCoordMax, yLog]{#1}
+ \setrmkeys[NumericDataPlot]{AxisWait}[yO, DDy]
% for logarithmic axes: calculate log(xMax), log(xMin), Dx=1, xO=ceil(xMin)
\ifNumericDataPlot@Axis@xLog
@@ -494,10 +349,16 @@
% calculate number of ticks
\FPdiv{\xNrTicks}{\NumDataPlotxRange}{\NumDataPlotDx}
\FPtrunc{\xNrTicks}{\xNrTicks}{0}
+ % calculate number of tick labels
+ \FPdiv{\xNrTickLabels}{\NumDataPlotxRange}{\NumDataPlotDDx}
+ \FPtrunc{\xNrTickLabels}{\xNrTickLabels}{0}
- % calculate dx
+ % calculate dx (distance (in coordinates) between two ticks)
\FPmul{\NumDataPlotdx}{\NumDataPlotxDataCoordRatio}{\NumDataPlotDx}
\FPround{\NumDataPlotdx}{\NumDataPlotdx}{2}
+ % calculate dx for labels
+ \FPmul{\NumDataPlotdxLabels}{\NumDataPlotxDataCoordRatio}{\NumDataPlotDDx}
+ \FPround{\NumDataPlotdxLabels}{\NumDataPlotdxLabels}{2}
% calculate coordinates of x origin
\FPsub{\NumDataPlotBuffer}{\NumDataPlotxO}{\NumDataPlotxMin}
@@ -509,12 +370,22 @@
\FPsub{\TicksXRight}{\NumDataPlotxMax}{\NumDataPlotxO}
\FPdiv{\TicksXRight}{\TicksXRight}{\NumDataPlotDx}
\FPtrunc{\TicksXRight}{\TicksXRight}{0}
+ % calculate number of tick labels on right side of the origin
+ \FPsub{\TickLabelsXRight}{\NumDataPlotxMax}{\NumDataPlotxO}
+ \FPdiv{\TickLabelsXRight}{\TickLabelsXRight}{\NumDataPlotDDx}
+ \FPtrunc{\TickLabelsXRight}{\TickLabelsXRight}{0}
% calculate number of ticks on left side of the origin (number is negative!)
\FPsub{\TicksXLeft}{\NumDataPlotxMin}{\NumDataPlotxO}
\FPdiv{\TicksXLeft}{\TicksXLeft}{\NumDataPlotDx}
\FPsub{\TicksXLeft}{\TicksXLeft}{1}
\FPtrunc{\TicksXLeft}{\TicksXLeft}{0}
+ % calculate number of tick labels on left side of the origin (number is
+ % negative!)
+ \FPsub{\TickLabelsXLeft}{\NumDataPlotxMin}{\NumDataPlotxO}
+ \FPdiv{\TickLabelsXLeft}{\TickLabelsXLeft}{\NumDataPlotDDx}
+ \FPsub{\TickLabelsXLeft}{\TickLabelsXLeft}{1}
+ \FPtrunc{\TickLabelsXLeft}{\TickLabelsXLeft}{0}
\ScaleAxes{}
}
@@ -562,29 +433,25 @@
% for logarithmic axes, LogxAxisLabel returns 10^#1. Normally it just returns
% #1.
-\newcommand{\plotxTickLabels}[3]{
- \FPadd{\NumDataPlotBuffer}{\TicksXLeft}{1}
+
+
+
+\newcommand{\plotxTickLabels}[1]{
+ \FPadd{\NumDataPlotBuffer}{\TickLabelsXLeft}{1}
\FPround{\NumDataPlotBuffer}{\NumDataPlotBuffer}{0}
% plot ticks on right side of the origin
- \mmultido{\n=\NumDataPlotxO+\NumDataPlotDx}{\TicksXRight}
+ \mmultido{\n=\NumDataPlotxO+\NumDataPlotDDx}{\TickLabelsXRight}
{
- \rput[#3]{0}(!\NumDataPlotdx \space \NumDataPlotDx \space div \n
- \space \NumDataPlotxO \space sub mul \xCoordOrig \space add \space #1
- \space \NumDataPlotxTickSep \space #2)
- {\NumDataPlotxTickLabelOption{}$\LogxAxisLabel{\n}$}
- }
+ \PutTickLabelXaxis[#1,x=\n]{\LogxAxisLabel{\n}}
+ }
% plot ticks on left side of the origin
- \mmultido{\n=\NumDataPlotxO+\NumDataPlotDx}{\NumDataPlotBuffer}
+ \mmultido{\n=\NumDataPlotxO+\NumDataPlotDDx}{\NumDataPlotBuffer}
{
- \rput[#3]{0}(!\xCoordOrig \space \NumDataPlotdx \space
- \NumDataPlotDx \space div \n \space \NumDataPlotxO \space sub mul add \space #1 \space \NumDataPlotxTickSep \space #2)
- {\NumDataPlotxTickLabelOption{}$\LogxAxisLabel{\n}$}
+ \PutTickLabelXaxis[#1,x=\n]{\LogxAxisLabel{\n}}
}
% plot tick at origin
- \rput[#3]{0}(!\xCoordOrig\space #1 \space
- \NumDataPlotxTickSep\space #2)
- {\NumDataPlotxTickLabelOption{}$\LogxAxisLabel{\NumDataPlotxO}$}
+ \PutTickLabelXaxis[#1,x=\NumDataPlotxO]{\LogxAxisLabel{\NumDataPlotxO}}
}
\newcommand{\xLogSubGrid}[1]{
@@ -609,6 +476,7 @@
\multido{\n=\xCoordOrig+\NumDataPlotdx}{\TicksXLeft}{
\plotxGridLine{\n}
}
+
\FPsub{\NumDataPlotBuffer}{\TicksXLeft}{1}
\FPround{\NumDataPlotBuffer}{\NumDataPlotBuffer}{0}
\multido{\n=\xCoordOrig+\NumDataPlotdx}{\NumDataPlotBuffer}{
@@ -617,7 +485,10 @@
}
\newcommand{\plotxAxis}[2][]{
- \setkeys[NumericDataPlot]{xAxis}{#1}
+ \setkeys[NumericDataPlot]{putxLabel}{LabelSep}
+ \setkeys*[NumericDataPlot]{putxLabel}{#1}
+ \setrmkeys*[NumericDataPlot]{putxTickLabel}
+ \setrmkeys[NumericDataPlot]{xAxis}
% plot grid, ticks and ticklabels
\plotxGrid{}
@@ -631,12 +502,12 @@
(\NumDataPlotxCoordMax, \NumDataPlotyCoordMin)
\ifNumericDataPlot@xAxis@NoTickLabel
\else
- \plotxTickLabels{\NumDataPlotyCoordMin}{sub}{t}
+ \plotxTickLabels{ax=lower,#1}
\fi
% plot label
\ifNumericDataPlot@xAxis@NoLabel
\else
- \LowerxLabel{#2}
+ \PutLabelXaxis[ax=lower,#1]{#2}
\fi
%plot upper axis (boxed)
\ifthenelse{\boolean{PlotUpperAxis}}{
@@ -655,12 +526,12 @@
% plot ticklabels
\ifNumericDataPlot@xAxis@NoTickLabel
\else
- \plotxTickLabels{\NumDataPlotyCoordMax}{add}{b}
+ \plotxTickLabels{ax=upper,#1}
\fi
% plot label
\ifNumericDataPlot@xAxis@NoLabel
\else
- \UpperxLabel{#2}
+ \PutLabelXaxis[ax=upper,#1]{#2}
\fi
}{}
}
@@ -674,34 +545,30 @@
% ||
% ==============================================================================
-\newcommand{\plotyTickLabels}[3]{
- \FPadd{\NumDataPlotBuffer}{\TicksYLeft}{1}
+
+\newcommand{\plotyTickLabels}[1]{
+ \FPadd{\NumDataPlotBuffer}{\TickLabelsYLeft}{1}
\FPround{\NumDataPlotBuffer}{\NumDataPlotBuffer}{0}
% plot ticks on right side of the origin
- \mmultido{\n=\NumDataPlotyO+\NumDataPlotDy}{\TicksYRight}
+ \mmultido{\n=\NumDataPlotyO+\NumDataPlotDDy}{\TickLabelsYRight}
{
- \rput[#3]{0}(!#1 \space \NumDataPlotyTickSep
- \space #2 \space \NumDataPlotdy \space \NumDataPlotDy \space div \n \space \NumDataPlotyO \space sub mul \yCoordOrig \space add)
- {\NumDataPlotyTickLabelOption{}$\LogyAxisLabel{\n}$}
+ \PutTickLabelYaxis[#1,y=\n]{\LogyAxisLabel{\n}}
}
% plot ticks on left side of the origin
- \mmultido{\n=\NumDataPlotyO+\NumDataPlotDy}{\NumDataPlotBuffer}
+ \mmultido{\n=\NumDataPlotyO+\NumDataPlotDDy}{\NumDataPlotBuffer}
{
- \rput[#3]{0}(!#1 \space \NumDataPlotyTickSep
- \space #2 \space \NumDataPlotdy \space \NumDataPlotDy \space div \n \space \NumDataPlotyO \space sub mul \yCoordOrig \space add)
- {\NumDataPlotyTickLabelOption{}$\LogyAxisLabel{\n}$}
+ \PutTickLabelYaxis[#1,y=\n]{\LogyAxisLabel{\n}}
}
% plot tick at origin
- \rput[#3]{0}(!#1 \space \NumDataPlotyTickSep\space #2 \space \yCoordOrig)
- {\NumDataPlotyTickLabelOption{}$\LogyAxisLabel{\NumDataPlotyO}$}
+ \PutTickLabelYaxis[#1,y=\NumDataPlotyO]{\LogyAxisLabel{\NumDataPlotyO}}
}
\newcommand{\setyAxis}[1]{
-% values from the x-axis must be ignored! If they weren't, the default values
+ % values from the x-axis must be ignored! If they weren't, the default values
% would be set!
\setkeys*[NumericDataPlot]{Axis}
[xO, xMin, xMax, xCoordMin, xCoordMax, Dx, dx, xLog]{#1}
- \setrmkeys[NumericDataPlot]{AxisWait}[xO]
+ \setrmkeys[NumericDataPlot]{AxisWait}[xO, DDx]
%\ifNumericDataPlot@Axis@yNearlyTight
% \FPifpos{\NumDataPlotyMax} \FPmul{\NumDataPlotyMax}{\NumDataPlotyMax}{1.1} \else \FPmul{\NumDataPlotyMax}{\NumDataPlotyMax}{0.9}\fi
@@ -728,10 +595,16 @@
% calculate number of ticks
\FPdiv{\yNrTicks}{\NumDataPlotyRange}{\NumDataPlotDy}
\FPtrunc{\yNrTicks}{\yNrTicks}{0}
+ % calculate number of tick labels
+ \FPdiv{\yNrTickLabels}{\NumDataPlotyRange}{\NumDataPlotDDy}
+ \FPtrunc{\yNrTickLabels}{\yNrTickLabels}{0}
- % calculate dy
+ % calculate dy in coord -> distance between two ticks
\FPmul{\NumDataPlotdy}{\NumDataPlotyDataCoordRatio}{\NumDataPlotDy}
\FPround{\NumDataPlotdy}{\NumDataPlotdy}{2}
+ % calculate dyLabels in coord -> distance between two tick labels
+ \FPmul{\NumDataPlotdyLabels}{\NumDataPlotyDataCoordRatio}{\NumDataPlotDDy}
+ \FPround{\NumDataPlotdyLabels}{\NumDataPlotdyLabels}{2}
% calculate coordinates of y origin
\FPsub{\NumDataPlotBuffer}{\NumDataPlotyO}{\NumDataPlotyMin}
@@ -743,19 +616,29 @@
\FPsub{\TicksYRight}{\NumDataPlotyMax}{\NumDataPlotyO}
\FPdiv{\TicksYRight}{\TicksYRight}{\NumDataPlotDy}
\FPtrunc{\TicksYRight}{\TicksYRight}{0}
+ % calculate number of tick labels on right side of the origin
+ \FPsub{\TickLabelsYRight}{\NumDataPlotyMax}{\NumDataPlotyO}
+ \FPdiv{\TickLabelsYRight}{\TickLabelsYRight}{\NumDataPlotDDy}
+ \FPtrunc{\TickLabelsYRight}{\TickLabelsYRight}{0}
% calculate number of ticks on left side of the origin (number is negative!)
\FPsub{\TicksYLeft}{\NumDataPlotyMin}{\NumDataPlotyO}
\FPdiv{\TicksYLeft}{\TicksYLeft}{\NumDataPlotDy}
\FPsub{\TicksYLeft}{\TicksYLeft}{1}
\FPtrunc{\TicksYLeft}{\TicksYLeft}{0}
+ % calculate number of tick labels on left side of the origin (number is
+ % negative!)
+ \FPsub{\TickLabelsYLeft}{\NumDataPlotyMin}{\NumDataPlotyO}
+ \FPdiv{\TickLabelsYLeft}{\TickLabelsYLeft}{\NumDataPlotDDy}
+ \FPsub{\TickLabelsYLeft}{\TickLabelsYLeft}{1}
+ \FPtrunc{\TickLabelsYLeft}{\TickLabelsYLeft}{0}
% --- scaling ---
\ScaleAxes{}
}
-\newcommand{\plotyGridLine}[1]{
+\newcommand{\plotyGridLine}[1]{%
\FPsub{\NumDataPlotBuffer}{\NumDataPlotyCoordMax}{#1}
\FPsub{\NumDataPlotBufferI}{#1}{\NumDataPlotyCoordMin}
\FPmin{\NumDataPlotBuffer}{\NumDataPlotBuffer}{\NumDataPlotBufferI}
@@ -780,7 +663,8 @@
\fi
}
-\newcommand{\plotySubGridLine}[1]{
+\newcommand{\plotySubGridLine}[1]{%
+ % only used by yLogSubGrid
\FPsub{\NumDataPlotBuffer}{\NumDataPlotyCoordMax}{#1}
\FPsub{\NumDataPlotBufferI}{#1}{\NumDataPlotyCoordMin}
\FPmin{\NumDataPlotBuffer}{\NumDataPlotBuffer}{\NumDataPlotBufferI}
@@ -795,7 +679,9 @@
-\newcommand{\yLogSubGrid}[1]{
+\newcommand{\yLogSubGrid}[1]{%
+ % plots the subgrid for logarithmic axes, i.e. the grid between the two lines
+ % 10^x and 10^(x+1)
\ifNumericDataPlot@Axis@yLog
\multido{\iSubb=2+2}{4}{
\FPln{\NumDataPlotBuffer}{\iSubb}
@@ -822,9 +708,6 @@
\multido{\n=\yCoordOrig+\NumDataPlotdy}{\NumDataPlotBuffer}{
\yLogSubGrid{\n}
}
-% \putS{
-% TicksYLeft: \TicksYLeft
-% }
}
\newcommand{\plotyGridBoxed}{
@@ -842,19 +725,19 @@
\multido{\n=\yCoordOrig+\NumDataPlotdy}{\NumDataPlotBuffer}{
\yLogSubGrid{\n}
}
-% \putS{
-% TicksYLeft: \TicksYLeft
-% }
}
\newcommand{\plotyAxis}[2][]{
- \setkeys[NumericDataPlot]{yAxis}{#1}
+ \setkeys[NumericDataPlot]{putyLabel}{LabelSep}
+ \setkeys*[NumericDataPlot]{putyLabel}{#1}
+ \setrmkeys*[NumericDataPlot]{putyTickLabel}
+ \setrmkeys[NumericDataPlot]{yAxis}
% plot grid
\plotyGrid
- % plot lower axis
+ % plot left axis
\ifthenelse{\boolean{PlotLeftAxis}}
{
\psline{C-C}%
@@ -862,9 +745,9 @@
(\NumDataPlotxCoordMin, \NumDataPlotyCoordMax)
\ifNumericDataPlot@yAxis@NoTickLabel
\else
- \plotyTickLabels{\NumDataPlotxCoordMin}{sub}{r}
+ \plotyTickLabels{ax=left,#1}
\fi
- % plot upper axis
+ % plot right axis
\ifthenelse{\boolean{PlotRightAxis}}
{
\psline{C-C}%
@@ -874,7 +757,7 @@
% --- label ---
\ifNumericDataPlot@yAxis@NoLabel
\else
- \LeftyLabel{#2}
+ \PutLabelYaxis[ax=left,#1]{#2}
\fi
}{
\ifthenelse{\boolean{PlotRightAxis}}
@@ -884,109 +767,18 @@
(\NumDataPlotxCoordMax, \NumDataPlotyCoordMax)
\ifNumericDataPlot@yAxis@NoTickLabel
\else
- \plotyTickLabels{\NumDataPlotxCoordMax}{add}{l}
+ \plotyTickLabels{ax=right,#1}
\fi
% --- label ---
\ifNumericDataPlot@yAxis@NoLabel
\else
- \RightyLabel{#2}
+ \PutLabelYaxis[ax=right,#1]{#2}
\fi
}{}
}
}
-% ==============================================================================
-% ||
-% || commands...
-% ||
-% ==============================================================================
-
-\newcommand{\NDPput}[2][]{
- \setkeys[NumericDataPlot]{put}{RefPoint=c}
- \setkeys[NumericDataPlot]{put}{#1}
- \rput[\NDPRefPoint](\NDPputXcoord, \NDPputYcoord){#2}
-}
-
-\newcommand{\NDPhline}[2][]{
-%
- \FPsub{\NumDataPlotBuffer}{#2}{\NumDataPlotyMin}
- \FPmul{\NumDataPlotBuffer}{\NumDataPlotBuffer}{\NumDataPlotyDataCoordRatio}
- \FPadd{\NDPputYcoord}{\NumDataPlotBuffer}{\NumDataPlotyCoordMin}
-
- \psline[#1](\NumDataPlotxCoordMin, \NDPputYcoord)
- (\NumDataPlotxCoordMax, \NDPputYcoord)
-}
-
-\newcommand{\NDPvline}[2][]{
-%
- \FPsub{\NumDataPlotBuffer}{#2}{\NumDataPlotxMin}
- \FPmul{\NumDataPlotBuffer}{\NumDataPlotBuffer}{\NumDataPlotxDataCoordRatio}
- \FPadd{\NDPputXcoord}{\NumDataPlotBuffer}{\NumDataPlotxCoordMin}
-%
- \psline[#1](\NDPputXcoord, \NumDataPlotyCoordMin)
- (\NDPputXcoord, \NumDataPlotyCoordMax)
-}
-
-\newcommand{\NDPline}[5][]{
-%
- \FPsub{\NumDataPlotBuffer}{#2}{\NumDataPlotxMin}
- \FPmul{\NumDataPlotBuffer}{\NumDataPlotBuffer}{\NumDataPlotxDataCoordRatio}
- \FPadd{\NDPputXcoordOne}{\NumDataPlotBuffer}{\NumDataPlotxCoordMin}
-
- \FPsub{\NumDataPlotBuffer}{#2}{\NumDataPlotxMin}
- \FPmul{\NumDataPlotBuffer}{\NumDataPlotBuffer}{\NumDataPlotxDataCoordRatio}
- \FPadd{\NDPputXcoordOne}{\NumDataPlotBuffer}{\NumDataPlotxCoordMin}
-
-
- \psline[#1]
- (!#2 \NumDataPlotxMin\space sub \NumDataPlotxDataCoordRatio\space mul
- \NumDataPlotxCoordMin\space add
- #3 \NumDataPlotyMin\space sub \NumDataPlotyDataCoordRatio\space mul
- \NumDataPlotyCoordMin\space add)
- (!#4 \NumDataPlotxMin\space sub \NumDataPlotxDataCoordRatio\space mul
- \NumDataPlotxCoordMin\space add
- #5 \NumDataPlotyMin\space sub \NumDataPlotyDataCoordRatio\space mul
- \NumDataPlotyCoordMin\space add)
-}
-
-\newcommand{\NDPvbox}[3][]{
-
- \psframe[#1]
- (!#2 \NumDataPlotxMin\space sub \NumDataPlotxDataCoordRatio\space mul \NumDataPlotxCoordMin\space add
- \NumDataPlotyCoordMin)
- (!#3 \NumDataPlotxMin\space sub \NumDataPlotxDataCoordRatio\space mul \NumDataPlotxCoordMin\space add
- \NumDataPlotyCoordMax)
-}
-
-\newcommand{\NDPhbox}[3][]{
-
- \psframe[#1]
- (!\NumDataPlotxCoordMin \space
- #2 \NumDataPlotyMin\space sub \NumDataPlotyDataCoordRatio\space mul \NumDataPlotyCoordMin\space add)
- (!\NumDataPlotxCoordMax \space
- #3 \NumDataPlotyMin\space sub \NumDataPlotyDataCoordRatio\space mul \NumDataPlotyCoordMin\space add)
-}
-\newcommand{\NDPbox}[5][]{
-% \FPsub{\NumDataPlotBuffer}{#2}{\NumDataPlotxMin}
-% \FPmul{\NumDataPlotBuffer}{\NumDataPlotBuffer}{\NumDataPlotxDataCoordRatio}
-% \FPadd{\NDPputXcoordOne}{\NumDataPlotBuffer}{\NumDataPlotxCoordMin}
-%
-% \FPsub{\NumDataPlotBuffer}{#2}{\NumDataPlotxMin}
-% \FPmul{\NumDataPlotBuffer}{\NumDataPlotBuffer}{\NumDataPlotxDataCoordRatio}
-% \FPadd{\NDPputXcoordOne}{\NumDataPlotBuffer}{\NumDataPlotxCoordMin}
-%
-%
- \psframe[#1]
- (!#2 \NumDataPlotxMin\space sub \NumDataPlotxDataCoordRatio\space mul
- \NumDataPlotxCoordMin\space add
- #3 \NumDataPlotyMin\space sub \NumDataPlotyDataCoordRatio\space mul
- \NumDataPlotyCoordMin\space add)
- (!#4 \NumDataPlotxMin\space sub \NumDataPlotxDataCoordRatio\space mul
- \NumDataPlotxCoordMin\space add
- #5 \NumDataPlotyMin\space sub \NumDataPlotyDataCoordRatio\space mul
- \NumDataPlotyCoordMin\space add)
-}
% ==============================================================================
% ||
@@ -995,49 +787,52 @@
% ==============================================================================
-\newenvironment{NumericDataPlot}[3][]{
+\newenvironment{NumericDataPlot}[3][]{%
%
- \setlength{\OffsetWidth}{-\StdLLX +\StdURX}
+ \setlength{\OffsetWidth}{+\StdLLX +\StdURX}%
+ \setlength{\OffsetHeight}{+\StdLLY +\StdURY}%
% set standard values (they will be reset by setkeys if defined)
- \psset{llx=\StdLLX, lly=\StdLLY, ury=\StdURY, urx=\StdURX}
+ \psset{llx=-\StdLLX, lly=-\StdLLY, ury=\StdURY, urx=\StdURX}%
%
- \setkeys[NumericDataPlot]{General}{#1}
+ \setkeys[NumericDataPlot]{General}{#1}%
%
- \setlength{\CPicWidth}{#2 - \OffsetWidth}
+ \setlength{\CPicWidth}{#2 - \OffsetWidth}%
+ \setlength{\CPicHeight}{#3 - \OffsetHeight}%
+ %%\setlength{\CPicWidth}{#2}
% calculate length of the yTicks:
% PicCoordWidth (=GxPicMax-GxPicMin) -> PicWidth (=#2)
% Length -> 1mm * yTickLength
% yTickLength must be negative
- \setcounter{BufferCounter}{1*\ratio{#2}{1mm}}
- \FPsub{\NumDataPlotBuffer}{\NumDataPlotGxPicMax}{\NumDataPlotGxPicMin}
- \FPdiv{\NumDataPlotBufferI}{\NumDataPlotBuffer}{\theBufferCounter}
- \FPmul{\yTickLength}{\NumDataPlotBufferI}{\NumDataPlotGTickLength}
- \FPmul{\yTickLength}{\NumDataPlotBufferI}{-1}
+ \setcounter{BufferCounter}{1*\ratio{#2}{1mm}}%
+ \FPsub{\NumDataPlotBuffer}{\NumDataPlotGxPicMax}{\NumDataPlotGxPicMin}%
+ \FPdiv{\NumDataPlotBufferI}{\NumDataPlotBuffer}{\theBufferCounter}%
+ \FPmul{\yTickLength}{\NumDataPlotBufferI}{\NumDataPlotGTickLength}%
+ \FPmul{\yTickLength}{\NumDataPlotBufferI}{-1}%
% calculate length of the xTicks
- \setcounter{BufferCounter}{1*\ratio{#3}{1mm}}
- \FPsub{\NumDataPlotBuffer}{\NumDataPlotGyPicMax}{\NumDataPlotGyPicMin}
- \FPdiv{\NumDataPlotBufferI}{\NumDataPlotBuffer}{\theBufferCounter}
- \FPmul{\xTickLength}{\NumDataPlotBufferI}{\NumDataPlotGTickLength}
- \FPmul{\xTickLength}{\NumDataPlotBufferI}{-1}
-
- \FPdiv{\NumDataPlotxTickSep}{\NumDataPlotGxPicMax}{20}
- \FPround{\NumDataPlotxTickSep}{\NumDataPlotxTickSep}{0}
- \FPdiv{\NumDataPlotyTickSep}{\NumDataPlotGyPicMax}{20}
- \FPround{\NumDataPlotyTickSep}{\NumDataPlotyTickSep}{0}
-% \FPdiv{\xTickLength}{\NumDataPlotGxPicMax}{-75}
-% \FPround{\xTickLength}{\xTickLength}{0}
-% \FPdiv{\yTickLength}{\NumDataPlotGyPicMax}{-75}
-% \FPround{\yTickLength}{\yTickLength}{0}
- \begin{psgraph}[fillstyle=solid, fillcolor=gray,
- xAxis=false, yAxis=false] (\NumDataPlotGxPicMin, \NumDataPlotGyPicMin)(\NumDataPlotGxPicMin, \NumDataPlotGyPicMin)(\NumDataPlotGxPicMax, \NumDataPlotGyPicMax)
- {\CPicWidth}{#3}
-}{
- \pstScalePoints(1.0, 1.0){0 add}{0 add}
- \end{psgraph}
-}
+ \setcounter{BufferCounter}{1*\ratio{#3}{1mm}}%
+ \FPsub{\NumDataPlotBuffer}{\NumDataPlotGyPicMax}{\NumDataPlotGyPicMin}%
+ \FPdiv{\NumDataPlotBufferI}{\NumDataPlotBuffer}{\theBufferCounter}%
+ \FPmul{\xTickLength}{\NumDataPlotBufferI}{\NumDataPlotGTickLength}%
+ \FPmul{\xTickLength}{\NumDataPlotBufferI}{-1}%
+ %
+ \begin{psgraph}%
+ [fillstyle=solid, fillcolor=gray, xAxis=false, yAxis=false]%
+ (\NumDataPlotGxPicMin, \NumDataPlotGyPicMin)(\NumDataPlotGxPicMin, \NumDataPlotGyPicMin)(\NumDataPlotGxPicMax, \NumDataPlotGyPicMax)%
+ {\CPicWidth}{\CPicHeight}%
+}{%
+ \pstScalePoints(1.0, 1.0){0 add}{0 add}%
+ \end{psgraph}%
+}
+\psset{xunit=1mm, yunit=1mm, xAxisLabel={}, yAxisLabel={}}%
+%
+% ==============================================================================
+% ||
+% || legend
+% ||
+% ==============================================================================
-\psset{xunit=1mm, yunit=1mm, xAxisLabel={}, yAxisLabel={}}
+\input{NumericPlots_legend}
% ============================================================================
@@ -1046,124 +841,42 @@
% ||
% ============================================================================
-\newpsstyle{GridSt}{linecolor=gray, linestyle=dotted, linewidth=0.75pt}
-\newpsstyle{TickSt}{linecolor=black, linestyle=solid, linewidth=0.5pt}
-
+\input{NumericPlots_styles}
-\definecolor{LineColorA}{cmyk}{0.6 0.21 0.0 0.2} %blue
-\definecolor{LineColorB}{cmyk}{0.7 0.1 1 0.2} %green
-\definecolor{LineColorC}{cmyk}{0 1 1 0.2} %red
-\definecolor{LineColorD}{cmyk}{0 0.7 1 0.1} % orange
-\definecolor{LineColorE}{cmyk}{0.5 1 0 0.1} % purple
-\definecolor{LineColorF}{cmyk}{0 1 0 0.2} % magenta
-\definecolor{LineColorG}{cmyk}{0 0.25 1 0.1} % yellow
-\definecolor{LineColorX}{cmyk}{0.3 0.2 0.0 0.1} %blue
-\definecolor{LineColorY}{cmyk}{0 1 1 0.2} %red
-
-\newpsstyle{StdLineStyA}{linecolor=LineColorA}
-\newpsstyle{StdLineStyB}{linecolor=LineColorB}
-\newpsstyle{StdLineStyC}{linecolor=LineColorC}
-\newpsstyle{StdLineStyD}{linecolor=LineColorD}
-\newpsstyle{StdLineStyE}{linecolor=LineColorE}
-\newpsstyle{StdLineStyF}{linecolor=LineColorF}
-\newpsstyle{StdLineStyG}{linecolor=LineColorG}
-
-\newpsstyle{StdLineStyX}{linecolor=LineColorX,linestyle=solid,linewidth=2pt}
-\newpsstyle{StdLineStyY}{linecolor=LineColorY,linestyle=dashed, dash=4pt 3pt 1pt
-3pt}
-\newpsstyle{BWStdLineStyX}{linecolor=lightgray,linestyle=solid,linewidth=2pt}
-\newpsstyle{BWStdLineStyY}{linecolor=black,linestyle=dashed, dash=4pt 3pt 1pt
-3pt}
-
-\newpsstyle{BWStdLineStyA}
- {linecolor=lightgray,linestyle=solid,linewidth = 1.5pt}
-\newpsstyle{BWStdLineStyB}
- {linecolor=gray,linestyle=solid,linewidth = 1.0pt}
-\newpsstyle{BWStdLineStyC}
- {linecolor=black,linestyle=solid,linewidth = 0.75pt}
-\newpsstyle{BWStdLineStyD}
- {linecolor=black,linestyle=dashed, dash = 3pt 2pt,linewidth = 0.75pt}
-\newpsstyle{BWStdLineStyE}
- {linecolor=gray,linestyle=dashed,dash = 3pt 2pt,linewidth = 1.0pt}
-\newpsstyle{BWStdLineStyF}
- {linecolor=black,linestyle=dotted, dotsep =2pt,linewidth = 1.5pt}
-\newpsstyle{BWStdLineStyG}
- {linecolor=gray,linestyle=dotted, dotsep =2pt,linewidth = 1.5pt}
-
-\newpsstyle{LegendBoxStyle}
- {fillcolor=white, fillstyle=solid}
-
-% ===========================================================================
+
+
+% ==============================================================================
% ||
-% || commands to put something at a location of the plot
+% || commands...
% ||
-% ===========================================================================
+% ==============================================================================
-% put in the NorthWest corner of the plot
-\newcommand{\putNW}[1]{
-\rput[lt]{0}(\NumDataPlotxCoordMin, \NumDataPlotyCoordMax){#1}}
-% put in the SouthWest corner of the plot
-\newcommand{\putSW}[1]{
-\rput[lb]{0}(\NumDataPlotxCoordMin, \NumDataPlotyCoordMin){#1}}
-% put in the NorthEast corner of the plot
-\newcommand{\putNE}[1]{
-\rput[rt]{0}(\NumDataPlotxCoordMax, \NumDataPlotyCoordMax){#1}}
-% put in the SouthEast corner of the plot
-\newcommand{\putSE}[1]{
-\rput[rb]{0}(\NumDataPlotxCoordMax, \NumDataPlotyCoordMin){#1}}
-% put in the South of the plot
-\newcommand{\putS}[1]{
-\rput[b]{0}(!\NumDataPlotxCoordMax\space\NumDataPlotxMin\space sub 2 div
-\NumDataPlotxCoordMin\space add \NumDataPlotyCoordMin){#1}}
-% put in the North of the plot
-\newcommand{\putN}[1]{
-\rput[t]{0}(!\NumDataPlotxCoordMax\space\NumDataPlotxCoordMin\space sub 2 div
-\NumDataPlotxCoordMin\space add \NumDataPlotyCoordMax){#1}}
-% put in the West of the plot
-\newcommand{\putW}[1]{
-\rput[l]{0}(!\NumDataPlotxCoordMin\space
-\NumDataPlotyCoordMax\space\NumDataPlotyCoordMin\space sub 2 div \NumDataPlotyCoordMin\space add){#1}}
-% put in the East of the plot
-\newcommand{\putE}[1]{
-\rput[r]{0}(!\NumDataPlotxCoordMax\space
-\NumDataPlotyCoordMax\space\NumDataPlotyCoordMin\space sub 2 div \NumDataPlotyCoordMin\space add){#1}}
-% put exponent at y-axis
-\newcommand{\putExpY}[1]{
-\rput[lb]{0}(\NumDataPlotxCoordMin, \NumDataPlotyCoordMax){#1}
-}
-% put exponent at x-axis
-\newcommand{\putExpX}[1]{
-\rput[lb]{0}(\NumDataPlotxCoordMax, \NumDataPlotyCoordMin){#1}
-}
+\input{NumericPlots_macros}
-\DeclareOptionX{BW}{
- \addtopsstyle{StdLineStyA}{style=BWStdLineStyA}
- \addtopsstyle{StdLineStyB}{style=BWStdLineStyB}
- \addtopsstyle{StdLineStyC}{style=BWStdLineStyC}
- \addtopsstyle{StdLineStyD}{style=BWStdLineStyD}
- \addtopsstyle{StdLineStyE}{style=BWStdLineStyE}
- \addtopsstyle{StdLineStyF}{style=BWStdLineStyF}
- \addtopsstyle{StdLineStyG}{style=BWStdLineStyG}
-}
+% ==============================================================================
+% ||
+% || package options ...
+% ||
+% ==============================================================================
\DeclareOptionX{beamer}{
- \renewcommand{\StdLLY}{-1.0cm}
- \renewcommand{\StdTickLabelOption}{\footnotesize}
- \setlength{\origXLabelSep}{1pt}
+ \renewcommand{\StdLLY}{1.0cm}%
+ \renewcommand{\StdTickLabelOption}{\footnotesize}%
+ \setlength{\origXLabelSep}{1pt}%
}
-\DeclareOptionX{xAxisStyle}[Boxed]{
- \presetkeys[NumericDataPlot]{xAxis}{AxisStyle=#1}{}
+\DeclareOptionX{xAxisStyle}[Boxed]{%
+ \presetkeys[NumericDataPlot]{xAxis}{AxisStyle=#1}{}%
}
-\DeclareOptionX{yAxisStyle}[Boxed]{
- \presetkeys[NumericDataPlot]{yAxis}{AxisStyle=#1}{}
+\DeclareOptionX{yAxisStyle}[Boxed]{%
+ \presetkeys[NumericDataPlot]{yAxis}{AxisStyle=#1}{}%
}
-\DeclareOptionX{LabelOption}[{}]{
- \renewcommand{\StdLabelOption}{#1}
+\DeclareOptionX{LabelOption}[{}]{%
+ \renewcommand{\StdLabelOption}{#1}%
}
-\DeclareOptionX{TickLabelOption}[{}]{
- \renewcommand{\StdTickLabelOption}{#1}
+\DeclareOptionX{TickLabelOption}[{}]{%
+ \renewcommand{\StdTickLabelOption}{#1}%
}
\ProcessOptionsX
@@ -1184,23 +897,24 @@
yNearlyTight=false,
}{}
\presetkeys[NumericDataPlot]{xAxis}{
- NoGrid=false, NoTicks=false, NoLabel=false, NoTickLabel=false,
- LabelRotation=0, LabelPos=0.5, TickSep=20, LabelOption=\StdLabelOption{},
- TickLabelOption=\StdTickLabelOption{} }{}
+ NoGrid=false, NoTicks=false, NoLabel=false, NoTickLabel=false
+}{}
\presetkeys[NumericDataPlot]{yAxis}{
- NoGrid=false, NoTicks=false, NoLabel=false, NoTickLabel=false,
- LabelRotation=0, LabelPos=0.5, TickSep=20, LabelOption=\StdLabelOption{},
- TickLabelOption=\StdTickLabelOption{} }{}
-
+ NoGrid=false, NoTicks=false, NoLabel=false, NoTickLabel=false
+}{}
% if xO/yO are not set they'll be set to xMin/yMin
-\presetkeys[NumericDataPlot]{AxisWait}{
- xO=\NumDataPlotxMin, yO=\NumDataPlotyMin
+\presetkeys[NumericDataPlot]{AxisWait}{%
+ xO=\NumDataPlotxMin, yO=\NumDataPlotyMin,%
+ DDx=\NumDataPlotDx, DDy=\NumDataPlotDy%
}{}
-\presetkeys[NumericDataPlot]{General}{
- xPicMin=0, yPicMin=0, xPicMax=1000, yPicMax=1000, TickLength=2}{}
+\presetkeys[NumericDataPlot]{General}{%
+ xPicMin=0, yPicMin=0, xPicMax=1000, yPicMax=1000, TickLength=2}{}%
\presetkeys[NumericDataPlot]{Legend}{%
LabelOrientation=l%
}{}%
+
+
+
diff --git a/Master/texmf-dist/tex/latex/numericplots/NumericPlots_TickLabels.tex b/Master/texmf-dist/tex/latex/numericplots/NumericPlots_TickLabels.tex
new file mode 100644
index 00000000000..8a0d32ab0a8
--- /dev/null
+++ b/Master/texmf-dist/tex/latex/numericplots/NumericPlots_TickLabels.tex
@@ -0,0 +1,144 @@
+
+\newlength{\origXTickLabelSep}\setlength{\origXTickLabelSep}{1ex}
+\newlength{\origYTickLabelSep}\setlength{\origYTickLabelSep}{1ex}
+\newlength{\xTickLabelSep}\setlength{\xTickLabelSep}{\origXTickLabelSep}
+\newlength{\yTickLabelSep}\setlength{\yTickLabelSep}{\origYTickLabelSep}
+
+\newcommand{\xTickLabelRefPt}{t}
+\newcommand{\yTickLabelRefPt}{r}
+
+\newcommand{\NumDataPlotxTickBaseline}{0}
+\newcommand{\NumDataPlotxTickDistance}{0}
+\newcommand{\NumDataPlotyTickBaseline}{0}
+\newcommand{\NumDataPlotyTickDistance}{0}
+
+% ------------------------------------------------------------------------------
+% | keys for the put TickLabel commands
+% ------------------------------------------------------------------------------
+
+\define@key[NumericDataPlot]{putxTickLabel}{x}{
+ \FPsub{\NumDataPlotBuffer}{#1}{\NumDataPlotxMin}
+ \FPmul{\NumDataPlotBuffer}{\NumDataPlotBuffer}{\NumDataPlotxDataCoordRatio}
+ \FPadd{\NDPputXcoord}{\NumDataPlotBuffer}{\NumDataPlotxCoordMin}
+}
+
+
+\define@key[NumericDataPlot]{putyTickLabel}{y}{
+ \FPsub{\NumDataPlotBuffer}{#1}{\NumDataPlotyMin}
+ \FPmul{\NumDataPlotBuffer}{\NumDataPlotBuffer}{\NumDataPlotyDataCoordRatio}
+ \FPadd{\NDPputYcoord}{\NumDataPlotBuffer}{\NumDataPlotyCoordMin}
+}
+
+\define@key[NumericDataPlot]{putxTickLabel}{TickLabelRefPt}{
+ \renewcommand{\xTickLabelRefPt}{#1}
+}
+
+\define@key[NumericDataPlot]{putyTickLabel}{TickLabelRefPt}{
+ \renewcommand{\yTickLabelRefPt}{#1}
+}
+
+\define@cmdkeys[NumericDataPlot]{putxTickLabel}[NumDataPlotx]{
+ TickLabelOption, TickLabelRot
+}
+\define@cmdkeys[NumericDataPlot]{putyTickLabel}[NumDataPloty]{
+ TickLabelOption, TickLabelRot
+}
+\define@key[NumericDataPlot]{putxTickLabel}{TickLabelSep}[\origXTickLabelSep]{\setlength{\xTickLabelSep}{#1}}
+\define@key[NumericDataPlot]{putyTickLabel}{TickLabelSep}[\origYTickLabelSep]{\setlength{\yTickLabelSep}{#1}}
+
+\define@choicekey+[NumericDataPlot]{putxTickLabel}{ax}[\val\nrPutAxis]
+{lower,upper}{
+ \ifcase\nrPutAxis\relax
+ \renewcommand{\xTickLabelRefPt}{t}
+ \renewcommand{\NumDataPlotxTickBaseline}{\NumDataPlotyCoordMin}
+ \renewcommand{\NumDataPlotxTickDistance}{-1}
+ \or
+ \renewcommand{\xTickLabelRefPt}{b}
+ \renewcommand{\NumDataPlotxTickBaseline}{\NumDataPlotyCoordMax}
+ \renewcommand{\NumDataPlotxTickDistance}{1}
+ \fi
+}{
+ \PackageWarning{NumericPlots}
+ {Axis #1 not defined. Use lower or upper.}
+}
+
+\define@choicekey+[NumericDataPlot]{putyTickLabel}{ax}[\val\nrPutAxis]
+{left,right}{
+ \ifcase\nrPutAxis\relax
+ \renewcommand{\yTickLabelRefPt}{r}
+ \renewcommand{\NumDataPlotyTickBaseline}{\NumDataPlotxCoordMin}
+ \renewcommand{\NumDataPlotyTickDistance}{-1}
+ \or
+ \renewcommand{\yTickLabelRefPt}{l}
+ \renewcommand{\NumDataPlotyTickBaseline}{\NumDataPlotxCoordMax}
+ \renewcommand{\NumDataPlotyTickDistance}{1}
+ \fi
+}{
+ \PackageWarning{NumericPlots}
+ {Axis #1 not defined. Use left or right.}
+}
+
+
+% ------------------------------------------------------------------------------
+% | standard values for the keys for the put TickLabel commands
+% ------------------------------------------------------------------------------
+
+\newcommand{\StdTickLabelOption}{{}}
+
+\presetkeys[NumericDataPlot]{putxTickLabel}{
+ TickLabelOption=\StdTickLabelOption{}, TickLabelRot=0
+}{}
+\presetkeys[NumericDataPlot]{putyTickLabel}{
+ TickLabelOption=\StdTickLabelOption{}, TickLabelRot=0
+}{}
+
+
+
+% ==============================================================================
+% ||
+% || tick labels
+% ||
+% ==============================================================================
+
+
+\newcommand{\PutTickLabelXaxis}[2][]{%
+ \setkeys*[NumericDataPlot]{putxTickLabel}{#1}%
+ %
+ \setcounter{BufferCounter}{10000*\ratio{\xTickLabelSep}{\CPicHeight}}%
+ \FPsub{\NumDataPlotBuffer}{\NumDataPlotGyPicMax}{\NumDataPlotGyPicMin}%
+ \FPmul{\NumDataPlotBuffer}{\NumDataPlotBuffer}{\theBufferCounter}%
+ \FPdiv{\NumDataPlotBuffer}{\NumDataPlotBuffer}{10000}%
+ \FPmul{\NumDataPlotBuffer}{\NumDataPlotBuffer}{\NumDataPlotxTickDistance}%
+ \FPadd{\NumDataPlotBuffer}{\NumDataPlotBuffer}{\NumDataPlotxTickBaseline}%
+ %
+ \rput[\xTickLabelRefPt]{\NumDataPlotxTickLabelRot}%
+ (!\NDPputXcoord\space \NumDataPlotBuffer)%
+ {\makeXTickLabel{#2}}%
+}
+
+
+\newcommand{\makeXTickLabel}[1]{%
+ \testframe{\NumDataPlotxTickLabelOption{}#1}%
+}
+
+\newcommand{\PutTickLabelYaxis}[2][]{%
+ \setkeys*[NumericDataPlot]{putyTickLabel}{#1}%
+ %
+% \FPdiv{\NumDataPlotBufferI}{\getlengthwounit{\yTickLabelSep}}{\getlengthwounit{\CPicWidth}}
+ \setcounter{BufferCounter}{10000*\ratio{\yTickLabelSep}{\CPicWidth}}%
+ \FPsub{\NumDataPlotBuffer}{\NumDataPlotGxPicMax}{\NumDataPlotGxPicMin}%
+ \FPmul{\NumDataPlotBuffer}{\NumDataPlotBuffer}{\theBufferCounter}%
+ \FPdiv{\NumDataPlotBuffer}{\NumDataPlotBuffer}{10000}%
+ \FPmul{\NumDataPlotBuffer}{\NumDataPlotBuffer}{\NumDataPlotyTickDistance}%
+ \FPadd{\NumDataPlotBuffer}{\NumDataPlotBuffer}{\NumDataPlotyTickBaseline}%
+ %
+ \rput[\yTickLabelRefPt]{\NumDataPlotyTickLabelRot}%
+ (!\NumDataPlotBuffer\space \NDPputYcoord)%
+ {\makeYTickLabel{#2}}%
+}
+
+\newcommand{\makeYTickLabel}[1]{%
+ \testframe{\NumDataPlotyTickLabelOption{}#1}%
+}
+
+
diff --git a/Master/texmf-dist/tex/latex/numericplots/NumericPlots_labels.tex b/Master/texmf-dist/tex/latex/numericplots/NumericPlots_labels.tex
new file mode 100644
index 00000000000..e0d6e518485
--- /dev/null
+++ b/Master/texmf-dist/tex/latex/numericplots/NumericPlots_labels.tex
@@ -0,0 +1,167 @@
+
+\newlength{\origXLabelSep}\setlength{\origXLabelSep}{\baselineskip+1ex}
+\newlength{\origYLabelSep}\setlength{\origYLabelSep}{7ex}
+\newlength{\xLabelSep}\setlength{\xLabelSep}{\origXLabelSep}
+\newlength{\yLabelSep}\setlength{\yLabelSep}{\origYLabelSep}
+
+\newlength{\TempLengthA}
+\setlength{\TempLengthA}{0pt}
+\newlength{\TempLengthB}
+\setlength{\TempLengthB}{0pt}
+
+\newcommand{\NumDataPlotBaseline}{0}
+\newcommand{\NumDataPlotDistance}{1}
+\newcommand{\xLabelRefPt}{t}
+\newcommand{\yLabelRefPt}{r}
+\newcommand{\xLabelRot}{0}
+\newcommand{\yLabelRot}{90}
+
+
+
+% ------------------------------------------------------------------------------
+% | keys for the put label commands
+% ------------------------------------------------------------------------------
+
+\define@cmdkeys[NumericDataPlot]{putxLabel}[NumDataPlotx]{
+ LabelPos, LabelOption, LabelOrientation
+}
+\define@cmdkeys[NumericDataPlot]{putyLabel}[NumDataPloty]{
+ LabelPos, LabelOption, LabelOrientation
+}
+
+\define@key[NumericDataPlot]{putxLabel}{LabelSep}[\origXLabelSep]{\setlength{\xLabelSep}{#1}}
+\define@key[NumericDataPlot]{putyLabel}{LabelSep}[\origYLabelSep]{\setlength{\yLabelSep}{#1}}
+
+\define@choicekey+[NumericDataPlot]{putxLabel}{ax}[\val\nrPutAxis]
+{lower,upper}{
+ \ifcase\nrPutAxis\relax
+ \renewcommand{\xLabelRot}{0}
+ \renewcommand{\xLabelRefPt}{t}
+ \renewcommand{\NumDataPlotBaseline}{\NumDataPlotyCoordMin}
+ \renewcommand{\NumDataPlotDistance}{-1}
+ \or
+ \renewcommand{\xLabelRot}{0}
+ \renewcommand{\xLabelRefPt}{b}
+ \renewcommand{\NumDataPlotBaseline}{\NumDataPlotyCoordMax}
+ \renewcommand{\NumDataPlotDistance}{1}
+ \fi
+}{
+ \PackageWarning{NumericPlots}
+ {Axis #1 not defined. Use left or right.}
+}
+\define@choicekey+[NumericDataPlot]{putyLabel}{ax}[\val\nrPutAxis]
+{left,right}{
+ \ifcase\nrPutAxis\relax
+ \renewcommand{\yLabelRot}{90}
+ \renewcommand{\yLabelRefPt}{b}
+ \renewcommand{\NumDataPlotBaseline}{\NumDataPlotxCoordMin}
+ \renewcommand{\NumDataPlotDistance}{-1}
+ \or
+ \renewcommand{\yLabelRot}{270}
+ \renewcommand{\yLabelRefPt}{b}
+ \renewcommand{\NumDataPlotBaseline}{\NumDataPlotxCoordMax}
+ \renewcommand{\NumDataPlotDistance}{1}
+ \fi
+}{
+ \PackageWarning{NumericPlots}
+ {Axis #1 not defined. Use left or right.}
+}
+% the LabelRefPt keys
+\define@key[NumericDataPlot]{putxLabel}{LabelRefPt}{
+ \renewcommand{\xLabelRefPt}{#1}
+}
+\define@key[NumericDataPlot]{putyLabel}{LabelRefPt}{
+ \renewcommand{\yLabelRefPt}{#1}
+}
+
+\newcommand\CheckIfColumntypeDefined[1]{%
+ \providebool{tpl@coltype@#1}
+ \ifcsdef{NC@find@\string#1}%
+ {\setbool{tpl@coltype@#1}{true}}%
+ {\ifcsdef{columntype@\string#1}
+ {\setbool{tpl@coltype@#1}{true}}%
+ {\setbool{tpl@coltype@#1}{false}}%
+ }%
+}
+
+% ------------------------------------------------------------------------------
+% | standard values for the keys
+% ------------------------------------------------------------------------------
+
+
+\newcommand{\StdLabelOption}{{}}
+
+\presetkeys[NumericDataPlot]{putxLabel}{
+ LabelPos=0.5, LabelOption=\StdLabelOption{},LabelOrientation=c
+}{}
+\presetkeys[NumericDataPlot]{putyLabel}{
+ LabelPos=0.5, LabelOption=\StdLabelOption{},LabelOrientation=c
+}{}
+
+
+
+
+% ==============================================================================
+% ||
+% || axis labels
+% ||
+% ==============================================================================
+\newcommand{\PutLabelXaxis}[2][]{
+ \setkeys*[NumericDataPlot]{putxLabel}{#1}%
+ %
+ \setcounter{BufferCounter}{10000*\ratio{\xLabelSep}{\CPicHeight}}%
+ \FPsub{\NumDataPlotBuffer}{\NumDataPlotGyPicMax}{\NumDataPlotGyPicMin}%
+ \FPmul{\NumDataPlotBuffer}{\NumDataPlotBuffer}{\theBufferCounter}%
+ \FPdiv{\NumDataPlotBuffer}{\NumDataPlotBuffer}{10000}%
+ \FPmul{\NumDataPlotBuffer}{\NumDataPlotBuffer}{\NumDataPlotDistance}%
+ \FPadd{\NumDataPlotBuffer}{\NumDataPlotBuffer}{\NumDataPlotBaseline}%
+ %
+ \rput[\xLabelRefPt]%
+ {\xLabelRot}%
+ (!\NumDataPlotxCoordRange\space \NumDataPlotxLabelPos\space mul %
+ \NumDataPlotxCoordMin\space add \NumDataPlotBuffer\space){%
+ \makeXLabel{#2}%
+ }%
+}
+
+\newcommand{\makeXLabel}[1]{%
+ \NumDataPlotxLabelOption{}%
+ \testframe{%
+ \setlength{\tabcolsep}{0pt}%
+ \expandafter\tabular\NumDataPlotxLabelOrientation{}%
+ #1%
+ \endtabular%
+ }%
+}
+
+
+\newcommand{\PutLabelYaxis}[2][]{%
+ \setkeys*[NumericDataPlot]{putyLabel}{#1}%
+ %
+ \setcounter{BufferCounter}{10000*\ratio{\yLabelSep}{\CPicWidth}}%
+ \FPsub{\NumDataPlotBuffer}{\NumDataPlotGxPicMax}{\NumDataPlotGxPicMin}%
+ \FPmul{\NumDataPlotBuffer}{\NumDataPlotBuffer}{\theBufferCounter}%
+ \FPdiv{\NumDataPlotBuffer}{\NumDataPlotBuffer}{10000}%
+ \FPmul{\NumDataPlotBuffer}{\NumDataPlotBuffer}{\NumDataPlotDistance}%
+ \FPadd{\NumDataPlotBuffer}{\NumDataPlotBuffer}{\NumDataPlotBaseline}%
+ %
+ \rput[\yLabelRefPt]%
+ {\yLabelRot}%
+ (!\NumDataPlotBuffer\space %
+ \NumDataPlotyCoordRange\space \NumDataPlotyLabelPos\space mul %
+ \NumDataPlotyCoordMin\space add){%
+ \makeYLabel{#2}%
+ }%
+}
+
+\newcommand{\makeYLabel}[1]{%
+ \NumDataPlotyLabelOption{}%
+ \testframe{%
+ \setlength{\tabcolsep}{0pt}%
+ \expandafter\tabular\NumDataPlotyLabelOrientation{}%
+ #1%
+ \endtabular%
+ }%
+}
+
+
diff --git a/Master/texmf-dist/tex/latex/numericplots/NumericPlots_legend.tex b/Master/texmf-dist/tex/latex/numericplots/NumericPlots_legend.tex
new file mode 100644
index 00000000000..5e3aaeb393b
--- /dev/null
+++ b/Master/texmf-dist/tex/latex/numericplots/NumericPlots_legend.tex
@@ -0,0 +1,112 @@
+
+% ----------------------------------------------------------------------------
+% | keys for the legend
+% ----------------------------------------------------------------------------
+
+\define@key[NumericDataPlot]{Legend}{nrCols}[1]{\renewcommand{\nrLegendCols}{#1}}%
+\define@key[NumericDataPlot]{Legend}{LegLineWidth}[20pt]{\setlength{\LegLineWidth}{#1}}%
+
+\define@choicekey+[NumericDataPlot]{Legend}{LabelOrientation}[\val\nrLegOrient]
+{r,l,c}{%
+ \ifcase\nrLegOrient\relax%
+ \setboolean{LegendOrientationLeft}{false}%
+ \setboolean{LegendOrientationRight}{true}%
+ \setboolean{LegendOrientationCenter}{false}%
+ \or%
+ \setboolean{LegendOrientationLeft}{true}%
+ \setboolean{LegendOrientationRight}{false}%
+ \setboolean{LegendOrientationCenter}{false}%
+ \or%
+ \setboolean{LegendOrientationLeft}{false}%
+ \setboolean{LegendOrientationRight}{false}%
+ \setboolean{LegendOrientationCenter}{true}%
+ \fi%
+}{
+ \PackageWarning{NumericPlots}{LabelOrientation #1 not defined. Use r, l or c}%
+}
+
+
+% ==============================================================================
+% ||
+% || legend
+% ||
+% ==============================================================================
+
+
+\newcommand{\LegLineOld}[2][]{%
+ \setkeys[NumericDataPlot]{Legend}{#1}
+ %
+ \centering\Rnode{lab#2}{}%
+ \psline[style=#2,showpoints=false]([nodesep=0.5\LegLineWidth]lab#2)([nodesep=-0.5\LegLineWidth]lab#2)%
+ \psline[style=#2](lab#2)(lab#2)%
+}
+
+% \newcommand{\LegLine}[2][]{%
+% \setkeys[NumericDataPlot]{Legend}{#1}
+% %
+% \centering\Rnode{LegLineNode}{}%
+% \psline[#2,showpoints=false]([nodesep=0.5\LegLineWidth]LegLineNode)([nodesep=-0.5\LegLineWidth]LegLineNode)%
+% \psline[#2, linestyle=none](LegLineNode)(LegLineNode)
+% }
+%
+%
+% \newcommand{\LegendDefinition}[2][nrCols]{%
+% \setkeys[NumericDataPlot]{Legend}{#1}%
+% %
+% \psframebox[style=LegendBoxStyle]{%
+% \ifLegendOrientationLeft
+% \begin{tabular}{*{\nrLegendCols}{p{\LegLineWidth}l}}%
+% #2%
+% \end{tabular}%
+% \fi
+% \ifLegendOrientationCenter
+% \begin{tabular}{*{\nrLegendCols}{p{\LegLineWidth}c}}
+% #2
+% \end{tabular}
+% \fi
+% \ifLegendOrientationRight
+% \begin{tabular}{*{\nrLegendCols}{p{\LegLineWidth}r}}
+% #2
+% \end{tabular}
+% \fi
+% }%psframebox
+% }
+
+\newcommand{\LegLine}[2][]{%
+ \setkeys[NumericDataPlot]{Legend}{#1}%
+ \parbox[t]{\LegLineWidth}{%
+ \centering\Rnode{LegLineNode}{}%
+ \psline[#2,showpoints=false]([nodesep=0.5\LegLineWidth]LegLineNode)([nodesep=-0.5\LegLineWidth]LegLineNode)%
+ \psline[#2,linestyle=none](LegLineNode)(LegLineNode)%
+ }
+}
+
+\newcommand{\LegDot}[2][]{%
+ \setkeys[NumericDataPlot]{Legend}{#1}%
+ \parbox[t]{\LegLineWidth}{%
+ \centering\Rnode{LegLineNode}{}%
+ \psdots[#2](LegLineNode)%
+ }
+}
+
+\newcommand{\LegendDefinition}[2][nrCols]{%
+ \setkeys[NumericDataPlot]{Legend}{#1}%
+ %
+ \psframebox[style=LegendBoxStyle]{%
+ \ifLegendOrientationLeft%
+ \begin{tabular}{*{\nrLegendCols}{ll}}%
+ #2%
+ \end{tabular}%
+ \fi
+ \ifLegendOrientationCenter
+ \begin{tabular}{*{\nrLegendCols}{cc}}
+ #2
+ \end{tabular}
+ \fi
+ \ifLegendOrientationRight
+ \begin{tabular}{*{\nrLegendCols}{cr}}
+ #2
+ \end{tabular}
+ \fi
+ }%psframebox
+}
diff --git a/Master/texmf-dist/tex/latex/numericplots/NumericPlots_macros.tex b/Master/texmf-dist/tex/latex/numericplots/NumericPlots_macros.tex
new file mode 100644
index 00000000000..4bb33d1c93f
--- /dev/null
+++ b/Master/texmf-dist/tex/latex/numericplots/NumericPlots_macros.tex
@@ -0,0 +1,155 @@
+% ==============================================================================
+% ||
+% || commands...
+% ||
+% ==============================================================================
+
+\newcommand{\NDPput}[2][]{
+ \setkeys[NumericDataPlot]{put}{RefPoint=c}
+ \setkeys[NumericDataPlot]{put}{Rot=0}
+ \setkeys[NumericDataPlot]{put}{#1}
+ \rput[\NDPRefPoint]{\NDPputRotation}(\NDPputXcoord, \NDPputYcoord){#2}
+}
+
+
+\newcommand{\NDPhline}[2][]{
+%
+ \FPsub{\NumDataPlotBuffer}{#2}{\NumDataPlotyMin}
+ \FPmul{\NumDataPlotBuffer}{\NumDataPlotBuffer}{\NumDataPlotyDataCoordRatio}
+ \FPadd{\NDPputYcoord}{\NumDataPlotBuffer}{\NumDataPlotyCoordMin}
+
+ \psline[#1](\NumDataPlotxCoordMin, \NDPputYcoord)
+ (\NumDataPlotxCoordMax, \NDPputYcoord)
+}
+
+\newcommand{\NDPvline}[2][]{
+%
+ \FPsub{\NumDataPlotBuffer}{#2}{\NumDataPlotxMin}
+ \FPmul{\NumDataPlotBuffer}{\NumDataPlotBuffer}{\NumDataPlotxDataCoordRatio}
+ \FPadd{\NDPputXcoord}{\NumDataPlotBuffer}{\NumDataPlotxCoordMin}
+%
+ \psline[#1](\NDPputXcoord, \NumDataPlotyCoordMin)
+ (\NDPputXcoord, \NumDataPlotyCoordMax)
+}
+
+\newcommand{\NDPline}[5][]{
+%
+ \FPsub{\NumDataPlotBuffer}{#2}{\NumDataPlotxMin}
+ \FPmul{\NumDataPlotBuffer}{\NumDataPlotBuffer}{\NumDataPlotxDataCoordRatio}
+ \FPadd{\NDPputXcoordOne}{\NumDataPlotBuffer}{\NumDataPlotxCoordMin}
+
+ \FPsub{\NumDataPlotBuffer}{#2}{\NumDataPlotxMin}
+ \FPmul{\NumDataPlotBuffer}{\NumDataPlotBuffer}{\NumDataPlotxDataCoordRatio}
+ \FPadd{\NDPputXcoordOne}{\NumDataPlotBuffer}{\NumDataPlotxCoordMin}
+
+
+ \psline[#1]
+ (!#2 \NumDataPlotxMin\space sub \NumDataPlotxDataCoordRatio\space mul
+ \NumDataPlotxCoordMin\space add
+ #3 \NumDataPlotyMin\space sub \NumDataPlotyDataCoordRatio\space mul
+ \NumDataPlotyCoordMin\space add)
+ (!#4 \NumDataPlotxMin\space sub \NumDataPlotxDataCoordRatio\space mul
+ \NumDataPlotxCoordMin\space add
+ #5 \NumDataPlotyMin\space sub \NumDataPlotyDataCoordRatio\space mul
+ \NumDataPlotyCoordMin\space add)
+}
+
+\newcommand{\NDPvbox}[3][]{
+
+ \psframe[#1]
+ (!#2 \NumDataPlotxMin\space sub \NumDataPlotxDataCoordRatio\space mul \NumDataPlotxCoordMin\space add
+ \NumDataPlotyCoordMin)
+ (!#3 \NumDataPlotxMin\space sub \NumDataPlotxDataCoordRatio\space mul \NumDataPlotxCoordMin\space add
+ \NumDataPlotyCoordMax)
+}
+
+\newcommand{\NDPhbox}[3][]{
+
+ \psframe[#1]
+ (!\NumDataPlotxCoordMin \space
+ #2 \NumDataPlotyMin\space sub \NumDataPlotyDataCoordRatio\space mul \NumDataPlotyCoordMin\space add)
+ (!\NumDataPlotxCoordMax \space
+ #3 \NumDataPlotyMin\space sub \NumDataPlotyDataCoordRatio\space mul \NumDataPlotyCoordMin\space add)
+}
+
+\newcommand{\NDPbox}[5][]{
+% \FPsub{\NumDataPlotBuffer}{#2}{\NumDataPlotxMin}
+% \FPmul{\NumDataPlotBuffer}{\NumDataPlotBuffer}{\NumDataPlotxDataCoordRatio}
+% \FPadd{\NDPputXcoordOne}{\NumDataPlotBuffer}{\NumDataPlotxCoordMin}
+%
+% \FPsub{\NumDataPlotBuffer}{#2}{\NumDataPlotxMin}
+% \FPmul{\NumDataPlotBuffer}{\NumDataPlotBuffer}{\NumDataPlotxDataCoordRatio}
+% \FPadd{\NDPputXcoordOne}{\NumDataPlotBuffer}{\NumDataPlotxCoordMin}
+%
+%
+ \psframe[#1]
+ (!#2 \NumDataPlotxMin\space sub \NumDataPlotxDataCoordRatio\space mul
+ \NumDataPlotxCoordMin\space add
+ #3 \NumDataPlotyMin\space sub \NumDataPlotyDataCoordRatio\space mul
+ \NumDataPlotyCoordMin\space add)
+ (!#4 \NumDataPlotxMin\space sub \NumDataPlotxDataCoordRatio\space mul
+ \NumDataPlotxCoordMin\space add
+ #5 \NumDataPlotyMin\space sub \NumDataPlotyDataCoordRatio\space mul
+ \NumDataPlotyCoordMin\space add)
+}
+
+% ============================================================================
+% ||
+% || plotting commands
+% ||
+% ============================================================================
+
+% if data is exported with options.NaNsplit=true it may be plotted with
+% \multilistplot{style=xx}{DataIDENT}
+% First argument of the function is passed to listplot.
+% Second argument must be the Identifier of the Data that should be plotted.
+\newcommand{\multilistplot}[2]{
+ \multido{\iA=1+1}{\csname #2NrRanges\endcsname}{
+ \listplot[#1]{\csname #2\iA\endcsname}%
+ }
+}
+
+
+% ===========================================================================
+% ||
+% || commands to put something at a location of the plot
+% ||
+% ===========================================================================
+
+% put in the NorthWest corner of the plot
+\newcommand{\putNW}[1]{
+\rput[lt]{0}(\NumDataPlotxCoordMin, \NumDataPlotyCoordMax){#1}}
+% put in the SouthWest corner of the plot
+\newcommand{\putSW}[1]{
+\rput[lb]{0}(\NumDataPlotxCoordMin, \NumDataPlotyCoordMin){#1}}
+% put in the NorthEast corner of the plot
+\newcommand{\putNE}[1]{
+\rput[rt]{0}(\NumDataPlotxCoordMax, \NumDataPlotyCoordMax){#1}}
+% put in the SouthEast corner of the plot
+\newcommand{\putSE}[1]{
+\rput[rb]{0}(\NumDataPlotxCoordMax, \NumDataPlotyCoordMin){#1}}
+% put in the South of the plot
+\newcommand{\putS}[1]{
+\rput[b]{0}(!\NumDataPlotxCoordMax\space\NumDataPlotxCoordMin\space sub 2 div
+\NumDataPlotxCoordMin\space add \NumDataPlotyCoordMin){#1}}
+% put in the North of the plot
+\newcommand{\putN}[1]{
+\rput[t]{0}(!\NumDataPlotxCoordMax\space\NumDataPlotxCoordMin\space sub 2 div
+\NumDataPlotxCoordMin\space add \NumDataPlotyCoordMax){#1}}
+% put in the West of the plot
+\newcommand{\putW}[1]{
+\rput[l]{0}(!\NumDataPlotxCoordMin\space
+\NumDataPlotyCoordMax\space\NumDataPlotyCoordMin\space sub 2 div \NumDataPlotyCoordMin\space add){#1}}
+% put in the East of the plot
+\newcommand{\putE}[1]{
+\rput[r]{0}(!\NumDataPlotxCoordMax\space
+\NumDataPlotyCoordMax\space\NumDataPlotyCoordMin\space sub 2 div \NumDataPlotyCoordMin\space add){#1}}
+% put exponent at y-axis
+\newcommand{\putExpY}[1]{
+\rput[lb]{0}(\NumDataPlotxCoordMin, \NumDataPlotyCoordMax){#1}
+}
+% put exponent at x-axis
+\newcommand{\putExpX}[1]{
+\rput[lb]{0}(\NumDataPlotxCoordMax, \NumDataPlotyCoordMin){#1}
+}
+
diff --git a/Master/texmf-dist/tex/latex/numericplots/NumericPlots_styles.tex b/Master/texmf-dist/tex/latex/numericplots/NumericPlots_styles.tex
new file mode 100644
index 00000000000..79b322cde43
--- /dev/null
+++ b/Master/texmf-dist/tex/latex/numericplots/NumericPlots_styles.tex
@@ -0,0 +1,70 @@
+
+% ============================================================================
+% ||
+% || Definition of styles
+% ||
+% ============================================================================
+
+\newpsstyle{GridSt}{linecolor=gray, linestyle=dotted, linewidth=0.75pt}
+\newpsstyle{TickSt}{linecolor=black, linestyle=solid, linewidth=0.5pt}
+
+
+\definecolor{LineColorA}{cmyk}{0.6 0.21 0.0 0.2} %blue
+\definecolor{LineColorB}{cmyk}{0.7 0.1 1 0.2} %green
+\definecolor{LineColorC}{cmyk}{0 1 1 0.2} %red
+\definecolor{LineColorD}{cmyk}{0 0.7 1 0.1} % orange
+\definecolor{LineColorE}{cmyk}{0.5 1 0 0.1} % purple
+\definecolor{LineColorF}{cmyk}{0 1 0 0.2} % magenta
+\definecolor{LineColorG}{cmyk}{0 0.25 1 0.1} % yellow
+\definecolor{LineColorH}{cmyk}{0.81 0.1 1 0.7} % grass green
+
+\definecolor{LineColorX}{cmyk}{0.3 0.2 0.0 0.1} %blue
+\definecolor{LineColorY}{cmyk}{0 1 1 0.2} %red
+
+\newpsstyle{StdLineStyA}{linecolor=LineColorA, fillcolor=LineColorA, linejoin=1}
+\newpsstyle{StdLineStyB}{linecolor=LineColorB, fillcolor=LineColorB, linejoin=1}
+\newpsstyle{StdLineStyC}{linecolor=LineColorC, fillcolor=LineColorC, linejoin=1}
+\newpsstyle{StdLineStyD}{linecolor=LineColorD, fillcolor=LineColorD, linejoin=1}
+\newpsstyle{StdLineStyE}{linecolor=LineColorE, fillcolor=LineColorE, linejoin=1}
+\newpsstyle{StdLineStyF}{linecolor=LineColorF, fillcolor=LineColorF, linejoin=1}
+\newpsstyle{StdLineStyG}{linecolor=LineColorG, fillcolor=LineColorG, linejoin=1}
+\newpsstyle{StdLineStyH}{linecolor=LineColorH, fillcolor=LineColorH, linejoin=1}
+
+\newpsstyle{StdLineStyX}{linecolor=LineColorX, linestyle=solid,
+ linewidth=2pt, linejoin=1}
+\newpsstyle{StdLineStyY}{linecolor=LineColorY, linestyle=dashed,
+ dash=4pt 3pt 1pt 3pt, linejoin=1}
+\newpsstyle{BWStdLineStyX}{linecolor=lightgray, linestyle=solid,
+ linewidth=2pt, linejoin=1}
+\newpsstyle{BWStdLineStyY}{linecolor=black, linestyle=dashed,
+ dash=4pt 3pt 1pt 3pt, linejoin=1}
+
+\newpsstyle{BWStdLineStyA}
+ {linecolor=lightgray,linestyle=solid,linewidth = 1.5pt, linejoin=1}
+\newpsstyle{BWStdLineStyB}
+ {linecolor=gray,linestyle=solid,linewidth = 1.0pt, linejoin=1}
+\newpsstyle{BWStdLineStyC}
+ {linecolor=black,linestyle=solid,linewidth = 0.75pt, linejoin=1}
+\newpsstyle{BWStdLineStyD}
+ {linecolor=black,linestyle=dashed, dash = 3pt 2pt,linewidth = 0.75pt,
+ linejoin=1}
+\newpsstyle{BWStdLineStyE}
+ {linecolor=gray,linestyle=dashed,dash = 3pt 2pt,linewidth = 1.0pt, linejoin=1}
+\newpsstyle{BWStdLineStyF}
+ {linecolor=black,linestyle=dotted, dotsep =2pt,linewidth = 1.5pt, linejoin=1}
+\newpsstyle{BWStdLineStyG}
+ {linecolor=gray,linestyle=dotted, dotsep =2pt,linewidth = 1.5pt, linejoin=1}
+
+\newpsstyle{LegendBoxStyle}
+ {fillcolor=white, fillstyle=solid}
+
+\DeclareOptionX{BW}{
+ \addtopsstyle{StdLineStyA}{style=BWStdLineStyA}
+ \addtopsstyle{StdLineStyB}{style=BWStdLineStyB}
+ \addtopsstyle{StdLineStyC}{style=BWStdLineStyC}
+ \addtopsstyle{StdLineStyD}{style=BWStdLineStyD}
+ \addtopsstyle{StdLineStyE}{style=BWStdLineStyE}
+ \addtopsstyle{StdLineStyF}{style=BWStdLineStyF}
+ \addtopsstyle{StdLineStyG}{style=BWStdLineStyG}
+}
+