summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/latex/numericplots/NumericPlots_macros.tex
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/NumericPlots_macros.tex
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/NumericPlots_macros.tex')
-rw-r--r--Master/texmf-dist/tex/latex/numericplots/NumericPlots_macros.tex155
1 files changed, 155 insertions, 0 deletions
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}
+}
+