diff options
Diffstat (limited to 'Master/texmf-dist')
-rw-r--r-- | Master/texmf-dist/doc/generic/pst-plot/Changes | 4 | ||||
-rw-r--r-- | Master/texmf-dist/doc/generic/pst-plot/pst-plot-doc.bib | 4 | ||||
-rw-r--r-- | Master/texmf-dist/doc/generic/pst-plot/pst-plot-doc.pdf | bin | 780236 -> 789673 bytes | |||
-rw-r--r-- | Master/texmf-dist/doc/generic/pst-plot/pst-plot-doc.tex | 68 | ||||
-rw-r--r-- | Master/texmf-dist/tex/generic/pst-plot/pst-plot.tex | 57 |
5 files changed, 114 insertions, 19 deletions
diff --git a/Master/texmf-dist/doc/generic/pst-plot/Changes b/Master/texmf-dist/doc/generic/pst-plot/Changes index 7ef2d0156cb..7585f9682d9 100644 --- a/Master/texmf-dist/doc/generic/pst-plot/Changes +++ b/Master/texmf-dist/doc/generic/pst-plot/Changes @@ -1,4 +1,8 @@ ----- pst-plot.tex +1.24 2010-11-14 - fix bug: replaced psk@ticks with psk@labels +1.23 2010-10-21 - add option plotNoX to choose any column as x value +1.22 2010-10-02 - fix bug with wrong color for the axes when using + subticks 1.21 2010-09-28 - fix bug with psgraph and the ! optional argument 1.20 2010-09-09 - new optional arguments for setting a variable linewidth and variable color for plotstyle curve diff --git a/Master/texmf-dist/doc/generic/pst-plot/pst-plot-doc.bib b/Master/texmf-dist/doc/generic/pst-plot/pst-plot-doc.bib index 64157b2710e..14e8fc1c736 100644 --- a/Master/texmf-dist/doc/generic/pst-plot/pst-plot-doc.bib +++ b/Master/texmf-dist/doc/generic/pst-plot/pst-plot-doc.bib @@ -52,9 +52,9 @@ @Book{PSTricks2, author = {Herbert Vo\ss{}}, title = {\texttt{PSTricks} -- {G}rafik f\"ur \TeX{} und \LaTeX}, - edition = {fifth}, + edition = {6.}, publisher = {DANTE -- Lehmanns}, - year = {2008}, + year = {2010}, address = {Heidelberg/Hamburg} } diff --git a/Master/texmf-dist/doc/generic/pst-plot/pst-plot-doc.pdf b/Master/texmf-dist/doc/generic/pst-plot/pst-plot-doc.pdf Binary files differindex 6d92839ff63..af622328c49 100644 --- a/Master/texmf-dist/doc/generic/pst-plot/pst-plot-doc.pdf +++ b/Master/texmf-dist/doc/generic/pst-plot/pst-plot-doc.pdf diff --git a/Master/texmf-dist/doc/generic/pst-plot/pst-plot-doc.tex b/Master/texmf-dist/doc/generic/pst-plot/pst-plot-doc.tex index a82d58c6601..715e74c97c5 100644 --- a/Master/texmf-dist/doc/generic/pst-plot/pst-plot-doc.tex +++ b/Master/texmf-dist/doc/generic/pst-plot/pst-plot-doc.tex @@ -1,4 +1,4 @@ -%% $Id: pst-plot-doc.tex 369 2010-08-15 08:07:42Z herbert $ +%% $Id: pst-plot-doc.tex 401 2010-10-21 07:34:02Z herbert $ \documentclass[11pt,english,BCOR10mm,DIV12,bibliography=totoc,parskip=false,smallheadings headexclude,footexclude,oneside,dvipsnames,svgnames]{pst-doc} \listfiles @@ -2266,7 +2266,7 @@ of all records with the plotstyle option \Lkeyval{curve}.\xLkeyword{nStep}\xLkey %-------------------------------------------------------------------------------------- -\subsection{Options \nxLkeyword{plotNo} and \nxLkeyword{plotNoMax}}\label{plotno} +\subsection{Options \nxLkeyword{plotNo}, \nxLkeyword{plotNoX}, and \nxLkeyword{plotNoMax}}\label{plotno} %-------------------------------------------------------------------------------------- By default the plot macros expect \verb+x|y+ data records, but when having data files with multiple values for y, like: @@ -2314,6 +2314,70 @@ without any modification to the data file: \end{pspicture} \end{LTXexample} +It is also possible to select another column for the $x$-value. Suppose we have +a data base with records like \verb+x y y x y+, then it is by default a record +with one $x$ value and four possible $y$ values. We still have to define +\Lkeyword{plotNoMax}=4. However, it is possible to select the forth value as +new $x$ value by setting \Lkeyword{plotNoX=4} (it is preset to 1). +Then the forth value is taken as $x$. The example uses the the following +data set. + +\begin{lstlisting}[style=syntax] +% X1 X2 Y1 Y2 + 2 55.1500 10.35 11.26 + 31 59.7167 11.06 11.11 + 34 65.7167 11.87 10.83 + 40 62.1833 11.59 11.19 + 45 56.0500 10.74 11.50 + 47 68.2667 12.65 11.11 + 52 69.7500 13.23 11.38 + 55 76.3333 14.28 11.22 + 59 75.4000 14.69 11.69 + 62 78.6000 15.25 11.64 + 66 69.3167 14.06 12.17 + 69 77.5500 15.24 11.79 + 73 70.8833 14.52 12.29 + 75 60.6167 13.10 12.97 + 79 68.3833 14.43 12.66 + 82 56.6833 12.05 12.75 + 87 95.1333 21.10 13.31 +\end{lstlisting} + + +\begin{filecontents*}{demo.txt} +% X1 X2 Y1 Y2 + 2 55.1500 10.35 11.26 + 31 59.7167 11.06 11.11 + 34 65.7167 11.87 10.83 + 40 62.1833 11.59 11.19 + 45 56.0500 10.74 11.50 + 47 68.2667 12.65 11.11 + 52 69.7500 13.23 11.38 + 55 76.3333 14.28 11.22 + 59 75.4000 14.69 11.69 + 62 78.6000 15.25 11.64 + 66 69.3167 14.06 12.17 + 69 77.5500 15.24 11.79 + 73 70.8833 14.52 12.29 + 75 60.6167 13.10 12.97 + 79 68.3833 14.43 12.66 + 82 56.6833 12.05 12.75 + 87 95.1333 21.10 13.31 +\end{filecontents*} + + +\begin{LTXexample}[pos=t,preset=\centering] +\readdata{\data}{demo.txt} +\psset{xAxisLabel={},yAxisLabel={},llx=-5mm} +\begin{psgraph}[axesstyle=frame,Dy=5,Dx=10,ticksize=5pt 0](0,0)(100,25){10cm}{8cm} +\psset{dotstyle=square,dotscale=1.5,linewidth=1.5pt} +\listplot[plotNoMax=3,plotNo=2,linecolor=red,plotstyle=dots]{\data} +\listplot[plotNoMax=3,plotNoX=2,plotNo=3,linecolor=blue,plotstyle=dots]{\data} +\end{psgraph} +\end{LTXexample} + + + \clearpage diff --git a/Master/texmf-dist/tex/generic/pst-plot/pst-plot.tex b/Master/texmf-dist/tex/generic/pst-plot/pst-plot.tex index 1c14df1bd36..7352e28515b 100644 --- a/Master/texmf-dist/tex/generic/pst-plot/pst-plot.tex +++ b/Master/texmf-dist/tex/generic/pst-plot/pst-plot.tex @@ -1,11 +1,11 @@ -% $Id: pst-plot.tex 388 2010-09-28 16:31:24Z herbert $ +% $Id: pst-plot.tex 419 2010-11-14 18:37:29Z herbert $ %% BEGIN pst-plot.tex %% %% plotting functions and data with PSTricks. %% See the betadoc documentation for usage. %% %% COPYRIGHT 1993, 1994, 1999 by Timothy Van Zandt, tvz@nwu.edu. -%% COPYRIGHT 2009/10 by Herbert Voss, hvoss@tug.org. +%% COPYRIGHT 2009/11 by Herbert Voss, hvoss@tug.org. %% %% This program can be redistributed and/or modified under the terms %% of the LaTeX Project Public License Distributed from CTAN @@ -20,8 +20,8 @@ \ifx\PSTFPloaded\endinput\else \input pst-fp.tex \fi \ifx\MultidoLoaded\endinput\else \input multido.tex \fi % -\def\fileversion{1.21} -\def\filedate{2010/09/28} +\def\fileversion{1.24} +\def\filedate{2010/11/14} \message{ v\fileversion, \filedate\space (tvz,hv)} % \edef\TheAtCode{\the\catcode`\@} @@ -639,6 +639,9 @@ D\space##1% % \pst@def{PreparePoints}<{% counttomark /m exch def + /maxYValues \psk@plotNoMax\space def + /YValuePos \psk@plotNo\space def + /XValuePos \psk@plotNoX\space def \ifPsk@xyValues\else % we have only y values /mm m def /M m 1 add def @@ -647,16 +650,30 @@ D\space##1% \fi \ifPst@ChangeOrder /m0 m def - m \psk@plotNoMax\space 1 add div 1 sub cvi { - m0 \psk@plotNoMax\space 1 add roll /m0 m0 \psk@plotNoMax\space 1 add sub def + m maxYValues 1 add div 1 sub cvi { + m0 maxYValues 1 add roll /m0 m0 maxYValues 1 add sub def } repeat \fi - /n m \psk@plotNoMax\space 1 add div cvi def - \psk@plotNoMax\space 1 gt {% multiple data files? + /n m maxYValues 1 add div cvi def +% +% when having multiple x values, we first delete the first X value +% and then put the plotNoX onto the first position +% + XValuePos 1 gt {% multiple x values? x y y xNo y + n { + maxYValues 1 add XValuePos neg roll % y x y y xNo + dup /XValue ED + maxYValues 1 add XValuePos 1 sub roll % y y xNo y x + pop XValue % y y xNo y xNo + maxYValues 1 add 1 roll % xNo y y xNo y + m maxYValues 1 add roll % next values + } repeat + } if % no multiple data files + maxYValues 1 gt {% multiple data files? x y y yNo y n { - \psk@plotNoMax\space \psk@plotNo\space 1 sub neg roll % x yNo y y y ... - \psk@plotNoMax\space 1 sub { pop } repeat % x yNo - /m m \psk@plotNoMax\space 1 sub sub def + maxYValues YValuePos 1 sub neg roll % x yNo y y y ... + maxYValues 1 sub { pop } repeat % x yNo + /m m maxYValues 1 sub sub def m 2 roll } repeat } if % no multiple data files @@ -1151,7 +1168,8 @@ D\space##1% \else% \def\pst@@@hlabel##1{% \edef\@xyDecimals{\psk@xDecimals}% - \ifnum\psk@ticks<\tw@% ticks=all|x +% \ifnum\psk@ticks<\tw@ % ticks=all|x + \ifnum\psk@labels<\tw@ % labels=all|x \ifx\psk@xlogBase\@empty% \pshlabel{\psk@labelFontSize\expandafter\@LabelComma##1..\@nil\psk@xlabelFactor}% \else% @@ -1231,7 +1249,8 @@ D\space##1% \else \def\pst@@@vlabel##1{% \edef\@xyDecimals{\psk@yDecimals}% - \ifodd\psk@ticks% ticks=all||y (0,2) +% \ifodd\psk@ticks % ticks=all||y (0,2) + \ifodd\psk@labels % labelss=all||y (0,2) \else% \ifx\psk@ylogBase\@empty% \psvlabel{\expandafter\@LabelComma##1..\@nil\psk@ylabelFactor}% @@ -1508,12 +1527,13 @@ D\space##1% \define@key[psset]{pst-plot}{yStart}[{}]{\def\psk@yStart{#1}} \define@key[psset]{pst-plot}{yEnd}[{}]{\def\psk@yEnd{#1}} % +\define@key[psset]{pst-plot}{plotNoX}[1]{\def\psk@plotNoX{#1}} \define@key[psset]{pst-plot}{plotNo}[1]{\def\psk@plotNo{#1}} \define@key[psset]{pst-plot}{plotNoMax}[1]{\def\psk@plotNoMax{#1}} % \psset[pst-plot]{nStep=1, nStart=0, nEnd={},% xStep=0, yStep=0, xStart={}, xEnd={}, yStart={}, yEnd={}, comma=false,% - plotNo=1,plotNoMax=1}% + plotNo=1,plotNoMax=1,plotNoX=1}% % \def\pstScalePoints(#1,#2)#3#4{% % xScale | yScale | xOperator | yOperator @@ -1539,7 +1559,8 @@ D\space##1% % \def\psxs@axes{{% \ifPst@xAxis\psxs@@axes\pst@dima\pst@dimb\pst@dimc\pst@dimd{}{x}\fi% - \ifPst@yAxis\psxs@@axes\pst@dima\pst@dimb\pst@dimc\pst@dimd{exch}{y}\fi}} + \ifPst@yAxis\psxs@@axes\pst@dima\pst@dimb\pst@dimc\pst@dimd{exch}{y}\fi% +}} % \def\psaxes{\pst@object{psaxes}} \def\psaxes@i{\pst@getarrows\psaxes@ii} @@ -1839,6 +1860,12 @@ D\space##1% } if% }% end of \pscode \end@SpecialObj% + % now draw the axes again with the correct linecolor +% \ifis@yAxis% + \ifPst@yAxis\psline[linecolor=\pslinecolor](0,#2)(0,#4)\fi% +% \else% + \ifPst@xAxis\psline[linecolor=\pslinecolor](#1,0)(#3,0)\fi% +% \fi% \ignorespaces% }% % |