\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% }% }