diff options
author | Karl Berry <karl@freefriends.org> | 2013-04-25 22:32:22 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2013-04-25 22:32:22 +0000 |
commit | 7961bdb11ded0df109c55b8dcf8418ee3c5b1239 (patch) | |
tree | 64cce4513a2e890039c5c8398fcd1223e542a5aa /Master/texmf-dist | |
parent | d5e3c90d94a967b4c6fd0a3867d9ffdf47925a06 (diff) |
numericplots (25apr13)
git-svn-id: svn://tug.org/texlive/trunk@30103 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist')
11 files changed, 80 insertions, 37 deletions
diff --git a/Master/texmf-dist/doc/latex/numericplots/NumericPlots.pdf b/Master/texmf-dist/doc/latex/numericplots/NumericPlots.pdf Binary files differindex 9bbaa14d848..2262e0fe0ff 100644 --- a/Master/texmf-dist/doc/latex/numericplots/NumericPlots.pdf +++ b/Master/texmf-dist/doc/latex/numericplots/NumericPlots.pdf diff --git a/Master/texmf-dist/doc/latex/numericplots/src/BasicFunctionality.tex b/Master/texmf-dist/doc/latex/numericplots/src/BasicFunctionality.tex index 7d7d9ef362e..b1550768f4e 100644 --- a/Master/texmf-dist/doc/latex/numericplots/src/BasicFunctionality.tex +++ b/Master/texmf-dist/doc/latex/numericplots/src/BasicFunctionality.tex @@ -153,7 +153,7 @@ within the plot with \verb|\rput|. While using the package, there are predefined linestyles which may be used: -\begin{minipage}{0.6\linewidth} +\begin{minipage}{0.55\linewidth} \centering \small @@ -225,7 +225,7 @@ replaced by their black and white counterparts: For values which are nearly the same (reference and measurement, e.g.) the following line styles may be used: -\begin{minipage}{0.59\linewidth} +\begin{minipage}{0.58\linewidth} \centering \small @@ -378,6 +378,15 @@ the axis. To avoid this, plot the grid first and then plot the axis as shown. \end{minipage} +\begin{minipage}[T]{0.5\linewidth} + \lstinputlisting{examples/basic_LogarithmicIII} +\end{minipage} +\hspace{1ex} +\begin{minipage}[T]{0.4\linewidth} + \input{examples/basic_LogarithmicIII} +\end{minipage} + + \subsection{plots with holes} If plotting data, one might not want to plot some part of this data, e.g. if diff --git a/Master/texmf-dist/doc/latex/numericplots/src/FurtherExamples.tex b/Master/texmf-dist/doc/latex/numericplots/src/FurtherExamples.tex index b7ced008ace..1ef2e94ab2c 100644 --- a/Master/texmf-dist/doc/latex/numericplots/src/FurtherExamples.tex +++ b/Master/texmf-dist/doc/latex/numericplots/src/FurtherExamples.tex @@ -55,7 +55,8 @@ Here, some features of the pst-plot command \verb|listplot| are illustrated. Wit [style=StdLineStyD, showpoints=true, nStep=2] {\MoreData} \end{verbatim} -\end{minipage}\begin{minipage}{0.5\linewidth} +\end{minipage} +\begin{minipage}{0.45\linewidth} \centering \begin{NumericDataPlot}{\textwidth}{5cm} \setxAxis{xMin=0, xMax=15, Dx=5, xO=0} @@ -96,7 +97,8 @@ Here, some features of the pst-plot command \verb|listplot| are illustrated. Wit } \end{NumericDataPlot} \end{verbatim} -\end{minipage}\begin{minipage}{0.5\linewidth} +\end{minipage} +\begin{minipage}{0.45\linewidth} \centering \begin{NumericDataPlot}{\textwidth}{5cm} \setxAxis{xMin=0, xMax=15, Dx=5, xO=0} @@ -128,7 +130,7 @@ Here, some features of the pst-plot command \verb|listplot| are illustrated. Wit } ... \end{verbatim} -\end{minipage}\begin{minipage}{0.5\linewidth} +\end{minipage}\begin{minipage}{0.45\linewidth} \centering \begin{NumericDataPlot}{\textwidth}{5cm} \setxAxis{xMin=0, xMax=15, Dx=5, xO=0} @@ -158,7 +160,8 @@ Here, some features of the pst-plot command \verb|listplot| are illustrated. Wit } ... \end{verbatim} -\end{minipage}\begin{minipage}{0.5\linewidth} +\end{minipage} +\begin{minipage}{0.45\linewidth} \centering \begin{NumericDataPlot}{\textwidth}{5cm} \setxAxis{xMin=0, xMax=15, Dx=5, xO=0} @@ -190,7 +193,8 @@ positions of the desired x-gridlines): fid = fopen(TargetTexFile, 'at'); fprintf(fid, '\n\\def\\CustomXGrid{\n'); for i=1:length(XTick) - fprintf(fid, '\\NDPvline[style=CustomXGridStyle]{%f}\n', adj.XTick(i)); + fprintf(fid, ... + '\\NDPvline[style=CustomXGridStyle]{%f}\n', adj.XTick(i)); end fprintf(fid, '}\n'); fclose(fid); @@ -225,7 +229,7 @@ linejoin=0. Plotting with linejoin=2 represents the data much better. The standard for linejoin is 0. The StdLineStyXX defined in this package are defined with linejoin=1. -\begin{minipage}{0.35\linewidth} +\begin{minipage}{0.4\linewidth} \begin{verbatim} ... % linejoin=0: @@ -242,7 +246,7 @@ with linejoin=1. ... \end{verbatim} \end{minipage} -\begin{minipage}{0.65\linewidth} +\begin{minipage}{0.55\linewidth} \centering \begin{NumericDataPlot}{\textwidth}{5cm} \setxAxis{xMin=0.00, xMax=0.5, Dx=0.25, xO=0.00, @@ -278,11 +282,11 @@ with linejoin=1. \end{NumericDataPlot} \end{minipage} -\begin{minipage}{0.5\linewidth} +\begin{minipage}{0.48\linewidth} \centering \includegraphics{fig_NoiseData_ClosedLine} \end{minipage} -\begin{minipage}{0.5\linewidth} +\begin{minipage}{0.48\linewidth} \centering \includegraphics{fig_NoiseData_OpenLine} \end{minipage} diff --git a/Master/texmf-dist/doc/latex/numericplots/src/MatlabSupport.tex b/Master/texmf-dist/doc/latex/numericplots/src/MatlabSupport.tex index a506af95c5f..6d6a5fe80db 100644 --- a/Master/texmf-dist/doc/latex/numericplots/src/MatlabSupport.tex +++ b/Master/texmf-dist/doc/latex/numericplots/src/MatlabSupport.tex @@ -1,3 +1,7 @@ + +\section{Matlab Support} + + \subsection{export2latex.m} The function \texttt{export2latex(data, filename, [options])} may be used to export data from Matlab to be used with NumericPlots.sty. The function takes the @@ -106,8 +110,10 @@ called \verb+.time+. Matlab example: \begin{verbatim} - dataOG = dspace2struct(measurements) %Old Control Desk - dataNG = dspace2struct(measurements,'NG') %Control Desk Next Generation + % Old Control Desk: + dataOG = dspace2struct(measurements) + % Control Desk Next Generation: + dataNG = dspace2struct(measurements,'NG') \end{verbatim} The resulting structs \verb+dataOG+ and \verb+dataNG+ differ in way of diff --git a/Master/texmf-dist/doc/latex/numericplots/src/NumericPlotsDoc.tex b/Master/texmf-dist/doc/latex/numericplots/src/NumericPlotsDoc.tex index ceaa7fe7373..16d0e53afec 100644 --- a/Master/texmf-dist/doc/latex/numericplots/src/NumericPlotsDoc.tex +++ b/Master/texmf-dist/doc/latex/numericplots/src/NumericPlotsDoc.tex @@ -141,8 +141,6 @@ Copyright 2013 Thomas K\"{o}nig, Alexander Michel, Michael Baumgart \include{MultiplePlots} -\section{Matlab Support} - \input{MatlabSupport} %\section{package options} diff --git a/Master/texmf-dist/doc/latex/numericplots/src/examples/basic_LogarithmicI.tex b/Master/texmf-dist/doc/latex/numericplots/src/examples/basic_LogarithmicI.tex index 22e88aa6118..7ab769f477b 100644 --- a/Master/texmf-dist/doc/latex/numericplots/src/examples/basic_LogarithmicI.tex +++ b/Master/texmf-dist/doc/latex/numericplots/src/examples/basic_LogarithmicI.tex @@ -1,5 +1,5 @@ \begin{NumericDataPlot}{\textwidth}{6.5cm} - \setxAxis{xMin=6, xMax=2500, Dx=10, xLog} + \setxAxis{xMin=6, xMax=2500, xLog} \setyAxis{yMin=0, yMax=2500, Dy=500} \plotxAxis{} \plotyAxis{} diff --git a/Master/texmf-dist/doc/latex/numericplots/src/examples/basic_LogarithmicII.tex b/Master/texmf-dist/doc/latex/numericplots/src/examples/basic_LogarithmicII.tex index fbbd17e5044..01227ed9037 100644 --- a/Master/texmf-dist/doc/latex/numericplots/src/examples/basic_LogarithmicII.tex +++ b/Master/texmf-dist/doc/latex/numericplots/src/examples/basic_LogarithmicII.tex @@ -1,6 +1,6 @@ \begin{NumericDataPlot}{\textwidth}{6.5cm} - \setxAxis{xMin=1, xMax=1500, Dx=10, xLog} - \setyAxis{yMin=1, yMax=1500, Dy=10, yLog} + \setxAxis{xMin=1, xMax=1500, xLog} + \setyAxis{yMin=1, yMax=1500, yLog} \plotxAxis{} \plotyAxis{} diff --git a/Master/texmf-dist/doc/latex/numericplots/src/examples/basic_LogarithmicIII.tex b/Master/texmf-dist/doc/latex/numericplots/src/examples/basic_LogarithmicIII.tex new file mode 100644 index 00000000000..c5e1388aae0 --- /dev/null +++ b/Master/texmf-dist/doc/latex/numericplots/src/examples/basic_LogarithmicIII.tex @@ -0,0 +1,8 @@ +\begin{NumericDataPlot}{\textwidth}{6.5cm} + \setxAxis{xMin=1, xMax=1500, xLog, xLogNoSubGrid} + \setyAxis{yMin=1, yMax=1500, yLog, yLogNoSubGrid} + \plotxAxis{} + \plotyAxis{} + + \listplot{\LogData} +\end{NumericDataPlot}
\ No newline at end of file diff --git a/Master/texmf-dist/doc/latex/numericplots/src/history.tex b/Master/texmf-dist/doc/latex/numericplots/src/history.tex index c5edb788424..888f2840a10 100644 --- a/Master/texmf-dist/doc/latex/numericplots/src/history.tex +++ b/Master/texmf-dist/doc/latex/numericplots/src/history.tex @@ -154,4 +154,9 @@ height parameter to set the object height. Now, the given height parameter is co \item 19.04.2013 \begin{itemize} \item added and improved documentation + \end{itemize} + \item 25.04.2013 + \begin{itemize} + \item changed implementation of subgrids for logarithmic axes + \end{itemize} \end{itemize} diff --git a/Master/texmf-dist/doc/latex/numericplots/src/keys_NumericDataPlot.tex b/Master/texmf-dist/doc/latex/numericplots/src/keys_NumericDataPlot.tex index dd892585157..c7abbaee6b5 100644 --- a/Master/texmf-dist/doc/latex/numericplots/src/keys_NumericDataPlot.tex +++ b/Master/texmf-dist/doc/latex/numericplots/src/keys_NumericDataPlot.tex @@ -12,6 +12,8 @@ yCoordMax&NumericDataPlot&Axis&command&[none]\\ yCoordMin&NumericDataPlot&Axis&command&[none]\\ xLog&NumericDataPlot&Axis&boolean&true\\ yLog&NumericDataPlot&Axis&boolean&true\\ +xLogNoSubGrid&NumericDataPlot&Axis&boolean&true\\ +yLogNoSubGrid&NumericDataPlot&Axis&boolean&true\\ yNearlyTight&NumericDataPlot&Axis&boolean&false\\ xO&NumericDataPlot&AxisWait&command&[none]\\ yO&NumericDataPlot&AxisWait&command&[none]\\ diff --git a/Master/texmf-dist/tex/latex/numericplots/NumericPlots.sty b/Master/texmf-dist/tex/latex/numericplots/NumericPlots.sty index c6bc42e9c4b..babea7d8338 100644 --- a/Master/texmf-dist/tex/latex/numericplots/NumericPlots.sty +++ b/Master/texmf-dist/tex/latex/numericplots/NumericPlots.sty @@ -18,7 +18,7 @@ \NeedsTeXFormat{LaTeX2e} \ProvidesPackage{NumericPlots}% - [2013/04/19 v. 2.0 LaTeX package to plot numeric data] + [2013/04/25 v. 2.0.1 LaTeX package to plot numeric data] \RequirePackage{calc} @@ -158,6 +158,11 @@ \fi } +\define@boolkey[NumericDataPlot]{Axis}{xLogNoSubGrid}[true]{ +} +\define@boolkey[NumericDataPlot]{Axis}{yLogNoSubGrid}[true]{ +} + \define@boolkey[NumericDataPlot]{Axis}{yNearlyTight}[false]{} % xMin and yMin also set xO/yO. It will later be ensured that if the user @@ -455,14 +460,17 @@ } \newcommand{\xLogSubGrid}[1]{ - \ifNumericDataPlot@Axis@xLog - \multido{\iSubb=2+2}{4}{ - \FPln{\NumDataPlotBuffer}{\iSubb} - \FPdiv{\NumDataPlotBuffer}{\NumDataPlotBuffer}{\NumDataPlotLnTen} - \FPmul{\NumDataPlotBuffer}{\NumDataPlotBuffer}{\NumDataPlotxDataCoordRatio} - \FPadd{\NumDataPlotTickPos}{#1}{\NumDataPlotBuffer} - \plotxSubGridLine{\NumDataPlotTickPos} - } + \ifNumericDataPlot@Axis@xLogNoSubGrid + \else + \ifNumericDataPlot@Axis@xLog + \multido{\iSubb=2+1}{8}{ + \FPln{\NumDataPlotBuffer}{\iSubb} + \FPdiv{\NumDataPlotBuffer}{\NumDataPlotBuffer}{\NumDataPlotLnTen} + \FPmul{\NumDataPlotBuffer}{\NumDataPlotBuffer}{\NumDataPlotxDataCoordRatio} + \FPadd{\NumDataPlotTickPos}{#1}{\NumDataPlotBuffer} + \plotxSubGridLine{\NumDataPlotTickPos} + } + \fi \fi } @@ -575,7 +583,7 @@ % \FPifpos{\NumDataPlotyMin} \FPmul{\NumDataPlotyMin}{\NumDataPlotyMin}{0.9} \else \FPmul{\NumDataPlotyMin}{\NumDataPlotyMin}{1.1}\fi % \fi - % for logarithmic axes: calculate log(xMax), log(xMin), Dx=1, xO=ceil(xMin) + % for logarithmic axes: calculate log(xMax), log(xMin), Dy=1, xO=ceil(xMin) \ifNumericDataPlot@Axis@yLog \FPln{\NumDataPlotBuffer}{\NumDataPlotyMax} \FPdiv{\NumDataPlotyMax}{\NumDataPlotBuffer}{\NumDataPlotLnTen} @@ -682,14 +690,17 @@ \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} - \FPdiv{\NumDataPlotBuffer}{\NumDataPlotBuffer}{\NumDataPlotLnTen} - \FPmul{\NumDataPlotBuffer}{\NumDataPlotBuffer}{\NumDataPlotyDataCoordRatio} - \FPadd{\NumDataPlotTickPos}{#1}{\NumDataPlotBuffer} - \plotySubGridLine{\NumDataPlotTickPos} - } + \ifNumericDataPlot@Axis@yLogNoSubGrid + \else + \ifNumericDataPlot@Axis@yLog + \multido{\iSubb=2+1}{8}{ + \FPln{\NumDataPlotBuffer}{\iSubb} + \FPdiv{\NumDataPlotBuffer}{\NumDataPlotBuffer}{\NumDataPlotLnTen} + \FPmul{\NumDataPlotBuffer}{\NumDataPlotBuffer}{\NumDataPlotyDataCoordRatio} + \FPadd{\NumDataPlotTickPos}{#1}{\NumDataPlotBuffer} + \plotySubGridLine{\NumDataPlotTickPos} + } + \fi \fi } @@ -894,7 +905,7 @@ yMax=100, yMin=0, Dy=10, yCoordMax=\NumDataPlotGyPicMax, yCoordMin=\NumDataPlotGyPicMin, yLog=false, - yNearlyTight=false, + yNearlyTight=false }{} \presetkeys[NumericDataPlot]{xAxis}{ NoGrid=false, NoTicks=false, NoLabel=false, NoTickLabel=false |