From 5cc69ea6e2773435574a4d4f3cc67ef8833fd62b Mon Sep 17 00:00:00 2001 From: Karl Berry Date: Fri, 1 Jun 2012 22:12:53 +0000 Subject: numericplots (1jun12) git-svn-id: svn://tug.org/texlive/trunk@26791 c570f23f-e606-0410-a88d-b1316a301751 --- .../tex/latex/numericplots/NumericPlots.sty | 107 ++++++++++++++------- 1 file changed, 71 insertions(+), 36 deletions(-) (limited to 'Master/texmf-dist/tex/latex/numericplots') 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% +}{}% -- cgit v1.2.3