summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2012-06-01 22:12:53 +0000
committerKarl Berry <karl@freefriends.org>2012-06-01 22:12:53 +0000
commit5cc69ea6e2773435574a4d4f3cc67ef8833fd62b (patch)
tree02e7965a04adbe0c56eca9d05e45ad8be9d9d1cb /Master/texmf-dist/tex
parent0cdd25363b3389884e080e1a50d2c2abede4c05b (diff)
numericplots (1jun12)
git-svn-id: svn://tug.org/texlive/trunk@26791 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex')
-rw-r--r--Master/texmf-dist/tex/latex/numericplots/NumericPlots.sty107
1 files changed, 71 insertions, 36 deletions
diff --git a/Master/texmf-dist/tex/latex/numericplots/NumericPlots.sty b/Master/texmf-dist/tex/latex/numericplots/NumericPlots.sty
index 7eb6722b7df..8c50ac87cf9 100644
--- a/Master/texmf-dist/tex/latex/numericplots/NumericPlots.sty
+++ b/Master/texmf-dist/tex/latex/numericplots/NumericPlots.sty
@@ -30,7 +30,7 @@
\RequirePackage{calc}
-\RequirePackage{fp}
+\RequirePackage[nomessages]{fp}
\RequirePackage{ifthen}
\RequirePackage{pstricks}
@@ -248,26 +248,26 @@
% | keys for the legend
% ----------------------------------------------------------------------------
-\define@key[NumericDataPlot]{Legend}{nrCols}[1]{\renewcommand{\nrLegendCols}{#1}}
-\define@key[NumericDataPlot]{Legend}{LegLineWidth}[20pt]{\setlength{\LegLineWidth}{#1}}
+\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
+{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}
+ \PackageWarning{NumericPlots}{LabelOrientation #1 not defined. Use r, l or c}%
}
@@ -321,12 +321,44 @@
\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}
- %
+ \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](LegLineNode)(LegLineNode)%
+ \psline[#2,showpoints=false]([nodesep=0.5\LegLineWidth]LegLineNode)([nodesep=-0.5\LegLineWidth]LegLineNode)%
+ \psline[#2, linestyle=none](LegLineNode)(LegLineNode)%
+ }
}
@@ -334,18 +366,18 @@
\setkeys[NumericDataPlot]{Legend}{#1}%
%
\psframebox[style=LegendBoxStyle]{%
- \ifLegendOrientationLeft
- \begin{tabular}{*{\nrLegendCols}{p{\LegLineWidth}l}}%
+ \ifLegendOrientationLeft%
+ \begin{tabular}{*{\nrLegendCols}{ll}}%
#2%
\end{tabular}%
\fi
\ifLegendOrientationCenter
- \begin{tabular}{*{\nrLegendCols}{p{\LegLineWidth}c}}
+ \begin{tabular}{*{\nrLegendCols}{cc}}
#2
\end{tabular}
\fi
\ifLegendOrientationRight
- \begin{tabular}{*{\nrLegendCols}{p{\LegLineWidth}r}}
+ \begin{tabular}{*{\nrLegendCols}{cr}}
#2
\end{tabular}
\fi
@@ -528,6 +560,8 @@
\fi
}
+% for logarithmic axes, LogxAxisLabel returns 10^#1. Normally it just returns
+% #1.
\newcommand{\plotxTickLabels}[3]{
\FPadd{\NumDataPlotBuffer}{\TicksXLeft}{1}
\FPround{\NumDataPlotBuffer}{\NumDataPlotBuffer}{0}
@@ -1104,15 +1138,16 @@
\DeclareOptionX{BW}{
- \newpsstyle{StdLineStyA}{BWStdLineStyA}
- \newpsstyle{StdLineStyB}{BWStdLineStyb}
- \newpsstyle{StdLineStyC}{BWStdLineStyC}
- \newpsstyle{StdLineStyD}{BWStdLineStyD}
- \newpsstyle{StdLineStyE}{BWStdLineStyE}
- \newpsstyle{StdLineStyF}{BWStdLineStyF}
- \newpsstyle{StdLineStyG}{BWStdLineStyG}
+ \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}
}
+
\DeclareOptionX{beamer}{
\renewcommand{\StdLLY}{-1.0cm}
\renewcommand{\StdTickLabelOption}{\footnotesize}
@@ -1165,7 +1200,7 @@
\presetkeys[NumericDataPlot]{General}{
xPicMin=0, yPicMin=0, xPicMax=1000, yPicMax=1000, TickLength=2}{}
-\presetkeys[NumericDataPlot]{Legend}{
- LabelOrientation=l
-}{}
+\presetkeys[NumericDataPlot]{Legend}{%
+ LabelOrientation=l%
+}{}%