From e0c6872cf40896c7be36b11dcc744620f10adf1d Mon Sep 17 00:00:00 2001 From: Norbert Preining Date: Mon, 2 Sep 2019 13:46:59 +0900 Subject: Initial commit --- support/fastpictex/CHANGES | 28 + support/fastpictex/README | 35 + support/fastpictex/ToDo.List | 2 + support/fastpictex/doc/fastpictex.dvi | Bin 0 -> 162128 bytes support/fastpictex/doc/fastpictex.pdf | Bin 0 -> 180026 bytes support/fastpictex/doc/manual/asterisk.fpt | 9 + support/fastpictex/doc/manual/asterisk.ltx | 64 ++ support/fastpictex/doc/manual/axislabels.fpt | 10 + support/fastpictex/doc/manual/axislabels.ltx | 79 ++ support/fastpictex/doc/manual/bargraph.fpt | 4 + support/fastpictex/doc/manual/bargraph.ltx | 48 ++ support/fastpictex/doc/manual/fastpictex.bib | 37 + support/fastpictex/doc/manual/fastpictex.ltx | 795 +++++++++++++++++++ support/fastpictex/doc/manual/grids.fpt | 8 + support/fastpictex/doc/manual/grids.ltx | 63 ++ support/fastpictex/doc/manual/heading.fpt | 24 + support/fastpictex/doc/manual/heading.ltx | 167 ++++ support/fastpictex/doc/manual/legend.fpt | 24 + support/fastpictex/doc/manual/legend.ltx | 75 ++ support/fastpictex/doc/manual/linegraph.fpt | 5 + support/fastpictex/doc/manual/linegraph.ltx | 26 + support/fastpictex/doc/manual/mixgraph.fpt | 11 + support/fastpictex/doc/manual/mixgraph.ltx | 64 ++ support/fastpictex/doc/manual/pictex-command.fpt | 29 + support/fastpictex/doc/manual/pictex-command.ltx | 90 +++ support/fastpictex/doc/manual/size.fpt | 9 + support/fastpictex/doc/manual/size.ltx | 70 ++ support/fastpictex/doc/manual/tline_complex.fpt | 44 ++ support/fastpictex/doc/manual/tline_complex.ltx | 252 ++++++ support/fastpictex/doc/manual/tline_easy.fpt | 8 + support/fastpictex/doc/manual/tline_easy.ltx | 48 ++ support/fastpictex/doc/manual/x-command.fpt | 20 + support/fastpictex/doc/manual/x-command.ltx | 98 +++ support/fastpictex/doc/manual/xticlabels1.fpt | 10 + support/fastpictex/doc/manual/xticlabels1.ltx | 65 ++ support/fastpictex/doc/manual/xticlabels2.fpt | 9 + support/fastpictex/doc/manual/xticlabels2.ltx | 56 ++ support/fastpictex/doc/manual/xygraph.fpt | 9 + support/fastpictex/doc/manual/xygraph.ltx | 42 + support/fastpictex/fastpictex-0.9.lsm | 27 + support/fastpictex/src/Makefile | 39 + support/fastpictex/src/fastpictex.cc | 947 +++++++++++++++++++++++ support/fastpictex/src/fastpictex.h | 73 ++ support/fastpictex/src/global.h | 2 + support/fastpictex/src/main.cc | 40 + support/fastpictex/src/myfunctions.cc | 211 +++++ support/fastpictex/src/nrutil.cc | 284 +++++++ support/fastpictex/src/nrutil.h | 82 ++ support/fastpictex/src/scale.cc | 66 ++ 49 files changed, 4208 insertions(+) create mode 100644 support/fastpictex/CHANGES create mode 100644 support/fastpictex/README create mode 100644 support/fastpictex/ToDo.List create mode 100644 support/fastpictex/doc/fastpictex.dvi create mode 100644 support/fastpictex/doc/fastpictex.pdf create mode 100644 support/fastpictex/doc/manual/asterisk.fpt create mode 100644 support/fastpictex/doc/manual/asterisk.ltx create mode 100644 support/fastpictex/doc/manual/axislabels.fpt create mode 100644 support/fastpictex/doc/manual/axislabels.ltx create mode 100644 support/fastpictex/doc/manual/bargraph.fpt create mode 100644 support/fastpictex/doc/manual/bargraph.ltx create mode 100644 support/fastpictex/doc/manual/fastpictex.bib create mode 100644 support/fastpictex/doc/manual/fastpictex.ltx create mode 100644 support/fastpictex/doc/manual/grids.fpt create mode 100644 support/fastpictex/doc/manual/grids.ltx create mode 100644 support/fastpictex/doc/manual/heading.fpt create mode 100644 support/fastpictex/doc/manual/heading.ltx create mode 100644 support/fastpictex/doc/manual/legend.fpt create mode 100644 support/fastpictex/doc/manual/legend.ltx create mode 100644 support/fastpictex/doc/manual/linegraph.fpt create mode 100644 support/fastpictex/doc/manual/linegraph.ltx create mode 100644 support/fastpictex/doc/manual/mixgraph.fpt create mode 100644 support/fastpictex/doc/manual/mixgraph.ltx create mode 100644 support/fastpictex/doc/manual/pictex-command.fpt create mode 100644 support/fastpictex/doc/manual/pictex-command.ltx create mode 100644 support/fastpictex/doc/manual/size.fpt create mode 100644 support/fastpictex/doc/manual/size.ltx create mode 100644 support/fastpictex/doc/manual/tline_complex.fpt create mode 100644 support/fastpictex/doc/manual/tline_complex.ltx create mode 100644 support/fastpictex/doc/manual/tline_easy.fpt create mode 100644 support/fastpictex/doc/manual/tline_easy.ltx create mode 100644 support/fastpictex/doc/manual/x-command.fpt create mode 100644 support/fastpictex/doc/manual/x-command.ltx create mode 100644 support/fastpictex/doc/manual/xticlabels1.fpt create mode 100644 support/fastpictex/doc/manual/xticlabels1.ltx create mode 100644 support/fastpictex/doc/manual/xticlabels2.fpt create mode 100644 support/fastpictex/doc/manual/xticlabels2.ltx create mode 100644 support/fastpictex/doc/manual/xygraph.fpt create mode 100644 support/fastpictex/doc/manual/xygraph.ltx create mode 100644 support/fastpictex/fastpictex-0.9.lsm create mode 100644 support/fastpictex/src/Makefile create mode 100644 support/fastpictex/src/fastpictex.cc create mode 100644 support/fastpictex/src/fastpictex.h create mode 100644 support/fastpictex/src/global.h create mode 100644 support/fastpictex/src/main.cc create mode 100644 support/fastpictex/src/myfunctions.cc create mode 100644 support/fastpictex/src/nrutil.cc create mode 100644 support/fastpictex/src/nrutil.h create mode 100644 support/fastpictex/src/scale.cc (limited to 'support/fastpictex') diff --git a/support/fastpictex/CHANGES b/support/fastpictex/CHANGES new file mode 100644 index 0000000000..b1dd351ecf --- /dev/null +++ b/support/fastpictex/CHANGES @@ -0,0 +1,28 @@ +Ver. 0.7-0.9 +Added linear regression lines and linear regression equations. Some +smaller bugs were fixed. + +Ver. 0.6 +Added pictex command to forward raw pictex code to the pictex +interpreter. + +Ver. 0.5 +Added legends + +Ver. 0.4 +Added significance indicators over data points. +xticlabels can be set for all kind of chart types. + +Ver. 0.3 +Added xgrid and ygrid commands for grid lines. + +Ver. 0.2 +Added a xticlabels command that allows to define +labels for the x-axis tics in bar graphs. + +Ver. 0.1 +Added a size command that allows to define the width and +height of the chart. The default is 6.0x6.0 cm. + +Ver. 0.0 +First version: no changes diff --git a/support/fastpictex/README b/support/fastpictex/README new file mode 100644 index 0000000000..c579a51bc0 --- /dev/null +++ b/support/fastpictex/README @@ -0,0 +1,35 @@ + FastPicTeX + by Dr. med. Harald Stauss + 1997-2008 + +FastPicTeX is a preprocessor for PiCTeX that takes very easy to write +macros and converts them to PiCTeX code that can be included in LaTeX +documents. FastPicTeX is specifically designed for diagrams of +numbered data material, such as line graphs, bar graphs, or xy +graphs. A detailed manual for FastPicTeX is included as PDF. Usage of +the program is very simple: + +fastpictex file_in file_out + +file_in: macro file that contains the data and macros describing + the chart. +file_out: LaTeX file containing the PicTeX code for the chart. It can + be included in a LaTeX document with the \input command. + +To compile the program, simply change to the directory where you +extracted all the files from the archive. Then do the following: + +cd fastpictex-x.x\src +make + +That's all. Isn't it easy? + +A binary for DOS/Windows is included. + +If you find this program useful, please send me a picture postcard of +your home town. Otherwise, the GNU general public licence (GPL) +applies. + +Have fun with FastPicTeX ! + +Harald M. Stauss, MD diff --git a/support/fastpictex/ToDo.List b/support/fastpictex/ToDo.List new file mode 100644 index 0000000000..f3573d57d1 --- /dev/null +++ b/support/fastpictex/ToDo.List @@ -0,0 +1,2 @@ +1. Custom ranges for the x and y axes +2. Many other things diff --git a/support/fastpictex/doc/fastpictex.dvi b/support/fastpictex/doc/fastpictex.dvi new file mode 100644 index 0000000000..5e90d58687 Binary files /dev/null and b/support/fastpictex/doc/fastpictex.dvi differ diff --git a/support/fastpictex/doc/fastpictex.pdf b/support/fastpictex/doc/fastpictex.pdf new file mode 100644 index 0000000000..2a14ea8a06 Binary files /dev/null and b/support/fastpictex/doc/fastpictex.pdf differ diff --git a/support/fastpictex/doc/manual/asterisk.fpt b/support/fastpictex/doc/manual/asterisk.fpt new file mode 100644 index 0000000000..cac38edd04 --- /dev/null +++ b/support/fastpictex/doc/manual/asterisk.fpt @@ -0,0 +1,9 @@ +size 10 4 +type bar +x +y 12 23 45"$\dag$" 32 +dy 1.2 2.5 5.3 4.8 +type bar +x +y 65"*" 34"n.sig." 12"*" 85"*" +dy 6.5 5.3 2.1 9.6 diff --git a/support/fastpictex/doc/manual/asterisk.ltx b/support/fastpictex/doc/manual/asterisk.ltx new file mode 100644 index 0000000000..f44446c1d2 --- /dev/null +++ b/support/fastpictex/doc/manual/asterisk.ltx @@ -0,0 +1,64 @@ +% ...... start of pictex file generated by FastPicTeX ...... +\beginpicture +% ...... macros for errorbars ...... +\newcommand{\putxerrorbar}[3]{% +\dimen0=\Xdistance{#1} \dimen1=\Ydistance{#2} \dimen2=\Xdistance{#3} +\unitlength=1pt \setdimensionmode +\dimen3=\dimen0 \advance \dimen3 by -\dimen2 +\dimen4=\dimen0 \advance \dimen4 by \dimen2 +\dimen5=\dimen1 \advance \dimen5 by -1mm +\dimen6=\dimen1 \advance \dimen6 by 1mm +\putrule from {\dimen3} {\dimen1} to {\dimen4} {\dimen1} +\putrule from {\dimen3} {\dimen5} to {\dimen3} {\dimen6} +\putrule from {\dimen4} {\dimen5} to {\dimen4} {\dimen6} +\setcoordinatemode } +\newcommand{\putyerrorbar}[3]{% +\dimen0=\Xdistance{#1} \dimen1=\Ydistance{#2} \dimen2=\Ydistance{#3} +\unitlength=1pt \setdimensionmode +\dimen3=\dimen1 \advance \dimen3 by -\dimen2 +\dimen4=\dimen1 \advance \dimen4 by \dimen2 +\dimen5=\dimen0 \advance \dimen5 by -1mm +\dimen6=\dimen0 \advance \dimen6 by 1mm +\putrule from {\dimen0} {\dimen3} to {\dimen0} {\dimen4} +\putrule from {\dimen5} {\dimen3} to {\dimen6} {\dimen3} +\putrule from {\dimen5} {\dimen4} to {\dimen6} {\dimen4} +\setcoordinatemode } +\setcoordinatesystem units <2cm,0.04cm> point at 0 0 +\setplotarea x from 0 to 5, y from 0 to 100 +% .......... axis ............ +\axis bottom label {} ticks numbered from 0 to 5 by 1 / +\axis left label {} ticks numbered from 0 to 100 by 25 / +% .......... heading ............ +\plotheading {} +% .......... series ............. +\shaderectanglesoff +\putrectangle corners at 0.6 0 and 1 12 +\putrectangle corners at 1.6 0 and 2 23 +\putrectangle corners at 2.6 0 and 3 45 +\putrectangle corners at 3.6 0 and 4 32 +\putyerrorbar{0.8}{12}{1.2} +\put {} [b] <0mm,0.5\baselineskip> at 0.8 13.2 +\putyerrorbar{1.8}{23}{2.5} +\put {} [b] <0mm,0.5\baselineskip> at 1.8 25.5 +\putyerrorbar{2.8}{45}{5.3} +\put {$\dag$} [b] <0mm,0.5\baselineskip> at 2.8 50.3 +\putyerrorbar{3.8}{32}{4.8} +\put {} [b] <0mm,0.5\baselineskip> at 3.8 36.8 +\shaderectanglesoff% +\dimen0=\linethickness% +\setlength{\linethickness}{\Xdistance{0.4}}% +\putrule from 1.2 0 to 1.2 65 +\putrule from 2.2 0 to 2.2 34 +\putrule from 3.2 0 to 3.2 12 +\putrule from 4.2 0 to 4.2 85 +\setlength{\linethickness}{\dimen0}% +\putyerrorbar{1.2}{65}{6.5} +\put {*} [b] <0mm,0.5\baselineskip> at 1.2 71.5 +\putyerrorbar{2.2}{34}{5.3} +\put {n.sig.} [b] <0mm,0.5\baselineskip> at 2.2 39.3 +\putyerrorbar{3.2}{12}{2.1} +\put {*} [b] <0mm,0.5\baselineskip> at 3.2 14.1 +\putyerrorbar{4.2}{85}{9.6} +\put {*} [b] <0mm,0.5\baselineskip> at 4.2 94.6 +\endpicture +% ...... end of pictex file generated by FastPicTeX ...... diff --git a/support/fastpictex/doc/manual/axislabels.fpt b/support/fastpictex/doc/manual/axislabels.fpt new file mode 100644 index 0000000000..c7ec8b28f0 --- /dev/null +++ b/support/fastpictex/doc/manual/axislabels.fpt @@ -0,0 +1,10 @@ +heading \bf Blood Pressure With Increasing Age +xlabel time (years) +ylabel \stack{b,l,o,o,d, , ,p,r,e,s,s,u,r,e} +type line +x 25 30 35 40 45 50 60 70 80 90 +y 120 135 156 165 175 190 203"*" 196"*" 210"*" 203"*" +dy 12 13 15 16 17 19 20 20 21 18 +type xy +x 25 30 35 40 45 50 60 70 80 90 +y 120 135 156 165 175 190 203 196 210 203 diff --git a/support/fastpictex/doc/manual/axislabels.ltx b/support/fastpictex/doc/manual/axislabels.ltx new file mode 100644 index 0000000000..8fc72c4215 --- /dev/null +++ b/support/fastpictex/doc/manual/axislabels.ltx @@ -0,0 +1,79 @@ +% ...... start of pictex file generated by FastPicTeX ...... +\beginpicture +% ...... macros for errorbars ...... +\newcommand{\putxerrorbar}[3]{% +\dimen0=\Xdistance{#1} \dimen1=\Ydistance{#2} \dimen2=\Xdistance{#3} +\unitlength=1pt \setdimensionmode +\dimen3=\dimen0 \advance \dimen3 by -\dimen2 +\dimen4=\dimen0 \advance \dimen4 by \dimen2 +\dimen5=\dimen1 \advance \dimen5 by -1mm +\dimen6=\dimen1 \advance \dimen6 by 1mm +\putrule from {\dimen3} {\dimen1} to {\dimen4} {\dimen1} +\putrule from {\dimen3} {\dimen5} to {\dimen3} {\dimen6} +\putrule from {\dimen4} {\dimen5} to {\dimen4} {\dimen6} +\setcoordinatemode } +\newcommand{\putyerrorbar}[3]{% +\dimen0=\Xdistance{#1} \dimen1=\Ydistance{#2} \dimen2=\Ydistance{#3} +\unitlength=1pt \setdimensionmode +\dimen3=\dimen1 \advance \dimen3 by -\dimen2 +\dimen4=\dimen1 \advance \dimen4 by \dimen2 +\dimen5=\dimen0 \advance \dimen5 by -1mm +\dimen6=\dimen0 \advance \dimen6 by 1mm +\putrule from {\dimen0} {\dimen3} to {\dimen0} {\dimen4} +\putrule from {\dimen5} {\dimen3} to {\dimen6} {\dimen3} +\putrule from {\dimen5} {\dimen4} to {\dimen6} {\dimen4} +\setcoordinatemode } +\setcoordinatesystem units <0.075cm,0.0375cm> point at 0 0 +\setplotarea x from 20 to 100, y from 80 to 240 +% .......... axis ............ +\axis bottom label {time (years)} ticks numbered from 20 to 100 by 20 / +\axis left label {\stack{b,l,o,o,d, , ,p,r,e,s,s,u,r,e}} ticks numbered from 80 to 240 by 40 / +% .......... heading ............ +\plotheading {\bf Blood Pressure With Increasing Age} +% .......... series ............. +\setlinear +\setsolid +\plot 25 120 30 135 35 156 40 165 45 175 50 190 60 203 70 196 80 210 90 203 / +\setsolid +\putyerrorbar{25}{120}{12} +\put {} [b] <0mm,0.5\baselineskip> at 25 132 +\putyerrorbar{30}{135}{13} +\put {} [b] <0mm,0.5\baselineskip> at 30 148 +\putyerrorbar{35}{156}{15} +\put {} [b] <0mm,0.5\baselineskip> at 35 171 +\putyerrorbar{40}{165}{16} +\put {} [b] <0mm,0.5\baselineskip> at 40 181 +\putyerrorbar{45}{175}{17} +\put {} [b] <0mm,0.5\baselineskip> at 45 192 +\putyerrorbar{50}{190}{19} +\put {} [b] <0mm,0.5\baselineskip> at 50 209 +\putyerrorbar{60}{203}{20} +\put {*} [b] <0mm,0.5\baselineskip> at 60 223 +\putyerrorbar{70}{196}{20} +\put {*} [b] <0mm,0.5\baselineskip> at 70 216 +\putyerrorbar{80}{210}{21} +\put {*} [b] <0mm,0.5\baselineskip> at 80 231 +\putyerrorbar{90}{203}{18} +\put {*} [b] <0mm,0.5\baselineskip> at 90 221 +\put {$\bullet$} at 25 120 +\put {} [b] <0mm,0.5\baselineskip> at 25 120 +\put {$\bullet$} at 30 135 +\put {} [b] <0mm,0.5\baselineskip> at 30 135 +\put {$\bullet$} at 35 156 +\put {} [b] <0mm,0.5\baselineskip> at 35 156 +\put {$\bullet$} at 40 165 +\put {} [b] <0mm,0.5\baselineskip> at 40 165 +\put {$\bullet$} at 45 175 +\put {} [b] <0mm,0.5\baselineskip> at 45 175 +\put {$\bullet$} at 50 190 +\put {} [b] <0mm,0.5\baselineskip> at 50 190 +\put {$\bullet$} at 60 203 +\put {} [b] <0mm,0.5\baselineskip> at 60 203 +\put {$\bullet$} at 70 196 +\put {} [b] <0mm,0.5\baselineskip> at 70 196 +\put {$\bullet$} at 80 210 +\put {} [b] <0mm,0.5\baselineskip> at 80 210 +\put {$\bullet$} at 90 203 +\put {} [b] <0mm,0.5\baselineskip> at 90 203 +\endpicture +% ...... end of pictex file generated by FastPicTeX ...... diff --git a/support/fastpictex/doc/manual/bargraph.fpt b/support/fastpictex/doc/manual/bargraph.fpt new file mode 100644 index 0000000000..9d6f6df223 --- /dev/null +++ b/support/fastpictex/doc/manual/bargraph.fpt @@ -0,0 +1,4 @@ +type bar +x +y 13 14 18 24"*" +dy 1.5 1.9 2.4 5.2 diff --git a/support/fastpictex/doc/manual/bargraph.ltx b/support/fastpictex/doc/manual/bargraph.ltx new file mode 100644 index 0000000000..80adc6a620 --- /dev/null +++ b/support/fastpictex/doc/manual/bargraph.ltx @@ -0,0 +1,48 @@ +% ...... start of pictex file generated by FastPicTeX ...... +\beginpicture +% ...... macros for errorbars ...... +\newcommand{\putxerrorbar}[3]{% +\dimen0=\Xdistance{#1} \dimen1=\Ydistance{#2} \dimen2=\Xdistance{#3} +\unitlength=1pt \setdimensionmode +\dimen3=\dimen0 \advance \dimen3 by -\dimen2 +\dimen4=\dimen0 \advance \dimen4 by \dimen2 +\dimen5=\dimen1 \advance \dimen5 by -1mm +\dimen6=\dimen1 \advance \dimen6 by 1mm +\putrule from {\dimen3} {\dimen1} to {\dimen4} {\dimen1} +\putrule from {\dimen3} {\dimen5} to {\dimen3} {\dimen6} +\putrule from {\dimen4} {\dimen5} to {\dimen4} {\dimen6} +\setcoordinatemode } +\newcommand{\putyerrorbar}[3]{% +\dimen0=\Xdistance{#1} \dimen1=\Ydistance{#2} \dimen2=\Ydistance{#3} +\unitlength=1pt \setdimensionmode +\dimen3=\dimen1 \advance \dimen3 by -\dimen2 +\dimen4=\dimen1 \advance \dimen4 by \dimen2 +\dimen5=\dimen0 \advance \dimen5 by -1mm +\dimen6=\dimen0 \advance \dimen6 by 1mm +\putrule from {\dimen0} {\dimen3} to {\dimen0} {\dimen4} +\putrule from {\dimen5} {\dimen3} to {\dimen6} {\dimen3} +\putrule from {\dimen5} {\dimen4} to {\dimen6} {\dimen4} +\setcoordinatemode } +\setcoordinatesystem units <1.2cm,0.3cm> point at 0 0 +\setplotarea x from 0 to 5, y from 10 to 30 +% .......... axis ............ +\axis bottom label {} ticks numbered from 0 to 5 by 1 / +\axis left label {} ticks numbered from 10 to 30 by 5 / +% .......... heading ............ +\plotheading {} +% .......... series ............. +\shaderectanglesoff +\putrectangle corners at 0.6 10 and 1.4 13 +\putrectangle corners at 1.6 10 and 2.4 14 +\putrectangle corners at 2.6 10 and 3.4 18 +\putrectangle corners at 3.6 10 and 4.4 24 +\putyerrorbar{1}{13}{1.5} +\put {} [b] <0mm,0.5\baselineskip> at 1 14.5 +\putyerrorbar{2}{14}{1.9} +\put {} [b] <0mm,0.5\baselineskip> at 2 15.9 +\putyerrorbar{3}{18}{2.4} +\put {} [b] <0mm,0.5\baselineskip> at 3 20.4 +\putyerrorbar{4}{24}{5.2} +\put {*} [b] <0mm,0.5\baselineskip> at 4 29.2 +\endpicture +% ...... end of pictex file generated by FastPicTeX ...... diff --git a/support/fastpictex/doc/manual/fastpictex.bib b/support/fastpictex/doc/manual/fastpictex.bib new file mode 100644 index 0000000000..376d15ddbe --- /dev/null +++ b/support/fastpictex/doc/manual/fastpictex.bib @@ -0,0 +1,37 @@ +@book{1, +author = "Wichura, Michael J.", +keyword = "pictex", +publisher = "{\TeX} Users Group", +reprint = "IN FILE", +title = "The {\PiCTeX\ } Manual", +year = "1987", +} + +@book{2, +author = "Knappen, J{\"o}rg and Hubert Partl and Elisabeth Schlegl and Irene Hyna", +keyword = "latex", +publisher = "Dante", +reprint = "IN FILE", +title = "{\LaTeX~2$_\epsilon$}-Kurzbeschreibung", +year = "1994", +} + +@book{3, +author = "Lamport, Leslie", +publisher = "Addison-Wesley Co., Inc.", +reprint = "IN FILE", +title = "{\LaTeX} a document preparation system", +year = "1985", +} + +@book{4, +author = "Knuth, Donald E.", +keyword = "tex +latex +Knuth", +publisher = "Addison-Wesley Co., Inc.", +reprint = "IN FILE", +title = "The {\TeX}book", +year = "1991", +} + diff --git a/support/fastpictex/doc/manual/fastpictex.ltx b/support/fastpictex/doc/manual/fastpictex.ltx new file mode 100644 index 0000000000..b019677fc4 --- /dev/null +++ b/support/fastpictex/doc/manual/fastpictex.ltx @@ -0,0 +1,795 @@ +\documentclass[12pt,a4paper]{book} +\usepackage{pictex} +\usepackage{graphics} +\usepackage{citesort} +\usepackage{verbatim} +\usepackage{rotating} + +% ** Macros ** +\def\FastPiCTeX{F\kern-.30em\lower.5ex\hbox{A}\kern-.12emS\kern-.18em\lower-0.5ex\hbox{T}\PiCTeX} + +\author{ +Harald Martin Stau\ss, MD \\ +Dept. of Integrative Physiology \\ +The University of Iowa \\ +410 Field House \\ +Iowa City, IA 52245 \\ +USA \\ +e-mail: harald-stauss@uiowa.edu +} + +\title{Generating Charts with \FastPiCTeX} +\date{\today} + +\begin{document} +\maketitle + +{ +\setlength{\parindent}{0pt} +{\bf \FastPiCTeX:} H. M. Stau\ss, 2$^{nd}$~edition, 2008 + +\vfill +\begin{center} +Dedicated to \\ +the Free Software Foundation \\ + and all \TeX\ users +\end{center} + +\vfill This manual was generated using \LaTeX\ and \PiCTeX. The +sources of the \FastPiCTeX\ program together with the \LaTeX\ sources +of this manual are freely available. The rules of the GNU public +license apply. The author would appreciate receiving picture postcards +of the home town of people who like this program. } + +\tableofcontents +\listoffigures +%\listoftables + +\chapter{GNU general public license} +\begin{center} +Version 2, June 1991 \\ +\vspace*{1em} +Copyright \copyright \ 1989, 1991 Free Software Foundation, Inc. \\ +675 Mass Ave, Cambridge, MA 02139, USA \\ +Everyone is permitted to copy and distribute verbatim copies \\ +of this license document, but changing it is not allowed. \\ +\end{center} + +\section{Preamble} + The licenses for most software are designed to take away your +freedom to share and change it. By contrast, the GNU General Public +License is intended to guarantee your freedom to share and change free +software--to make sure the software is free for all its users. This +General Public License applies to most of the Free Software +Foundation's software and to any other program whose authors commit to +using it. (Some other Free Software Foundation software is covered by +the GNU Library General Public License instead.) You can apply it to +your programs, too. + + When we speak of free software, we are referring to freedom, not +price. Our General Public Licenses are designed to make sure that you +have the freedom to distribute copies of free software (and charge for +this service if you wish), that you receive source code or can get it +if you want it, that you can change the software or use pieces of it +in new free programs; and that you know you can do these things. + + To protect your rights, we need to make restrictions that forbid +anyone to deny you these rights or to ask you to surrender the rights. +These restrictions translate to certain responsibilities for you if you +distribute copies of the software, or if you modify it. + + For example, if you distribute copies of such a program, whether +gratis or for a fee, you must give the recipients all the rights that +you have. You must make sure that they, too, receive or can get the +source code. And you must show them these terms so they know their +rights. + + We protect your rights with two steps: (1) copyright the software, and +(2) offer you this license which gives you legal permission to copy, +distribute and/or modify the software. + + Also, for each author's protection and ours, we want to make certain +that everyone understands that there is no warranty for this free +software. If the software is modified by someone else and passed on, we +want its recipients to know that what they have is not the original, so +that any problems introduced by others will not reflect on the original +authors' reputations. + + Finally, any free program is threatened constantly by software +patents. We wish to avoid the danger that redistributors of a free +program will individually obtain patent licenses, in effect making the +program proprietary. To prevent this, we have made it clear that any +patent must be licensed for everyone's free use or not licensed at all. + + The precise terms and conditions for copying, distribution and +modification follow. + +\section{Terms and conditions} +\begin{enumerate} +\setcounter{enumi}{-1} +\item This License applies to any program or other work which contains +a notice placed by the copyright holder saying it may be distributed +under the terms of this General Public License. The "Program", below, +refers to any such program or work, and a "work based on the Program" +means either the Program or any derivative work under copyright law: +that is to say, a work containing the Program or a portion of it, +either verbatim or with modifications and/or translated into another +language. (Hereinafter, translation is included without limitation in +the term "modification".) Each licensee is addressed as "you". + +Activities other than copying, distribution and modification are not +covered by this License; they are outside its scope. The act of +running the Program is not restricted, and the output from the Program +is covered only if its contents constitute a work based on the +Program (independent of having been made by running the Program). +Whether that is true depends on what the Program does. + +\item You may copy and distribute verbatim copies of the Program's +source code as you receive it, in any medium, provided that you +conspicuously and appropriately publish on each copy an appropriate +copyright notice and disclaimer of warranty; keep intact all the +notices that refer to this License and to the absence of any warranty; +and give any other recipients of the Program a copy of this License +along with the Program. + +You may charge a fee for the physical act of transferring a copy, and +you may at your option offer warranty protection in exchange for a fee. + +\item You may modify your copy or copies of the Program or any portion +of it, thus forming a work based on the Program, and copy and +distribute such modifications or work under the terms of Section 1 +above, provided that you also meet all of these conditions: +\begin{enumerate} +\item You must cause the modified files to carry prominent notices + stating that you changed the files and the date of any change. + +\item You must cause any work that you distribute or publish, that in + whole or in part contains or is derived from the Program or any + part thereof, to be licensed as a whole at no charge to all third + parties under the terms of this License. + +\item If the modified program normally reads commands interactively + when run, you must cause it, when started running for such + interactive use in the most ordinary way, to print or display an + announcement including an appropriate copyright notice and a + notice that there is no warranty (or else, saying that you provide + a warranty) and that users may redistribute the program under + these conditions, and telling the user how to view a copy of this + License. (Exception: if the Program itself is interactive but + does not normally print such an announcement, your work based on + the Program is not required to print an announcement.) +\end{enumerate} + +These requirements apply to the modified work as a whole. If +identifiable sections of that work are not derived from the Program, +and can be reasonably considered independent and separate works in +themselves, then this License, and its terms, do not apply to those +sections when you distribute them as separate works. But when you +distribute the same sections as part of a whole which is a work based +on the Program, the distribution of the whole must be on the terms of +this License, whose permissions for other licensees extend to the +entire whole, and thus to each and every part regardless of who wrote it. + +Thus, it is not the intent of this section to claim rights or contest +your rights to work written entirely by you; rather, the intent is to +exercise the right to control the distribution of derivative or +collective works based on the Program. + +In addition, mere aggregation of another work not based on the Program +with the Program (or with a work based on the Program) on a volume of +a storage or distribution medium does not bring the other work under +the scope of this License. + +\item You may copy and distribute the Program (or a work based on it, +under Section 2) in object code or executable form under the terms of +Sections 1 and 2 above provided that you also do one of the following: +\begin{enumerate} +\item Accompany it with the complete corresponding machine-readable + source code, which must be distributed under the terms of Sections + 1 and 2 above on a medium customarily used for software interchange; or, + +\item Accompany it with a written offer, valid for at least three + years, to give any third party, for a charge no more than your + cost of physically performing source distribution, a complete + machine-readable copy of the corresponding source code, to be + distributed under the terms of Sections 1 and 2 above on a medium + customarily used for software interchange; or, + +\item Accompany it with the information you received as to the offer + to distribute corresponding source code. (This alternative is + allowed only for noncommercial distribution and only if you + received the program in object code or executable form with such + an offer, in accord with Subsection b above.) +\end{enumerate} + +The source code for a work means the preferred form of the work for +making modifications to it. For an executable work, complete source +code means all the source code for all modules it contains, plus any +associated interface definition files, plus the scripts used to +control compilation and installation of the executable. However, as a +special exception, the source code distributed need not include +anything that is normally distributed (in either source or binary +form) with the major components (compiler, kernel, and so on) of the +operating system on which the executable runs, unless that component +itself accompanies the executable. + +If distribution of executable or object code is made by offering +access to copy from a designated place, then offering equivalent +access to copy the source code from the same place counts as +distribution of the source code, even though third parties are not +compelled to copy the source along with the object code. + +\item You may not copy, modify, sublicense, or distribute the Program +except as expressly provided under this License. Any attempt +otherwise to copy, modify, sublicense or distribute the Program is +void, and will automatically terminate your rights under this License. +However, parties who have received copies, or rights, from you under +this License will not have their licenses terminated so long as such +parties remain in full compliance. + +\item You are not required to accept this License, since you have not +signed it. However, nothing else grants you permission to modify or +distribute the Program or its derivative works. These actions are +prohibited by law if you do not accept this License. Therefore, by +modifying or distributing the Program (or any work based on the +Program), you indicate your acceptance of this License to do so, and +all its terms and conditions for copying, distributing or modifying +the Program or works based on it. + +\item Each time you redistribute the Program (or any work based on the +Program), the recipient automatically receives a license from the +original licensor to copy, distribute or modify the Program subject to +these terms and conditions. You may not impose any further +restrictions on the recipients' exercise of the rights granted herein. +You are not responsible for enforcing compliance by third parties to +this License. + +\item If, as a consequence of a court judgment or allegation of patent +infringement or for any other reason (not limited to patent issues), +conditions are imposed on you (whether by court order, agreement or +otherwise) that contradict the conditions of this License, they do not +excuse you from the conditions of this License. If you cannot +distribute so as to satisfy simultaneously your obligations under this +License and any other pertinent obligations, then as a consequence you +may not distribute the Program at all. For example, if a patent +license would not permit royalty-free redistribution of the Program by +all those who receive copies directly or indirectly through you, then +the only way you could satisfy both it and this License would be to +refrain entirely from distribution of the Program. + +If any portion of this section is held invalid or unenforceable under +any particular circumstance, the balance of the section is intended to +apply and the section as a whole is intended to apply in other +circumstances. + +It is not the purpose of this section to induce you to infringe any +patents or other property right claims or to contest validity of any +such claims; this section has the sole purpose of protecting the +integrity of the free software distribution system, which is +implemented by public license practices. Many people have made +generous contributions to the wide range of software distributed +through that system in reliance on consistent application of that +system; it is up to the author/donor to decide if he or she is willing +to distribute software through any other system and a licensee cannot +impose that choice. + +This section is intended to make thoroughly clear what is believed to +be a consequence of the rest of this License. + +\item If the distribution and/or use of the Program is restricted in +certain countries either by patents or by copyrighted interfaces, the +original copyright holder who places the Program under this License +may add an explicit geographical distribution limitation excluding +those countries, so that distribution is permitted only in or among +countries not thus excluded. In such case, this License incorporates +the limitation as if written in the body of this License. + +\item The Free Software Foundation may publish revised and/or new versions +of the General Public License from time to time. Such new versions will +be similar in spirit to the present version, but may differ in detail to +address new problems or concerns. + +Each version is given a distinguishing version number. If the Program +specifies a version number of this License which applies to it and "any +later version", you have the option of following the terms and conditions +either of that version or of any later version published by the Free +Software Foundation. If the Program does not specify a version number of +this License, you may choose any version ever published by the Free Software +Foundation. + +\item If you wish to incorporate parts of the Program into other free +programs whose distribution conditions are different, write to the author +to ask for permission. For software which is copyrighted by the Free +Software Foundation, write to the Free Software Foundation; we sometimes +make exceptions for this. Our decision will be guided by the two goals +of preserving the free status of all derivatives of our free software and +of promoting the sharing and reuse of software generally. + +\begin{center} +NO WARRANTY +\end{center} + +\item BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY +FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN +OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES +PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED +OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF +MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS +TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE +PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, +REPAIR OR CORRECTION. + +\item IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING +WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR +REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, +INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING +OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED +TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY +YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER +PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE +POSSIBILITY OF SUCH DAMAGES. + +\begin{center} +END OF TERMS AND CONDITIONS +\end{center} +\end{enumerate} + +\chapter{Introduction} +When I was writing my doctoral thesis in the late 80$^{th}$, I spent +my total savings and bought an IBM-compatible personal computer, that +was based on a 8080~microprocessor. Of course, I was using \LaTeX\ as +text-processing software. Inspired by my brother Bernhard, I decided to +use \PiCTeX\ to generate the charts for my thesis. However, I soon +recognized that the \TeX\ version that I used at this time (PC\TeX) +was not suitable to generate \PiCTeX\ charts, since I very often +received messages, such as: \\ +\verb|! TeX capacity exceeded, sorry [main memory size = 65536 bytes]| + +Finally, the excellent \TeX\ implementation from Eberhard Mattes +appeared and I could use Big\TeX\ to generate my theses using the +MS-DOS operating system. Later, I switched to the Linux operating +system that came with the te\TeX\ implementation and memory management +was no longer a limitation. Today, I am using the MikTeX +implementation of \TeX\ on the MS-Windows Vista operating system. The +old original files of my doctoral thesis still run smoothly through +MikTeX without modifications and that is 20 years after the thesis was +written. + +However, the use of \PiCTeX\ for generating charts is still quite time +consuming, because the \PiCTeX\ macro language, although very +powerful, is somewhat awkward. Pictures must be described by the +\PiCTeX\ programming language and usually a lot of debugging is +necessary to obtain the desired result. This may be the largest +disadvantage of \PiCTeX. Otherwise, \PiCTeX\ is very advanced and +offers nearly everything necessary to generate very nice charts of +scientific data material. In order to overcome the time consuming part +of generating the \PiCTeX\ code, I decided to write a +\PiCTeX-preprocessor that does all the nasty part in generating +\PiCTeX\ code. This preprocessor takes a very simple macro file as +input and generates an output file containing the \PiCTeX\ code. The +output file can then be included in a document by the \verb|\input| +command. As with most preprocessors there are some limitations of +\FastPiCTeX. First, only numerical diagrams based on data material can +be generated. Second, only a limited set of commands are implemented, +offering only basic instructions. Therefore, fine tuning the \PiCTeX\ +code is usually still necessary. However, a working skeleton of the +\PiCTeX\ file can be generated easily by \FastPiCTeX. + +\chapter{Installation and Usage} +To use \FastPiCTeX\ you certainly need \TeX. \TeX\ was developed by +Donald E. Knuth. His \TeX book \cite{4} is the basis of all packages +based on the most advanced typesetting software available for almost +any computer platform. In addition to \TeX\ you also need \LaTeX\ that +was developed as an extension to \TeX\ by Leslie Lamport who has +written the original \LaTeX\ manual \cite{3}. In addition, you need +\PiCTeX\ that is described in \cite{1}. The \PiCTeX\ manual by the +author of \PiCTeX, Michael J. Wichura, is an indepth description of +the \PiCTeX\ system and is certainly worth to read. The \PiCTeX\ +manual used to be freely available on the Internet. Currently, it is +only available for purchase. + +Installation of \FastPiCTeX\ is as simple as unpacking the archive, +and running make. A binary executable version of \FastPiCTeX\ for the +MS-DOS/Windows operating system is included. Compilation of the +program for other operatign systems should be straight forward with +any standard C++ compiler (I have used the MinGW Compiler). +\begin{verbatim} +tar -xzvf fastpictex-x.y.tar.gz +cd fastpictex-x.y/src +make +\end{verbatim} + +Once you have generated the executable, you are ready to generate +\PiCTeX\ code in just a few seconds. \verb.fastpictex. is a command +line program that accepts two parameters: the input file name and the +output file name. The input file is a \FastPiCTeX\ macro file, while +the output file is the \PiCTeX\ code that can be included in a \LaTeX\ +document. Thus, running \FastPiCTeX\ is as simple as typing: +\begin{center} +\verb.fastpictex file_in file_out. +\end{center} + +As an example, consider the very simple input file +(\verb|bargraph.fpt|) that generates a bargraph with four columns and +standard-error bars: + +\verbatiminput{bargraph.fpt} + +To generate a \PiCTeX\ file that can be included in any \LaTeX\ file +(the \PiCTeX\ package must be included) run the command: +\begin{center} +\verb|fastpictex bargraph.fpt bargraph.ltx| +\end{center} + +A \LaTeX\ document that includes the bargraph (see Fig.~\ref{bargraph}) +generated by \FastPiCTeX\ could be: +\begin{verbatim} +\documentclass[12pt]{book} +\usepackage{pictex} +\begin{document} +This is a pretty nice bar graph: \\ +\input bargraph.ltx +\end{document} +\end{verbatim} + +\begin{figure} +\input bargraph.ltx +\caption[A bargraph]{\small \label{bargraph} This bargraph was +produced by \FastPiCTeX\ by only four lines of input code.} +\end{figure} + +\chapter{The macro language} +The \FastPiCTeX\ macro language consists of a few commands that can be +used to design a chart. The series of comands that compose a chart are +generally written to a file using a text editor, such as emacs or +vi. A command always starts in the first column of a line. Following +the command word at least one whitespace character must be inserted +before the parameters for the command are added. The parameters for +the commands are also separated by whitspace characters and can +continue in subsequent lines. However, if several lines are used for +one command, then the subsequent lines must start with at least one +whitespace character (instead of with a command word). As an example, +consider the following macro for the line graph shown in +Fig.~\ref{linegraph}: + +\verbatiminput{linegraph.fpt} + +\begin{figure} +\input linegraph.ltx +\caption[A linegraph]{\small \label{linegraph} A linegraph.} +\end{figure} + +In this example, the \verb.x. and \verb.y. commands are spread over +two lines. Note, that the second lines for these commands start with +whitespace characters. Whitespace characters can be blanks or +tabulators. + +It is also possible to design charts with more than one series of +data. For each series of data, commands must be provided as +demonstrated in the next example. The example consists of three series +of xy charts. The resulting chart is shown in +Fig.~\ref{xygraph}. Note, that the three data series are automatically +distinguished by different symbols (i.e. by filled circles, open +circles, and by diamonds). + +\verbatiminput{xygraph.fpt} + +\begin{figure} +\input xygraph.ltx +\caption[A XY-graph with three series]{\small \label{xygraph} A +XY-graph with three series.} +\end{figure} + +In addition, it is possible to combine different graph types in one +chart. Consider an example, in which the data points of an XY-Graph +should be connected by lines. A macro file for such a chart +composition is shown in the next example (Fig.~\ref{mixgraph}). + +\begin{verbatim} +type xy +x 1 2 3 4 5 +y 9 12 15 17 19 +dx 0.5 0.6 0.4 0.5 0.7 +dy 0.8 0.9 1.2 2.0 2.4 +type line +x 1 2 3 4 5 +y 9 12 15 17 19 +\end{verbatim} + +\begin{figure} +\input mixgraph.ltx +\caption[A graph with different chart types]{\small \label{mixgraph} A +graph with different chart types.} +\end{figure} + +If a chart that consists of several series is to be composed, it is +important to understand, how \FastPiCTeX\ handels the order of the +commands. If a command word occurs for the first time, the command +belongs to the first series. If the command word appears for a second +or third time, it belongs to the second or third series. Therefore, +the example that generated Fig.~\ref{mixgraph} could have also been +written as: +\begin{verbatim} +type xy +type line +x 1 2 3 4 5 +x 1 2 3 4 5 +y 9 12 15 17 19 +y 9 12 15 17 19 +dx 0.5 0.6 0.4 0.5 0.7 +dy 0.8 0.9 1.2 2.0 2.4 +\end{verbatim} + + +In the following sections of this chapter, the various commands are +described in detail. For each command, examples are given as to how to +use the commands. + + +\section{Comments, the \% command} +To add comments, use the command word \%. As an example, the macro +code for one of the former examples (Fig~\ref{mixgraph}) can be +written as: + +\verbatiminput{mixgraph.fpt} + +\section{The size command} +The size command allows to define the width and height of the +plot. The parameters of the size command are the width and the height +of the chart which must both be given in units of centimeters (cm). If +no size command is given, the width and height both default to +6~cm. The output of the following example is shown in +figure~\ref{size}. + +\verbatiminput{size.fpt} + +\begin{figure} +\input size.ltx +\caption[An example with a non-standard size]{\small \label{size} +An example with a non-standard size.} +\end{figure} + +\section{The type command} +The type command defines what kind of chart should be generated. The +available chart types are: +\begin{itemize} +\item XY-graphs +\item line graphs +\item bar graphs +\end{itemize} +Please keep in mind, that you must enter a type command for every +series in your chart. It is \textbf{not} possible to define the +chart type once for all series! + +\subsection{XY-Graphs} +To generate a XY-graph, simply use ``\verb|type xy|''. An example is +given in Fig.~\ref{xygraph}. With XY-graphs it is sometimes +interesting to study the correlation between the two variables X and +Y. With \FastPiCTeX\ this can be accomplished by the ``\verb|tline|'' +command explained later. + +\subsection{Line-Graphs} +To generate a line-graph, use ``\verb|type line|''. An example is +given in Fig.~\ref{linegraph}. + +\subsection{Bar-Graphs} +To generate a bar-graph, use the command ``\verb|type bar|''. An +example is given in Fig.~\ref{bargraph}. The x-coordinates of +bar-graphs always start at~1 and increase by steps of~1. Therefore, +the x~command for a bar graph may consist of only the letter~x and no +actual x-coordinates. + +\section{The tline command - Regression lines} +The ``\verb|tline|'' command generates regression lines and the linear +regression equation for XY-graphs. The ``\verb|tline|'' command is +followed by a parameter that can be 0, 1, or 2. A parameter of 0 is +equivalent to not type the ``\verb|tline|'' command at all. + +\begin{description} +\item []\verb|tline 0| no regression line and no linear regression + equation. +\item []\verb|tline 1| regression line but no linear regression + equation. +\item []\verb|tline 2| regression line and linear regression equation. +\end{description} + +Below is the \FastPiCTeX\ code of a small example with regression +lines. The corresponding graph is shown in +Fig.~\ref{tline_easy}. Please note that the linear regression equation +is only printed for the second XY-graph because the parameter for the +\verb|tline| command for the first XY-graph is ``1''. + +\verbatiminput{tline_easy.fpt} + +\begin{figure}[htb] +\input tline_easy.ltx +\caption[A small example with regression lines]{\small + \label{tline_easy} A small example with regression lines.} +\end{figure} + +A more complex example of a \FastPiCTeX\ file with regression lines is +shown below and the corresponding graph is povided in +Fig.~\ref{tline_complex}. The +\verb|\begin{sideways} ... \end{sideways}| environment used in this +example requires the rotating package. + +\verbatiminput{tline_complex.fpt} + +\begin{figure} +\input tline_complex.ltx +\caption[A complex example with regression lines]{\small + \label{tline_complex} A complex example with regression lines. The + legend was moved from the right side of the figure to the bottom by + editing the \LaTeX\ file of the diagram.} +\end{figure} + +\section{The x command} +The x command is used to define the x-coordinates. A x~command is +required for every series in a chart. However, the actual +x~coordinates may be omitted (i.e. the x~command consists of only the +letter~x). In this case the x-values are assumed to start at~1 and +increase by steps of~1. For example, consider the following graph that +is composed of bar, line, and xy series (Fig.~\ref{x-command}): + +\verbatiminput{x-command.fpt} + +The bars and lines of the resulting graph (Fig.~\ref{x-command}) have their +x-coordinates at 1, 2, 3, and 4. These x-coordinates are automatically +defined by \FastPiCTeX. + +\begin{figure} +\input x-command.ltx +\caption[An example without x-coordinates]{\small \label{x-command} An +example without x-coordinates.} +\end{figure} + +\section{The xticlabels command} +The xticlabels command allows to define labels for the tics at the +x-axis. Examples are given in Fig.~\ref{xticlabels} that were created +by the \FastPiCTeX\ commands: +\verbatiminput{xticlabels1.fpt} +and +\verbatiminput{xticlabels2.fpt} + +If the labels contain blanks, you may enclose the entire label in +quotes as demonstrated in on of the examples. One limitation is that it is +not possible to use \LaTeX\ formatting commands such as {\verb.\bf.} or +{\verb.\it.} in xticlabels. + +\begin{center} +\begin{figure} +\small +\input xticlabels1.ltx +\input xticlabels2.ltx +\caption[Examples with labels at the tics of the x-axis]{\small +\label{xticlabels} Examples with labels at the tics of the x-axis.} +\end{figure} +\end{center} + +\section{The y command} +The y command is used to define the y-coordinates. This command is +required for every series in a graph. It is possible to add a string +(enclosed in doublequotes) directly (without any whitespace) after the +numbers for the y-values. This string will be printed on top of the +data point in the chart. This feature allows to add asterisks to +indicate that this data point is significant or to add other kind of +information to a specific data point. Examples are given in +Fig.~\ref{bargraph}, \ref{asterisk}, and~\ref{legend-command}. The +latter one was produced by the following \FastPiCTeX\ commands: + +\verbatiminput{asterisk.fpt} + +\begin{center} +\begin{figure} +\small +\input asterisk.ltx +\caption[An example giving extra information on data points]{\small +\label{asterisk} An example giving extra information on data points.} +\end{figure} +\end{center} + +\section{The dx command} +The dx command can be used to define error bars in x-direction. For +example, if the standard errors are given, \FastPiCTeX\ draws +horizontal error bars extending to the left and to the right by +$\pm$~the standard errors. An example is given in Fig.~\ref{mixgraph}. + +\section{The dy command} +The dy command can be used to define error bars in y-direction. For +example, if the standard errors are given, \FastPiCTeX\ draws vertical +error bars extending up- and downwards by $\pm$~the standard +errors. Examples are given in Figs.~\ref{bargraph}, \ref{mixgraph}, +and \ref{x-command}. + +\section{The heading command} +The heading command can be used to define a heading for a chart. The +heading is placed above the chart. Standard \LaTeX\ formatting +commands can be used as illustrated in the example given in +Fig.~\ref{heading}. + +\verbatiminput{heading.fpt} + +\begin{figure} +\input heading.ltx +\caption[A chart with a heading]{\small \label{heading} A chart with a +heading.} +\end{figure} + +\section{The xlabel and ylabel commands} +These two commands can be used to enter a label to the x- and +y-axis. Like in the heading command, regular \LaTeX\ formatting +instructions can be included. If the y-axis label should be rotated by +90$^\circ$, the command ``\verb.\rotatebox{}{}.'' can be used. This +command is included in the graphics package distributed with most +\TeX\ and \LaTeX\ distributions. However, the +``\verb.\rotatebox{}{}.'' command uses special commands that can only +be handeled by some DVI-drivers, such as the DVIPS driver. Another +alternative is the rotating package that offers the +\verb|\begin{sideways} ... \end{sideways}| environment that has been +used to generate Fig.~\ref{tline_complex}. An example using the +``\verb.\stack{}.'' command to write the y-axis label vertically is +shown in the next Figure (Fig.~\ref{axislabels}). + +\verbatiminput{axislabels.fpt} + +\begin{figure} +\input axislabels.ltx +\caption[A chart with a heading and labels at the axis]{\small +\label{axislabels} A chart with a heading and labels at the axis.} +\end{figure} + +\section{The xgrid and ygrid commands} +If these commands are given, gridlines will be drawn in the x or y +direction respectively. The commands do not need any parameters. If +the xgrid or ygrid commands are not given, no gridlines will be +drawn. An example is given in Fig.~\ref{grids} that was generated by +the following commands: + +\verbatiminput{grids.fpt} + +\begin{figure} +\input grids.ltx +\caption[A chart with grid lines]{\small +\label{grids} A chart with grid lines.} +\end{figure} + +\section{The legend command} +If several series of data are plotted in one single diagram, one need +to know which series represents which data. To add a legend to a +series simply use: ``\verb|legend description of data series|''. An +example is given in Fig.~\ref{legend-command} that was generated by +the following \FastPiCTeX\ file: + +\verbatiminput{legend.fpt} + +\begin{figure} +\input legend.ltx +\caption[An example with legends]{\small \label{legend-command} An +example with legends.} +\end{figure} + + +\section{The pictex command} +Text following the pictex command is simply copied into the pictex +file to be interpreted by \PiCTeX. This command allows adding plain +\PiCTeX\ instructions to \FastPiCTeX\ files. The syntax for this command +is not very complicate: +``\verb|pictex whatever you want to pass on to pictex|''. An example +is provided in Fig.~\ref{pictex-command} that was generated by the +following \FastPiCTeX\ code: + +\verbatiminput{pictex-command.fpt} + +\begin{figure} +\input pictex-command.ltx +\caption[\PiCTeX\ commands included in \FastPiCTeX]{\small +\label{pictex-command} \PiCTeX\ commands included in \FastPiCTeX.} +\end{figure} + + +% Bibliography + +\bibliographystyle{plain} +\bibliography{fastpictex} + +\end{document} diff --git a/support/fastpictex/doc/manual/grids.fpt b/support/fastpictex/doc/manual/grids.fpt new file mode 100644 index 0000000000..dfc0f2a27d --- /dev/null +++ b/support/fastpictex/doc/manual/grids.fpt @@ -0,0 +1,8 @@ +type xy +heading A graph with grid lines +xgrid +x 123 234 196 349 453 98 294 +dx 12 34 23 32 12 7.5 11.2 +ygrid +y 12 65 84 47 23 91 17 +dy 1.4 4.6 7.3 6.2 4.1 11.6 7.5 diff --git a/support/fastpictex/doc/manual/grids.ltx b/support/fastpictex/doc/manual/grids.ltx new file mode 100644 index 0000000000..aca6e93354 --- /dev/null +++ b/support/fastpictex/doc/manual/grids.ltx @@ -0,0 +1,63 @@ +% ...... start of pictex file generated by FastPicTeX ...... +\beginpicture +% ...... macros for errorbars ...... +\newcommand{\putxerrorbar}[3]{% +\dimen0=\Xdistance{#1} \dimen1=\Ydistance{#2} \dimen2=\Xdistance{#3} +\unitlength=1pt \setdimensionmode +\dimen3=\dimen0 \advance \dimen3 by -\dimen2 +\dimen4=\dimen0 \advance \dimen4 by \dimen2 +\dimen5=\dimen1 \advance \dimen5 by -1mm +\dimen6=\dimen1 \advance \dimen6 by 1mm +\putrule from {\dimen3} {\dimen1} to {\dimen4} {\dimen1} +\putrule from {\dimen3} {\dimen5} to {\dimen3} {\dimen6} +\putrule from {\dimen4} {\dimen5} to {\dimen4} {\dimen6} +\setcoordinatemode } +\newcommand{\putyerrorbar}[3]{% +\dimen0=\Xdistance{#1} \dimen1=\Ydistance{#2} \dimen2=\Ydistance{#3} +\unitlength=1pt \setdimensionmode +\dimen3=\dimen1 \advance \dimen3 by -\dimen2 +\dimen4=\dimen1 \advance \dimen4 by \dimen2 +\dimen5=\dimen0 \advance \dimen5 by -1mm +\dimen6=\dimen0 \advance \dimen6 by 1mm +\putrule from {\dimen0} {\dimen3} to {\dimen0} {\dimen4} +\putrule from {\dimen5} {\dimen3} to {\dimen6} {\dimen3} +\putrule from {\dimen5} {\dimen4} to {\dimen6} {\dimen4} +\setcoordinatemode } +\setcoordinatesystem units <0.015cm,0.06cm> point at 0 0 +\setplotarea x from 100 to 500, y from 0 to 100 +% .......... axis ............ +\axis bottom label {} ticks andacross numbered from 100 to 500 by 100 / +\axis left label {} ticks andacross numbered from 0 to 100 by 25 / +% .......... heading ............ +\plotheading {A graph with grid lines} +% .......... series ............. +\put {$\bullet$} at 123 12 +\putxerrorbar{123}{12}{12} +\putyerrorbar{123}{12}{1.4} +\put {} [b] <0mm,0.5\baselineskip> at 123 13.4 +\put {$\bullet$} at 234 65 +\putxerrorbar{234}{65}{34} +\putyerrorbar{234}{65}{4.6} +\put {} [b] <0mm,0.5\baselineskip> at 234 69.6 +\put {$\bullet$} at 196 84 +\putxerrorbar{196}{84}{23} +\putyerrorbar{196}{84}{7.3} +\put {} [b] <0mm,0.5\baselineskip> at 196 91.3 +\put {$\bullet$} at 349 47 +\putxerrorbar{349}{47}{32} +\putyerrorbar{349}{47}{6.2} +\put {} [b] <0mm,0.5\baselineskip> at 349 53.2 +\put {$\bullet$} at 453 23 +\putxerrorbar{453}{23}{12} +\putyerrorbar{453}{23}{4.1} +\put {} [b] <0mm,0.5\baselineskip> at 453 27.1 +\put {$\bullet$} at 98 91 +\putxerrorbar{98}{91}{7.5} +\putyerrorbar{98}{91}{11.6} +\put {} [b] <0mm,0.5\baselineskip> at 98 102.6 +\put {$\bullet$} at 294 17 +\putxerrorbar{294}{17}{11.2} +\putyerrorbar{294}{17}{7.5} +\put {} [b] <0mm,0.5\baselineskip> at 294 24.5 +\endpicture +% ...... end of pictex file generated by FastPicTeX ...... diff --git a/support/fastpictex/doc/manual/heading.fpt b/support/fastpictex/doc/manual/heading.fpt new file mode 100644 index 0000000000..5908e834de --- /dev/null +++ b/support/fastpictex/doc/manual/heading.fpt @@ -0,0 +1,24 @@ +% FastPicTeX input file +% 3 line graphs and 3 x-y graphs +heading \bf A chart plotted with \FastPiCTeX +type line +x 1 2 3 4 5 6 7 8 9 10 +y 89 94 103 120 150 180 176 187 167 178 +dy 9 11 13 8 14 9 12 11 10 13 +type line +x 1 2 3 4 5 6 7 8 9 10 +y 69 74 83 100 130 160 156 167 147 158 +dy 9 11 13 8 14 9 12 11 10 13 +type line +x 1 2 3 4 5 6 7 8 9 10 +y 49 54 63 80 110 140 136 147 127 138 +dy 9 11 13 8 14 9 12 11 10 13 +type xy +x 1 2 3 4 5 6 7 8 9 10 +y 89 94 103 120 150 180 176 187 167 178 +type xy +x 1 2 3 4 5 6 7 8 9 10 +y 69 74 83 100 130 160 156 167 147 158 +type xy +x 1 2 3 4 5 6 7 8 9 10 +y 49 54 63 80 110 140 136 147 127 138 diff --git a/support/fastpictex/doc/manual/heading.ltx b/support/fastpictex/doc/manual/heading.ltx new file mode 100644 index 0000000000..b26cd59f17 --- /dev/null +++ b/support/fastpictex/doc/manual/heading.ltx @@ -0,0 +1,167 @@ +% ...... start of pictex file generated by FastPicTeX ...... +\beginpicture +% ...... macros for errorbars ...... +\newcommand{\putxerrorbar}[3]{% +\dimen0=\Xdistance{#1} \dimen1=\Ydistance{#2} \dimen2=\Xdistance{#3} +\unitlength=1pt \setdimensionmode +\dimen3=\dimen0 \advance \dimen3 by -\dimen2 +\dimen4=\dimen0 \advance \dimen4 by \dimen2 +\dimen5=\dimen1 \advance \dimen5 by -1mm +\dimen6=\dimen1 \advance \dimen6 by 1mm +\putrule from {\dimen3} {\dimen1} to {\dimen4} {\dimen1} +\putrule from {\dimen3} {\dimen5} to {\dimen3} {\dimen6} +\putrule from {\dimen4} {\dimen5} to {\dimen4} {\dimen6} +\setcoordinatemode } +\newcommand{\putyerrorbar}[3]{% +\dimen0=\Xdistance{#1} \dimen1=\Ydistance{#2} \dimen2=\Ydistance{#3} +\unitlength=1pt \setdimensionmode +\dimen3=\dimen1 \advance \dimen3 by -\dimen2 +\dimen4=\dimen1 \advance \dimen4 by \dimen2 +\dimen5=\dimen0 \advance \dimen5 by -1mm +\dimen6=\dimen0 \advance \dimen6 by 1mm +\putrule from {\dimen0} {\dimen3} to {\dimen0} {\dimen4} +\putrule from {\dimen5} {\dimen3} to {\dimen6} {\dimen3} +\putrule from {\dimen5} {\dimen4} to {\dimen6} {\dimen4} +\setcoordinatemode } +\setcoordinatesystem units <0.6cm,0.0375cm> point at 0 0 +\setplotarea x from 0 to 10, y from 40 to 200 +% .......... axis ............ +\axis bottom label {} ticks numbered from 0 to 10 by 2.5 / +\axis left label {} ticks numbered from 40 to 200 by 40 / +% .......... heading ............ +\plotheading {\bf A chart plotted with \FastPiCTeX} +% .......... series ............. +\setlinear +\setsolid +\plot 1 89 2 94 3 103 4 120 5 150 6 180 7 176 8 187 9 167 10 178 / +\setsolid +\putyerrorbar{1}{89}{9} +\put {} [b] <0mm,0.5\baselineskip> at 1 98 +\putyerrorbar{2}{94}{11} +\put {} [b] <0mm,0.5\baselineskip> at 2 105 +\putyerrorbar{3}{103}{13} +\put {} [b] <0mm,0.5\baselineskip> at 3 116 +\putyerrorbar{4}{120}{8} +\put {} [b] <0mm,0.5\baselineskip> at 4 128 +\putyerrorbar{5}{150}{14} +\put {} [b] <0mm,0.5\baselineskip> at 5 164 +\putyerrorbar{6}{180}{9} +\put {} [b] <0mm,0.5\baselineskip> at 6 189 +\putyerrorbar{7}{176}{12} +\put {} [b] <0mm,0.5\baselineskip> at 7 188 +\putyerrorbar{8}{187}{11} +\put {} [b] <0mm,0.5\baselineskip> at 8 198 +\putyerrorbar{9}{167}{10} +\put {} [b] <0mm,0.5\baselineskip> at 9 177 +\putyerrorbar{10}{178}{13} +\put {} [b] <0mm,0.5\baselineskip> at 10 191 +\setlinear +\setdots +\plot 1 69 2 74 3 83 4 100 5 130 6 160 7 156 8 167 9 147 10 158 / +\setsolid +\putyerrorbar{1}{69}{9} +\put {} [b] <0mm,0.5\baselineskip> at 1 78 +\putyerrorbar{2}{74}{11} +\put {} [b] <0mm,0.5\baselineskip> at 2 85 +\putyerrorbar{3}{83}{13} +\put {} [b] <0mm,0.5\baselineskip> at 3 96 +\putyerrorbar{4}{100}{8} +\put {} [b] <0mm,0.5\baselineskip> at 4 108 +\putyerrorbar{5}{130}{14} +\put {} [b] <0mm,0.5\baselineskip> at 5 144 +\putyerrorbar{6}{160}{9} +\put {} [b] <0mm,0.5\baselineskip> at 6 169 +\putyerrorbar{7}{156}{12} +\put {} [b] <0mm,0.5\baselineskip> at 7 168 +\putyerrorbar{8}{167}{11} +\put {} [b] <0mm,0.5\baselineskip> at 8 178 +\putyerrorbar{9}{147}{10} +\put {} [b] <0mm,0.5\baselineskip> at 9 157 +\putyerrorbar{10}{158}{13} +\put {} [b] <0mm,0.5\baselineskip> at 10 171 +\setlinear +\setdashes +\plot 1 49 2 54 3 63 4 80 5 110 6 140 7 136 8 147 9 127 10 138 / +\setsolid +\putyerrorbar{1}{49}{9} +\put {} [b] <0mm,0.5\baselineskip> at 1 58 +\putyerrorbar{2}{54}{11} +\put {} [b] <0mm,0.5\baselineskip> at 2 65 +\putyerrorbar{3}{63}{13} +\put {} [b] <0mm,0.5\baselineskip> at 3 76 +\putyerrorbar{4}{80}{8} +\put {} [b] <0mm,0.5\baselineskip> at 4 88 +\putyerrorbar{5}{110}{14} +\put {} [b] <0mm,0.5\baselineskip> at 5 124 +\putyerrorbar{6}{140}{9} +\put {} [b] <0mm,0.5\baselineskip> at 6 149 +\putyerrorbar{7}{136}{12} +\put {} [b] <0mm,0.5\baselineskip> at 7 148 +\putyerrorbar{8}{147}{11} +\put {} [b] <0mm,0.5\baselineskip> at 8 158 +\putyerrorbar{9}{127}{10} +\put {} [b] <0mm,0.5\baselineskip> at 9 137 +\putyerrorbar{10}{138}{13} +\put {} [b] <0mm,0.5\baselineskip> at 10 151 +\put {$\bullet$} at 1 89 +\put {} [b] <0mm,0.5\baselineskip> at 1 89 +\put {$\bullet$} at 2 94 +\put {} [b] <0mm,0.5\baselineskip> at 2 94 +\put {$\bullet$} at 3 103 +\put {} [b] <0mm,0.5\baselineskip> at 3 103 +\put {$\bullet$} at 4 120 +\put {} [b] <0mm,0.5\baselineskip> at 4 120 +\put {$\bullet$} at 5 150 +\put {} [b] <0mm,0.5\baselineskip> at 5 150 +\put {$\bullet$} at 6 180 +\put {} [b] <0mm,0.5\baselineskip> at 6 180 +\put {$\bullet$} at 7 176 +\put {} [b] <0mm,0.5\baselineskip> at 7 176 +\put {$\bullet$} at 8 187 +\put {} [b] <0mm,0.5\baselineskip> at 8 187 +\put {$\bullet$} at 9 167 +\put {} [b] <0mm,0.5\baselineskip> at 9 167 +\put {$\bullet$} at 10 178 +\put {} [b] <0mm,0.5\baselineskip> at 10 178 +\put {$\circ$} at 1 69 +\put {} [b] <0mm,0.5\baselineskip> at 1 69 +\put {$\circ$} at 2 74 +\put {} [b] <0mm,0.5\baselineskip> at 2 74 +\put {$\circ$} at 3 83 +\put {} [b] <0mm,0.5\baselineskip> at 3 83 +\put {$\circ$} at 4 100 +\put {} [b] <0mm,0.5\baselineskip> at 4 100 +\put {$\circ$} at 5 130 +\put {} [b] <0mm,0.5\baselineskip> at 5 130 +\put {$\circ$} at 6 160 +\put {} [b] <0mm,0.5\baselineskip> at 6 160 +\put {$\circ$} at 7 156 +\put {} [b] <0mm,0.5\baselineskip> at 7 156 +\put {$\circ$} at 8 167 +\put {} [b] <0mm,0.5\baselineskip> at 8 167 +\put {$\circ$} at 9 147 +\put {} [b] <0mm,0.5\baselineskip> at 9 147 +\put {$\circ$} at 10 158 +\put {} [b] <0mm,0.5\baselineskip> at 10 158 +\put {$\diamond$} at 1 49 +\put {} [b] <0mm,0.5\baselineskip> at 1 49 +\put {$\diamond$} at 2 54 +\put {} [b] <0mm,0.5\baselineskip> at 2 54 +\put {$\diamond$} at 3 63 +\put {} [b] <0mm,0.5\baselineskip> at 3 63 +\put {$\diamond$} at 4 80 +\put {} [b] <0mm,0.5\baselineskip> at 4 80 +\put {$\diamond$} at 5 110 +\put {} [b] <0mm,0.5\baselineskip> at 5 110 +\put {$\diamond$} at 6 140 +\put {} [b] <0mm,0.5\baselineskip> at 6 140 +\put {$\diamond$} at 7 136 +\put {} [b] <0mm,0.5\baselineskip> at 7 136 +\put {$\diamond$} at 8 147 +\put {} [b] <0mm,0.5\baselineskip> at 8 147 +\put {$\diamond$} at 9 127 +\put {} [b] <0mm,0.5\baselineskip> at 9 127 +\put {$\diamond$} at 10 138 +\put {} [b] <0mm,0.5\baselineskip> at 10 138 +\endpicture +% ...... end of pictex file generated by FastPicTeX ...... diff --git a/support/fastpictex/doc/manual/legend.fpt b/support/fastpictex/doc/manual/legend.fpt new file mode 100644 index 0000000000..6ec92ec6e7 --- /dev/null +++ b/support/fastpictex/doc/manual/legend.fpt @@ -0,0 +1,24 @@ +% Example for using legends +size 6.5 6 +heading \bf VLF blood pressure variability +xlabel Weeks on high-salt diet +ylabel mmHg$^2$ +% SHR-SP +legend SHR-SP, n=34 +type bar +xticlabels 3-5 6-7 +x 1 2 +y 14.317 16.040 +dy 1.549 1.942 +% SHR-SR +legend SHR-SR, n=37 +type bar +x 1 2 +y 12.850 19.608"*" +dy 1.390 1.935 +% NT-WKY +legend NT-WKY, n=27 +type bar +x 1 2 +y 6.374 8.466 +dy 1.026 1.031 diff --git a/support/fastpictex/doc/manual/legend.ltx b/support/fastpictex/doc/manual/legend.ltx new file mode 100644 index 0000000000..2cdaae83d9 --- /dev/null +++ b/support/fastpictex/doc/manual/legend.ltx @@ -0,0 +1,75 @@ +% ...... start of pictex file generated by FastPicTeX ...... +\beginpicture +% ...... macros for errorbars ...... +\newcommand{\putxerrorbar}[3]{% +\dimen0=\Xdistance{#1} \dimen1=\Ydistance{#2} \dimen2=\Xdistance{#3} +\unitlength=1pt \setdimensionmode +\dimen3=\dimen0 \advance \dimen3 by -\dimen2 +\dimen4=\dimen0 \advance \dimen4 by \dimen2 +\dimen5=\dimen1 \advance \dimen5 by -1mm +\dimen6=\dimen1 \advance \dimen6 by 1mm +\putrule from {\dimen3} {\dimen1} to {\dimen4} {\dimen1} +\putrule from {\dimen3} {\dimen5} to {\dimen3} {\dimen6} +\putrule from {\dimen4} {\dimen5} to {\dimen4} {\dimen6} +\setcoordinatemode } +\newcommand{\putyerrorbar}[3]{% +\dimen0=\Xdistance{#1} \dimen1=\Ydistance{#2} \dimen2=\Ydistance{#3} +\unitlength=1pt \setdimensionmode +\dimen3=\dimen1 \advance \dimen3 by -\dimen2 +\dimen4=\dimen1 \advance \dimen4 by \dimen2 +\dimen5=\dimen0 \advance \dimen5 by -1mm +\dimen6=\dimen0 \advance \dimen6 by 1mm +\putrule from {\dimen0} {\dimen3} to {\dimen0} {\dimen4} +\putrule from {\dimen5} {\dimen3} to {\dimen6} {\dimen3} +\putrule from {\dimen5} {\dimen4} to {\dimen6} {\dimen4} +\setcoordinatemode } +\setcoordinatesystem units <2.16667cm,0.3cm> point at 0 0 +\setplotarea x from 0 to 3, y from 5 to 25 +% .......... axis ............ +\axis bottom label {Weeks on high-salt diet} ticks withvalues {} {3-5} {6-7} {} / +quantity 4 / +\axis left label {mmHg$^2$} ticks numbered from 5 to 25 by 5 / +% .......... heading ............ +\plotheading {\bf VLF blood pressure variability} +% .......... series ............. +\shaderectanglesoff +\putrectangle corners at 0.6 5 and 0.866667 14.317 +\putrectangle corners at 1.6 5 and 1.86667 16.04 +\putyerrorbar{0.733333}{14.317}{1.549} +\put {} [b] <0mm,0.5\baselineskip> at 0.733333 15.866 +\putyerrorbar{1.73333}{16.04}{1.942} +\put {} [b] <0mm,0.5\baselineskip> at 1.73333 17.982 +\shaderectangleson +\setshadegrid span <1mm> +\putrectangle corners at 0.866667 5 and 1.13333 12.85 +\putrectangle corners at 1.86667 5 and 2.13333 19.608 +\putyerrorbar{1}{12.85}{1.39} +\put {} [b] <0mm,0.5\baselineskip> at 1 14.24 +\putyerrorbar{2}{19.608}{1.935} +\put {*} [b] <0mm,0.5\baselineskip> at 2 21.543 +\shaderectanglesoff% +\dimen0=\linethickness% +%look here +\setlength{\linethickness}{0.577778cm}% +\putrule from 1.26667 5 to 1.26667 6.374 +\putrule from 2.26667 5 to 2.26667 8.466 +\setlength{\linethickness}{\dimen0}% +\putyerrorbar{1.26667}{6.374}{1.026} +\put {} [b] <0mm,0.5\baselineskip> at 1.26667 7.4 +\putyerrorbar{2.26667}{8.466}{1.031} +\put {} [b] <0mm,0.5\baselineskip> at 2.26667 9.497 +\shaderectanglesoff +\putrectangle <2.5mm,-0ex> corners at 3 25 and 3.13846 24 +\put {SHR-SP, n=34} [l,c] <1cm,-1ex> at 3 25 +\shaderectangleson +\setshadegrid span <1mm> +\putrectangle <2.5mm,-2.5ex> corners at 3 25 and 3.13846 24 +\put {SHR-SR, n=37} [l,c] <1cm,-3.5ex> at 3 25 +\shaderectanglesoff% +\dimen0=\linethickness% +\setlength{\linethickness}{3mm}% +\putrule <4mm,-5ex> from 3 25 to 3 24 +\setlength{\linethickness}{\dimen0}% +\put {NT-WKY, n=27} [l,c] <1cm,-6ex> at 3 25 +\endpicture +% ...... end of pictex file generated by FastPicTeX ...... diff --git a/support/fastpictex/doc/manual/linegraph.fpt b/support/fastpictex/doc/manual/linegraph.fpt new file mode 100644 index 0000000000..2f67f5e64e --- /dev/null +++ b/support/fastpictex/doc/manual/linegraph.fpt @@ -0,0 +1,5 @@ +type line +x 1 2 3 4 5 + 6 7 8 9 10 +y 95 100 110 95 105 + 110 120 125 145 160 diff --git a/support/fastpictex/doc/manual/linegraph.ltx b/support/fastpictex/doc/manual/linegraph.ltx new file mode 100644 index 0000000000..c7778330ba --- /dev/null +++ b/support/fastpictex/doc/manual/linegraph.ltx @@ -0,0 +1,26 @@ +% ...... start of pictex file generated by FastPicTeX ...... +\beginpicture +\setcoordinatesystem units <0.6cm,0.075cm> point at 0 0 +\setplotarea x from 0 to 10, y from 80 to 160 +% .......... axis ............ +\axis bottom label {} ticks numbered from 0 to 10 by 2.5 / +\axis left label {} ticks numbered from 80 to 160 by 20 / +% .......... heading ............ +\plotheading {} +% .......... series ............. +\setlinear +\setsolid +\plot 1 95 2 100 3 110 4 95 5 105 6 110 7 120 8 125 9 145 10 160 / +\setsolid +\put {} [b] <0mm,0.5\baselineskip> at 1 95 +\put {} [b] <0mm,0.5\baselineskip> at 2 100 +\put {} [b] <0mm,0.5\baselineskip> at 3 110 +\put {} [b] <0mm,0.5\baselineskip> at 4 95 +\put {} [b] <0mm,0.5\baselineskip> at 5 105 +\put {} [b] <0mm,0.5\baselineskip> at 6 110 +\put {} [b] <0mm,0.5\baselineskip> at 7 120 +\put {} [b] <0mm,0.5\baselineskip> at 8 125 +\put {} [b] <0mm,0.5\baselineskip> at 9 145 +\put {} [b] <0mm,0.5\baselineskip> at 10 160 +\endpicture +% ...... end of pictex file generated by FastPicTeX ...... diff --git a/support/fastpictex/doc/manual/mixgraph.fpt b/support/fastpictex/doc/manual/mixgraph.fpt new file mode 100644 index 0000000000..94edabe294 --- /dev/null +++ b/support/fastpictex/doc/manual/mixgraph.fpt @@ -0,0 +1,11 @@ +% first, the XY-Graph with 5 data points +type xy +x 1 2 3 4 5 +y 9 12 15 17 19 +% there are standard errors for the x and y-values +dx 0.5 0.6 0.4 0.5 0.7 +dy 0.8 0.9 1.2 2.0 2.4 +% here comes the line graph +type line +x 1 2 3 4 5 +y 9 12 15 17 19 diff --git a/support/fastpictex/doc/manual/mixgraph.ltx b/support/fastpictex/doc/manual/mixgraph.ltx new file mode 100644 index 0000000000..8b0e6ac564 --- /dev/null +++ b/support/fastpictex/doc/manual/mixgraph.ltx @@ -0,0 +1,64 @@ +% ...... start of pictex file generated by FastPicTeX ...... +\beginpicture +% ...... macros for errorbars ...... +\newcommand{\putxerrorbar}[3]{% +\dimen0=\Xdistance{#1} \dimen1=\Ydistance{#2} \dimen2=\Xdistance{#3} +\unitlength=1pt \setdimensionmode +\dimen3=\dimen0 \advance \dimen3 by -\dimen2 +\dimen4=\dimen0 \advance \dimen4 by \dimen2 +\dimen5=\dimen1 \advance \dimen5 by -1mm +\dimen6=\dimen1 \advance \dimen6 by 1mm +\putrule from {\dimen3} {\dimen1} to {\dimen4} {\dimen1} +\putrule from {\dimen3} {\dimen5} to {\dimen3} {\dimen6} +\putrule from {\dimen4} {\dimen5} to {\dimen4} {\dimen6} +\setcoordinatemode } +\newcommand{\putyerrorbar}[3]{% +\dimen0=\Xdistance{#1} \dimen1=\Ydistance{#2} \dimen2=\Ydistance{#3} +\unitlength=1pt \setdimensionmode +\dimen3=\dimen1 \advance \dimen3 by -\dimen2 +\dimen4=\dimen1 \advance \dimen4 by \dimen2 +\dimen5=\dimen0 \advance \dimen5 by -1mm +\dimen6=\dimen0 \advance \dimen6 by 1mm +\putrule from {\dimen0} {\dimen3} to {\dimen0} {\dimen4} +\putrule from {\dimen5} {\dimen3} to {\dimen6} {\dimen3} +\putrule from {\dimen5} {\dimen4} to {\dimen6} {\dimen4} +\setcoordinatemode } +\setcoordinatesystem units <0.9375cm,0.375cm> point at 0 0 +\setplotarea x from 0 to 6.4, y from 8 to 24 +% .......... axis ............ +\axis bottom label {} ticks numbered from 0 to 6.4 by 1.6 / +\axis left label {} ticks numbered from 8 to 24 by 4 / +% .......... heading ............ +\plotheading {} +% .......... series ............. +\put {$\bullet$} at 1 9 +\putxerrorbar{1}{9}{0.5} +\putyerrorbar{1}{9}{0.8} +\put {} [b] <0mm,0.5\baselineskip> at 1 9.8 +\put {$\bullet$} at 2 12 +\putxerrorbar{2}{12}{0.6} +\putyerrorbar{2}{12}{0.9} +\put {} [b] <0mm,0.5\baselineskip> at 2 12.9 +\put {$\bullet$} at 3 15 +\putxerrorbar{3}{15}{0.4} +\putyerrorbar{3}{15}{1.2} +\put {} [b] <0mm,0.5\baselineskip> at 3 16.2 +\put {$\bullet$} at 4 17 +\putxerrorbar{4}{17}{0.5} +\putyerrorbar{4}{17}{2} +\put {} [b] <0mm,0.5\baselineskip> at 4 19 +\put {$\bullet$} at 5 19 +\putxerrorbar{5}{19}{0.7} +\putyerrorbar{5}{19}{2.4} +\put {} [b] <0mm,0.5\baselineskip> at 5 21.4 +\setlinear +\setsolid +\plot 1 9 2 12 3 15 4 17 5 19 / +\setsolid +\put {} [b] <0mm,0.5\baselineskip> at 1 9 +\put {} [b] <0mm,0.5\baselineskip> at 2 12 +\put {} [b] <0mm,0.5\baselineskip> at 3 15 +\put {} [b] <0mm,0.5\baselineskip> at 4 17 +\put {} [b] <0mm,0.5\baselineskip> at 5 19 +\endpicture +% ...... end of pictex file generated by FastPicTeX ...... diff --git a/support/fastpictex/doc/manual/pictex-command.fpt b/support/fastpictex/doc/manual/pictex-command.fpt new file mode 100644 index 0000000000..6a5fb73088 --- /dev/null +++ b/support/fastpictex/doc/manual/pictex-command.fpt @@ -0,0 +1,29 @@ +% example showing the use of pictex commands +size 5 3 +heading Blood pressure on 5 consecutive days +xlabel Days +ylabel mmHg +% xy graph for male subjects +type xy +xticlabels 1 2 3 4 5 +x 1 2 3 4 5 +y 105 96 150 87 98 +dy 10 9 13 5 7 +legend male subjects, n=9 +% xy graph for female subjects +type xy +x 1 2 3 4 5 +y 85 92 80 95 90 +dy 7 8 9 10 7 +legend female subjects, n=7 +% line graph for male subjects +type line +x 1 2 3 4 5 +y 105 96 150 87 98 +% line graph for female subjects +type line +x 1 2 3 4 5 +y 85 92 80 95 90 +% here are the pictex commands +pictex \arrow <3mm> [0.2,0.67] from 3.5 160 to 3.1 150 +pictex \put {artifact} [lc] at 3.6 160 diff --git a/support/fastpictex/doc/manual/pictex-command.ltx b/support/fastpictex/doc/manual/pictex-command.ltx new file mode 100644 index 0000000000..a0b567edba --- /dev/null +++ b/support/fastpictex/doc/manual/pictex-command.ltx @@ -0,0 +1,90 @@ +% ...... start of pictex file generated by FastPicTeX ...... +\beginpicture +% ...... macros for errorbars ...... +\newcommand{\putxerrorbar}[3]{% +\dimen0=\Xdistance{#1} \dimen1=\Ydistance{#2} \dimen2=\Xdistance{#3} +\unitlength=1pt \setdimensionmode +\dimen3=\dimen0 \advance \dimen3 by -\dimen2 +\dimen4=\dimen0 \advance \dimen4 by \dimen2 +\dimen5=\dimen1 \advance \dimen5 by -1mm +\dimen6=\dimen1 \advance \dimen6 by 1mm +\putrule from {\dimen3} {\dimen1} to {\dimen4} {\dimen1} +\putrule from {\dimen3} {\dimen5} to {\dimen3} {\dimen6} +\putrule from {\dimen4} {\dimen5} to {\dimen4} {\dimen6} +\setcoordinatemode } +\newcommand{\putyerrorbar}[3]{% +\dimen0=\Xdistance{#1} \dimen1=\Ydistance{#2} \dimen2=\Ydistance{#3} +\unitlength=1pt \setdimensionmode +\dimen3=\dimen1 \advance \dimen3 by -\dimen2 +\dimen4=\dimen1 \advance \dimen4 by \dimen2 +\dimen5=\dimen0 \advance \dimen5 by -1mm +\dimen6=\dimen0 \advance \dimen6 by 1mm +\putrule from {\dimen0} {\dimen3} to {\dimen0} {\dimen4} +\putrule from {\dimen5} {\dimen3} to {\dimen6} {\dimen3} +\putrule from {\dimen5} {\dimen4} to {\dimen6} {\dimen4} +\setcoordinatemode } +\setcoordinatesystem units <0.833333cm,0.024cm> point at 0 0 +\setplotarea x from 0 to 6, y from 50 to 175 +% .......... axis ............ +\axis bottom label {Days} ticks withvalues {} {1} {2} {3} {4} {5} {} / +quantity 7 / +\axis left label {mmHg} ticks numbered from 50 to 175 by 25 / +% .......... heading ............ +\plotheading {Blood pressure on 5 consecutive days} +% .......... series ............. +\put {$\bullet$} at 1 105 +\putyerrorbar{1}{105}{10} +\put {} [b] <0mm,0.5\baselineskip> at 1 115 +\put {$\bullet$} at 2 96 +\putyerrorbar{2}{96}{9} +\put {} [b] <0mm,0.5\baselineskip> at 2 105 +\put {$\bullet$} at 3 150 +\putyerrorbar{3}{150}{13} +\put {} [b] <0mm,0.5\baselineskip> at 3 163 +\put {$\bullet$} at 4 87 +\putyerrorbar{4}{87}{5} +\put {} [b] <0mm,0.5\baselineskip> at 4 92 +\put {$\bullet$} at 5 98 +\putyerrorbar{5}{98}{7} +\put {} [b] <0mm,0.5\baselineskip> at 5 105 +\put {$\circ$} at 1 85 +\putyerrorbar{1}{85}{7} +\put {} [b] <0mm,0.5\baselineskip> at 1 92 +\put {$\circ$} at 2 92 +\putyerrorbar{2}{92}{8} +\put {} [b] <0mm,0.5\baselineskip> at 2 100 +\put {$\circ$} at 3 80 +\putyerrorbar{3}{80}{9} +\put {} [b] <0mm,0.5\baselineskip> at 3 89 +\put {$\circ$} at 4 95 +\putyerrorbar{4}{95}{10} +\put {} [b] <0mm,0.5\baselineskip> at 4 105 +\put {$\circ$} at 5 90 +\putyerrorbar{5}{90}{7} +\put {} [b] <0mm,0.5\baselineskip> at 5 97 +\setlinear +\setsolid +\plot 1 105 2 96 3 150 4 87 5 98 / +\setsolid +\put {} [b] <0mm,0.5\baselineskip> at 1 105 +\put {} [b] <0mm,0.5\baselineskip> at 2 96 +\put {} [b] <0mm,0.5\baselineskip> at 3 150 +\put {} [b] <0mm,0.5\baselineskip> at 4 87 +\put {} [b] <0mm,0.5\baselineskip> at 5 98 +\setlinear +\setdots +\plot 1 85 2 92 3 80 4 95 5 90 / +\setsolid +\put {} [b] <0mm,0.5\baselineskip> at 1 85 +\put {} [b] <0mm,0.5\baselineskip> at 2 92 +\put {} [b] <0mm,0.5\baselineskip> at 3 80 +\put {} [b] <0mm,0.5\baselineskip> at 4 95 +\put {} [b] <0mm,0.5\baselineskip> at 5 90 +\put {$\bullet$} [ct] <0.4cm,-1ex> at 6 175 +\put {male subjects, n=9} [l,c] <1cm,-1ex> at 6 175 +\put {$\circ$} [ct] <0.4cm,-3.5ex> at 6 175 +\put {female subjects, n=7} [l,c] <1cm,-3.5ex> at 6 175 +\arrow <3mm> [0.2,0.67] from 3.5 160 to 3.1 150 +\put {artifact} [lc] at 3.6 160 +\endpicture +% ...... end of pictex file generated by FastPicTeX ...... diff --git a/support/fastpictex/doc/manual/size.fpt b/support/fastpictex/doc/manual/size.fpt new file mode 100644 index 0000000000..ac5cb08d93 --- /dev/null +++ b/support/fastpictex/doc/manual/size.fpt @@ -0,0 +1,9 @@ +size 10 5 +type bar +x +y 43 56 34 67 98 +dy 4 5 4 7 10 +type bar +x +y 21 23 12 29 50 +dy 2 3 1 2.5 4.3 diff --git a/support/fastpictex/doc/manual/size.ltx b/support/fastpictex/doc/manual/size.ltx new file mode 100644 index 0000000000..18e3c48977 --- /dev/null +++ b/support/fastpictex/doc/manual/size.ltx @@ -0,0 +1,70 @@ +% ...... start of pictex file generated by FastPicTeX ...... +\beginpicture +% ...... macros for errorbars ...... +\newcommand{\putxerrorbar}[3]{% +\dimen0=\Xdistance{#1} \dimen1=\Ydistance{#2} \dimen2=\Xdistance{#3} +\unitlength=1pt \setdimensionmode +\dimen3=\dimen0 \advance \dimen3 by -\dimen2 +\dimen4=\dimen0 \advance \dimen4 by \dimen2 +\dimen5=\dimen1 \advance \dimen5 by -1mm +\dimen6=\dimen1 \advance \dimen6 by 1mm +\putrule from {\dimen3} {\dimen1} to {\dimen4} {\dimen1} +\putrule from {\dimen3} {\dimen5} to {\dimen3} {\dimen6} +\putrule from {\dimen4} {\dimen5} to {\dimen4} {\dimen6} +\setcoordinatemode } +\newcommand{\putyerrorbar}[3]{% +\dimen0=\Xdistance{#1} \dimen1=\Ydistance{#2} \dimen2=\Ydistance{#3} +\unitlength=1pt \setdimensionmode +\dimen3=\dimen1 \advance \dimen3 by -\dimen2 +\dimen4=\dimen1 \advance \dimen4 by \dimen2 +\dimen5=\dimen0 \advance \dimen5 by -1mm +\dimen6=\dimen0 \advance \dimen6 by 1mm +\putrule from {\dimen0} {\dimen3} to {\dimen0} {\dimen4} +\putrule from {\dimen5} {\dimen3} to {\dimen6} {\dimen3} +\putrule from {\dimen5} {\dimen4} to {\dimen6} {\dimen4} +\setcoordinatemode } +\setcoordinatesystem units <1.66667cm,0.05cm> point at 0 0 +\setplotarea x from 0 to 6, y from 0 to 100 +% .......... axis ............ +\axis bottom label {} ticks numbered from 0 to 6 by 1 / +\axis left label {} ticks numbered from 0 to 100 by 25 / +% .......... heading ............ +\plotheading {} +% .......... series ............. +\shaderectanglesoff +\putrectangle corners at 0.6 0 and 1 43 +\putrectangle corners at 1.6 0 and 2 56 +\putrectangle corners at 2.6 0 and 3 34 +\putrectangle corners at 3.6 0 and 4 67 +\putrectangle corners at 4.6 0 and 5 98 +\putyerrorbar{0.8}{43}{4} +\put {} [b] <0mm,0.5\baselineskip> at 0.8 47 +\putyerrorbar{1.8}{56}{5} +\put {} [b] <0mm,0.5\baselineskip> at 1.8 61 +\putyerrorbar{2.8}{34}{4} +\put {} [b] <0mm,0.5\baselineskip> at 2.8 38 +\putyerrorbar{3.8}{67}{7} +\put {} [b] <0mm,0.5\baselineskip> at 3.8 74 +\putyerrorbar{4.8}{98}{10} +\put {} [b] <0mm,0.5\baselineskip> at 4.8 108 +\shaderectanglesoff% +\dimen0=\linethickness% +\setlength{\linethickness}{\Xdistance{0.4}}% +\putrule from 1.2 0 to 1.2 21 +\putrule from 2.2 0 to 2.2 23 +\putrule from 3.2 0 to 3.2 12 +\putrule from 4.2 0 to 4.2 29 +\putrule from 5.2 0 to 5.2 50 +\setlength{\linethickness}{\dimen0}% +\putyerrorbar{1.2}{21}{2} +\put {} [b] <0mm,0.5\baselineskip> at 1.2 23 +\putyerrorbar{2.2}{23}{3} +\put {} [b] <0mm,0.5\baselineskip> at 2.2 26 +\putyerrorbar{3.2}{12}{1} +\put {} [b] <0mm,0.5\baselineskip> at 3.2 13 +\putyerrorbar{4.2}{29}{2.5} +\put {} [b] <0mm,0.5\baselineskip> at 4.2 31.5 +\putyerrorbar{5.2}{50}{4.3} +\put {} [b] <0mm,0.5\baselineskip> at 5.2 54.3 +\endpicture +% ...... end of pictex file generated by FastPicTeX ...... diff --git a/support/fastpictex/doc/manual/tline_complex.fpt b/support/fastpictex/doc/manual/tline_complex.fpt new file mode 100644 index 0000000000..fec2e954e7 --- /dev/null +++ b/support/fastpictex/doc/manual/tline_complex.fpt @@ -0,0 +1,44 @@ +% ...... start of FastPicTeX file generated by WinStat ...... +size 8 6 +heading VLF$_{SYS}$ BPV depends on BP$_{SYS}$ +xlabel BP$_{SYS}$ (mmHg) +ylabel \begin{sideways}VLF$_{SYS}$ BPV (mmHg$^2$)\end{sideways} +type xy +x 125.893 122.068 129.876 137.412 118.674 113.696 125.006 125.461 + 129.847 118.953 108.51 121.579 119.482 98.8476 142.496 164.389 + 123.95 115.166 132.47 144.27 133.035 133.055 154.599 122.92 + 128.499 113.579 131.072 162.442 133.192 +y 3.16042 8.83067 4.33801 4.30591 5.64648 2.07347 3.18186 11.9516 + 13.1928 13.1314 4.47767 6.47536 5.14432 3.32263 9.65716 13.0522 + 7.31404 4.58229 3.1139 10.7105 9.02321 11.5118 8.58124 2.42624 + 15.1649 7.05125 7.86681 32.3106 6.79882 +tline 2 +legend NT-WKY +type xy +x 161.619 138.333 162.657 150.394 137.663 149.359 174.344 160.004 + 154.035 136.879 172.018 169.222 227.833 166.556 203.363 217.97 + 163.901 295.961 233.824 182.005 187.982 162.076 191.837 191.716 + 201.59 190.45 172.915 182.429 171.276 199.674 219.954 209.391 + 169.779 234.883 184.092 +y 17.7748 12.148 10.9592 19.431 10.0629 12.2948 21.5984 9.37904 + 6.58417 6.21308 6.58108 7.00912 25.9094 19.3779 15.4613 22.1531 + 20.4522 39.1079 22.859 8.29836 10.9897 18.1887 18.8228 10.0569 + 5.96681 18.7384 18.2352 19.3519 10.1097 9.25416 12.3193 9.41323 + 18.1815 22.7927 20.5234 +tline 2 +legend SHR-SP +type xy +x 155.103 165.38 157.281 146.894 158.771 156.589 137.863 144.211 + 178.065 159.785 158.811 154.489 199.687 188.904 165.341 216.809 + 210.534 175.404 140.475 165.759 191.806 200.337 149.956 160.635 + 160.436 158.153 148.533 186.501 177.38 182.737 190.26 197.757 + 183.722 170.007 175.68 178.303 176.472 152.316 176.31 218.141 + 177.818 214.449 +y 14.9306 13.1478 6.61684 13.5918 4.40486 11.2899 7.47633 17.5322 + 10.7203 11.9356 9.76152 9.30846 26.6367 11.8641 18.5761 15.7852 + 6.0273 13.084 14.2488 14.1349 20.4315 26.9903 19.4544 18.804 + 16.8563 18.362 10.1395 18.812 24.282 33.2353 20.3219 32.5691 + 28.7122 7.79271 11.1581 17.3146 16.3072 11.7142 13.3719 24.9269 + 33.4572 14.6539 +tline 2 +legend SHR-SR diff --git a/support/fastpictex/doc/manual/tline_complex.ltx b/support/fastpictex/doc/manual/tline_complex.ltx new file mode 100644 index 0000000000..993470234a --- /dev/null +++ b/support/fastpictex/doc/manual/tline_complex.ltx @@ -0,0 +1,252 @@ +% ...... start of pictex file generated by FastPicTeX ...... +\beginpicture +\setcoordinatesystem units <0.032cm,0.15cm> point at 0 0 +\setplotarea x from 50 to 300, y from 0 to 40 +% .......... axis ............ +\axis bottom label {BP$_{SYS}$ (mmHg)} ticks numbered from 50 to 300 by 50 / +\axis left label {\begin{sideways}VLF$_{SYS}$ BPV (mmHg$^2$)\end{sideways}} ticks numbered from 0 to 40 by 10 / +% .......... heading ............ +\plotheading {VLF$_{SYS}$ BPV depends on BP$_{SYS}$} +% .......... series ............. +\put {$\bullet$} at 125.892998 3.160420 +\put {} [b] <0mm,0.5\baselineskip> at 125.892998 3.160420 +\put {$\bullet$} at 122.068001 8.830670 +\put {} [b] <0mm,0.5\baselineskip> at 122.068001 8.830670 +\put {$\bullet$} at 129.876007 4.338010 +\put {} [b] <0mm,0.5\baselineskip> at 129.876007 4.338010 +\put {$\bullet$} at 137.412003 4.305910 +\put {} [b] <0mm,0.5\baselineskip> at 137.412003 4.305910 +\put {$\bullet$} at 118.674004 5.646480 +\put {} [b] <0mm,0.5\baselineskip> at 118.674004 5.646480 +\put {$\bullet$} at 113.695999 2.073470 +\put {} [b] <0mm,0.5\baselineskip> at 113.695999 2.073470 +\put {$\bullet$} at 125.005997 3.181860 +\put {} [b] <0mm,0.5\baselineskip> at 125.005997 3.181860 +\put {$\bullet$} at 125.460999 11.951600 +\put {} [b] <0mm,0.5\baselineskip> at 125.460999 11.951600 +\put {$\bullet$} at 129.847000 13.192800 +\put {} [b] <0mm,0.5\baselineskip> at 129.847000 13.192800 +\put {$\bullet$} at 118.953003 13.131400 +\put {} [b] <0mm,0.5\baselineskip> at 118.953003 13.131400 +\put {$\bullet$} at 108.510002 4.477670 +\put {} [b] <0mm,0.5\baselineskip> at 108.510002 4.477670 +\put {$\bullet$} at 121.579002 6.475360 +\put {} [b] <0mm,0.5\baselineskip> at 121.579002 6.475360 +\put {$\bullet$} at 119.482002 5.144320 +\put {} [b] <0mm,0.5\baselineskip> at 119.482002 5.144320 +\put {$\bullet$} at 98.847603 3.322630 +\put {} [b] <0mm,0.5\baselineskip> at 98.847603 3.322630 +\put {$\bullet$} at 142.496002 9.657160 +\put {} [b] <0mm,0.5\baselineskip> at 142.496002 9.657160 +\put {$\bullet$} at 164.389008 13.052200 +\put {} [b] <0mm,0.5\baselineskip> at 164.389008 13.052200 +\put {$\bullet$} at 123.949997 7.314040 +\put {} [b] <0mm,0.5\baselineskip> at 123.949997 7.314040 +\put {$\bullet$} at 115.166000 4.582290 +\put {} [b] <0mm,0.5\baselineskip> at 115.166000 4.582290 +\put {$\bullet$} at 132.470001 3.113900 +\put {} [b] <0mm,0.5\baselineskip> at 132.470001 3.113900 +\put {$\bullet$} at 144.270004 10.710500 +\put {} [b] <0mm,0.5\baselineskip> at 144.270004 10.710500 +\put {$\bullet$} at 133.035004 9.023210 +\put {} [b] <0mm,0.5\baselineskip> at 133.035004 9.023210 +\put {$\bullet$} at 133.054993 11.511800 +\put {} [b] <0mm,0.5\baselineskip> at 133.054993 11.511800 +\put {$\bullet$} at 154.598999 8.581240 +\put {} [b] <0mm,0.5\baselineskip> at 154.598999 8.581240 +\put {$\bullet$} at 122.919998 2.426240 +\put {} [b] <0mm,0.5\baselineskip> at 122.919998 2.426240 +\put {$\bullet$} at 128.498993 15.164900 +\put {} [b] <0mm,0.5\baselineskip> at 128.498993 15.164900 +\put {$\bullet$} at 113.579002 7.051250 +\put {} [b] <0mm,0.5\baselineskip> at 113.579002 7.051250 +\put {$\bullet$} at 131.072006 7.866810 +\put {} [b] <0mm,0.5\baselineskip> at 131.072006 7.866810 +\put {$\bullet$} at 162.442001 32.310600 +\put {} [b] <0mm,0.5\baselineskip> at 162.442001 32.310600 +\put {$\bullet$} at 133.192001 6.798820 +\put {} [b] <0mm,0.5\baselineskip> at 133.192001 6.798820 +\setlinear +\setsolid +\plot 94.553551 0.000001 260.391754 40.000002 / +\put {$\circ$} at 161.619003 17.774799 +\put {} [b] <0mm,0.5\baselineskip> at 161.619003 17.774799 +\put {$\circ$} at 138.332993 12.148000 +\put {} [b] <0mm,0.5\baselineskip> at 138.332993 12.148000 +\put {$\circ$} at 162.656998 10.959200 +\put {} [b] <0mm,0.5\baselineskip> at 162.656998 10.959200 +\put {$\circ$} at 150.393997 19.431000 +\put {} [b] <0mm,0.5\baselineskip> at 150.393997 19.431000 +\put {$\circ$} at 137.662994 10.062900 +\put {} [b] <0mm,0.5\baselineskip> at 137.662994 10.062900 +\put {$\circ$} at 149.358994 12.294800 +\put {} [b] <0mm,0.5\baselineskip> at 149.358994 12.294800 +\put {$\circ$} at 174.343994 21.598400 +\put {} [b] <0mm,0.5\baselineskip> at 174.343994 21.598400 +\put {$\circ$} at 160.003998 9.379040 +\put {} [b] <0mm,0.5\baselineskip> at 160.003998 9.379040 +\put {$\circ$} at 154.035004 6.584170 +\put {} [b] <0mm,0.5\baselineskip> at 154.035004 6.584170 +\put {$\circ$} at 136.878998 6.213080 +\put {} [b] <0mm,0.5\baselineskip> at 136.878998 6.213080 +\put {$\circ$} at 172.018005 6.581080 +\put {} [b] <0mm,0.5\baselineskip> at 172.018005 6.581080 +\put {$\circ$} at 169.222000 7.009120 +\put {} [b] <0mm,0.5\baselineskip> at 169.222000 7.009120 +\put {$\circ$} at 227.832993 25.909401 +\put {} [b] <0mm,0.5\baselineskip> at 227.832993 25.909401 +\put {$\circ$} at 166.556000 19.377899 +\put {} [b] <0mm,0.5\baselineskip> at 166.556000 19.377899 +\put {$\circ$} at 203.363007 15.461300 +\put {} [b] <0mm,0.5\baselineskip> at 203.363007 15.461300 +\put {$\circ$} at 217.970001 22.153099 +\put {} [b] <0mm,0.5\baselineskip> at 217.970001 22.153099 +\put {$\circ$} at 163.901001 20.452200 +\put {} [b] <0mm,0.5\baselineskip> at 163.901001 20.452200 +\put {$\circ$} at 295.960999 39.107899 +\put {} [b] <0mm,0.5\baselineskip> at 295.960999 39.107899 +\put {$\circ$} at 233.824005 22.858999 +\put {} [b] <0mm,0.5\baselineskip> at 233.824005 22.858999 +\put {$\circ$} at 182.005005 8.298360 +\put {} [b] <0mm,0.5\baselineskip> at 182.005005 8.298360 +\put {$\circ$} at 187.981995 10.989700 +\put {} [b] <0mm,0.5\baselineskip> at 187.981995 10.989700 +\put {$\circ$} at 162.076004 18.188700 +\put {} [b] <0mm,0.5\baselineskip> at 162.076004 18.188700 +\put {$\circ$} at 191.837006 18.822800 +\put {} [b] <0mm,0.5\baselineskip> at 191.837006 18.822800 +\put {$\circ$} at 191.716003 10.056900 +\put {} [b] <0mm,0.5\baselineskip> at 191.716003 10.056900 +\put {$\circ$} at 201.589996 5.966810 +\put {} [b] <0mm,0.5\baselineskip> at 201.589996 5.966810 +\put {$\circ$} at 190.449997 18.738400 +\put {} [b] <0mm,0.5\baselineskip> at 190.449997 18.738400 +\put {$\circ$} at 172.914993 18.235201 +\put {} [b] <0mm,0.5\baselineskip> at 172.914993 18.235201 +\put {$\circ$} at 182.429001 19.351900 +\put {} [b] <0mm,0.5\baselineskip> at 182.429001 19.351900 +\put {$\circ$} at 171.276001 10.109700 +\put {} [b] <0mm,0.5\baselineskip> at 171.276001 10.109700 +\put {$\circ$} at 199.673996 9.254160 +\put {} [b] <0mm,0.5\baselineskip> at 199.673996 9.254160 +\put {$\circ$} at 219.953995 12.319300 +\put {} [b] <0mm,0.5\baselineskip> at 219.953995 12.319300 +\put {$\circ$} at 209.391006 9.413230 +\put {} [b] <0mm,0.5\baselineskip> at 209.391006 9.413230 +\put {$\circ$} at 169.779007 18.181499 +\put {} [b] <0mm,0.5\baselineskip> at 169.779007 18.181499 +\put {$\circ$} at 234.882996 22.792700 +\put {} [b] <0mm,0.5\baselineskip> at 234.882996 22.792700 +\put {$\circ$} at 184.091995 20.523399 +\put {} [b] <0mm,0.5\baselineskip> at 184.091995 20.523399 +\setlinear +\setdots +\plot 64.012634 -0.000000 300.000000 30.239847 / +\put {$\diamond$} at 155.102997 14.930600 +\put {} [b] <0mm,0.5\baselineskip> at 155.102997 14.930600 +\put {$\diamond$} at 165.380005 13.147800 +\put {} [b] <0mm,0.5\baselineskip> at 165.380005 13.147800 +\put {$\diamond$} at 157.281006 6.616840 +\put {} [b] <0mm,0.5\baselineskip> at 157.281006 6.616840 +\put {$\diamond$} at 146.893997 13.591800 +\put {} [b] <0mm,0.5\baselineskip> at 146.893997 13.591800 +\put {$\diamond$} at 158.770996 4.404860 +\put {} [b] <0mm,0.5\baselineskip> at 158.770996 4.404860 +\put {$\diamond$} at 156.589005 11.289900 +\put {} [b] <0mm,0.5\baselineskip> at 156.589005 11.289900 +\put {$\diamond$} at 137.863007 7.476330 +\put {} [b] <0mm,0.5\baselineskip> at 137.863007 7.476330 +\put {$\diamond$} at 144.210999 17.532200 +\put {} [b] <0mm,0.5\baselineskip> at 144.210999 17.532200 +\put {$\diamond$} at 178.065002 10.720300 +\put {} [b] <0mm,0.5\baselineskip> at 178.065002 10.720300 +\put {$\diamond$} at 159.785004 11.935600 +\put {} [b] <0mm,0.5\baselineskip> at 159.785004 11.935600 +\put {$\diamond$} at 158.811005 9.761520 +\put {} [b] <0mm,0.5\baselineskip> at 158.811005 9.761520 +\put {$\diamond$} at 154.488998 9.308460 +\put {} [b] <0mm,0.5\baselineskip> at 154.488998 9.308460 +\put {$\diamond$} at 199.686996 26.636700 +\put {} [b] <0mm,0.5\baselineskip> at 199.686996 26.636700 +\put {$\diamond$} at 188.904007 11.864100 +\put {} [b] <0mm,0.5\baselineskip> at 188.904007 11.864100 +\put {$\diamond$} at 165.341003 18.576099 +\put {} [b] <0mm,0.5\baselineskip> at 165.341003 18.576099 +\put {$\diamond$} at 216.809006 15.785200 +\put {} [b] <0mm,0.5\baselineskip> at 216.809006 15.785200 +\put {$\diamond$} at 210.533997 6.027300 +\put {} [b] <0mm,0.5\baselineskip> at 210.533997 6.027300 +\put {$\diamond$} at 175.404007 13.084000 +\put {} [b] <0mm,0.5\baselineskip> at 175.404007 13.084000 +\put {$\diamond$} at 140.475006 14.248800 +\put {} [b] <0mm,0.5\baselineskip> at 140.475006 14.248800 +\put {$\diamond$} at 165.759003 14.134900 +\put {} [b] <0mm,0.5\baselineskip> at 165.759003 14.134900 +\put {$\diamond$} at 191.806000 20.431499 +\put {} [b] <0mm,0.5\baselineskip> at 191.806000 20.431499 +\put {$\diamond$} at 200.337006 26.990299 +\put {} [b] <0mm,0.5\baselineskip> at 200.337006 26.990299 +\put {$\diamond$} at 149.955994 19.454399 +\put {} [b] <0mm,0.5\baselineskip> at 149.955994 19.454399 +\put {$\diamond$} at 160.634995 18.804001 +\put {} [b] <0mm,0.5\baselineskip> at 160.634995 18.804001 +\put {$\diamond$} at 160.436005 16.856300 +\put {} [b] <0mm,0.5\baselineskip> at 160.436005 16.856300 +\put {$\diamond$} at 158.153000 18.362000 +\put {} [b] <0mm,0.5\baselineskip> at 158.153000 18.362000 +\put {$\diamond$} at 148.533005 10.139500 +\put {} [b] <0mm,0.5\baselineskip> at 148.533005 10.139500 +\put {$\diamond$} at 186.501007 18.812000 +\put {} [b] <0mm,0.5\baselineskip> at 186.501007 18.812000 +\put {$\diamond$} at 177.380005 24.282000 +\put {} [b] <0mm,0.5\baselineskip> at 177.380005 24.282000 +\put {$\diamond$} at 182.737000 33.235298 +\put {} [b] <0mm,0.5\baselineskip> at 182.737000 33.235298 +\put {$\diamond$} at 190.259995 20.321899 +\put {} [b] <0mm,0.5\baselineskip> at 190.259995 20.321899 +\put {$\diamond$} at 197.757004 32.569099 +\put {} [b] <0mm,0.5\baselineskip> at 197.757004 32.569099 +\put {$\diamond$} at 183.722000 28.712200 +\put {} [b] <0mm,0.5\baselineskip> at 183.722000 28.712200 +\put {$\diamond$} at 170.007004 7.792710 +\put {} [b] <0mm,0.5\baselineskip> at 170.007004 7.792710 +\put {$\diamond$} at 175.679993 11.158100 +\put {} [b] <0mm,0.5\baselineskip> at 175.679993 11.158100 +\put {$\diamond$} at 178.302994 17.314600 +\put {} [b] <0mm,0.5\baselineskip> at 178.302994 17.314600 +\put {$\diamond$} at 176.472000 16.307199 +\put {} [b] <0mm,0.5\baselineskip> at 176.472000 16.307199 +\put {$\diamond$} at 152.315994 11.714200 +\put {} [b] <0mm,0.5\baselineskip> at 152.315994 11.714200 +\put {$\diamond$} at 176.309998 13.371900 +\put {} [b] <0mm,0.5\baselineskip> at 176.309998 13.371900 +\put {$\diamond$} at 218.141006 24.926901 +\put {} [b] <0mm,0.5\baselineskip> at 218.141006 24.926901 +\put {$\diamond$} at 177.817993 33.457199 +\put {} [b] <0mm,0.5\baselineskip> at 177.817993 33.457199 +\put {$\diamond$} at 214.449005 14.653900 +\put {} [b] <0mm,0.5\baselineskip> at 214.449005 14.653900 +\setlinear +\setdashes +\plot 57.742256 -0.000000 300.000000 34.583169 / +% .......... legends ............. +\put {$\bullet$} [cc] <0.2cm,-1.000000ex> at 50 -12 +\setlinear +\setsolid +\put {\frame{\hspace*{8mm}}} [lc] <0.4cm,-1.000000ex> at 50 -12 +\put {NT-WKY, n=29} [lc] <1.4cm,-1.000000ex> at 50 -12 +\put {\footnotesize $(y=0.241x-22.806, r^2=0.357)$} [lc] <1.4cm,-3.500000ex> at 50 -12 +\put {$\circ$} [cc] <0.2cm,-6.000000ex> at 50 -12 +\setlinear +\setdots +\put {\frame{\hspace*{8mm}}} [lc] <0.4cm,-6.000000ex> at 50 -12 +\put {SHR-SP, n=35} [lc] <1.4cm,-6.000000ex> at 50 -12 +\put {\footnotesize $(y=0.128x-8.203, r^2=0.352)$} [lc] <1.4cm,-8.500000ex> at 50 -12 +\put {$\diamond$} [cc] <0.2cm,-11.000000ex> at 50 -12 +\setlinear +\setdashes +\put {\frame{\hspace*{8mm}}} [lc] <0.4cm,-11.000000ex> at 50 -12 +\put {SHR-SR, n=42} [lc] <1.4cm,-11.000000ex> at 50 -12 +\put {\footnotesize $(y=0.143x-8.243, r^2=0.168)$} [lc] <1.4cm,-13.500000ex> at 50 -12 +\endpicture +% ...... end of pictex file generated by FastPicTeX ...... diff --git a/support/fastpictex/doc/manual/tline_easy.fpt b/support/fastpictex/doc/manual/tline_easy.fpt new file mode 100644 index 0000000000..68aada2e5b --- /dev/null +++ b/support/fastpictex/doc/manual/tline_easy.fpt @@ -0,0 +1,8 @@ +type xy +x 1 2 3 4 +y 12 24 29 45 +tline 1 +type xy +x 0.8 2.2 2.9 3.5 4.2 +y 19 37 56 62 76 +tline 2 diff --git a/support/fastpictex/doc/manual/tline_easy.ltx b/support/fastpictex/doc/manual/tline_easy.ltx new file mode 100644 index 0000000000..97815cbdb8 --- /dev/null +++ b/support/fastpictex/doc/manual/tline_easy.ltx @@ -0,0 +1,48 @@ +% ...... start of pictex file generated by FastPicTeX ...... +\beginpicture +\setcoordinatesystem units <1.2cm,0.075cm> point at 0 0 +\setplotarea x from 0 to 5, y from 0 to 80 +% .......... axis ............ +\axis bottom label {} ticks numbered from 0 to 5 by 1 / +\axis left label {} ticks numbered from 0 to 80 by 16 / +% .......... heading ............ +\plotheading {} +% .......... series ............. +\put {$\bullet$} at 1.000000 12.000000 +\put {} [b] <0mm,0.5\baselineskip> at 1.000000 12.000000 +\put {$\bullet$} at 2.000000 24.000000 +\put {} [b] <0mm,0.5\baselineskip> at 2.000000 24.000000 +\put {$\bullet$} at 3.000000 29.000000 +\put {} [b] <0mm,0.5\baselineskip> at 3.000000 29.000000 +\put {$\bullet$} at 4.000000 45.000000 +\put {} [b] <0mm,0.5\baselineskip> at 4.000000 45.000000 +\setlinear +\setsolid +\plot 0.000000 1.500000 5.000000 53.499998 / +\put {$\circ$} at 0.800000 19.000000 +\put {} [b] <0mm,0.5\baselineskip> at 0.800000 19.000000 +\put {$\circ$} at 2.200000 37.000000 +\put {} [b] <0mm,0.5\baselineskip> at 2.200000 37.000000 +\put {$\circ$} at 2.900000 56.000000 +\put {} [b] <0mm,0.5\baselineskip> at 2.900000 56.000000 +\put {$\circ$} at 3.500000 62.000000 +\put {} [b] <0mm,0.5\baselineskip> at 3.500000 62.000000 +\put {$\circ$} at 4.200000 76.000000 +\put {} [b] <0mm,0.5\baselineskip> at 4.200000 76.000000 +\setlinear +\setdots +\plot 0.000000 3.838537 4.487708 79.999999 / +% .......... legends ............. +\put {$\bullet$} [cc] <0.2cm,-1.000000ex> at 5.000000 80.000000 +\setlinear +\setsolid +\put {\frame{\hspace*{8mm}}} [lc] <0.4cm,-1.000000ex> at 5.000000 80.000000 +\put {n=4} [lc] <1.4cm,-1.000000ex> at 5.000000 80.000000 +\put {$\circ$} [cc] <0.2cm,-3.500000ex> at 5.000000 80.000000 +\setlinear +\setdots +\put {\frame{\hspace*{8mm}}} [lc] <0.4cm,-3.500000ex> at 5.000000 80.000000 +\put {n=5} [lc] <1.4cm,-3.500000ex> at 5.000000 80.000000 +\put {\footnotesize $(y=16.971x+3.839, r^2=0.984)$} [lc] <1.4cm,-6.000000ex> at 5.000000 80.000000 +\endpicture +% ...... end of pictex file generated by FastPicTeX ...... diff --git a/support/fastpictex/doc/manual/x-command.fpt b/support/fastpictex/doc/manual/x-command.fpt new file mode 100644 index 0000000000..e5cb694619 --- /dev/null +++ b/support/fastpictex/doc/manual/x-command.fpt @@ -0,0 +1,20 @@ +size 9 5 +type bar +x +y 105 155 115 85 +dy 10 12 9 8 +type bar +x +y 165 210 150 130 +dy 17 20 18 12 +type bar +x +y 120 175 135 95 +dy 12 16 11 8 +type line +x +y 200 250 180 160 +dy 13 16 9 8 +type xy +x +y 200 250 180 160 diff --git a/support/fastpictex/doc/manual/x-command.ltx b/support/fastpictex/doc/manual/x-command.ltx new file mode 100644 index 0000000000..71c44e229f --- /dev/null +++ b/support/fastpictex/doc/manual/x-command.ltx @@ -0,0 +1,98 @@ +% ...... start of pictex file generated by FastPicTeX ...... +\beginpicture +% ...... macros for errorbars ...... +\newcommand{\putxerrorbar}[3]{% +\dimen0=\Xdistance{#1} \dimen1=\Ydistance{#2} \dimen2=\Xdistance{#3} +\unitlength=1pt \setdimensionmode +\dimen3=\dimen0 \advance \dimen3 by -\dimen2 +\dimen4=\dimen0 \advance \dimen4 by \dimen2 +\dimen5=\dimen1 \advance \dimen5 by -1mm +\dimen6=\dimen1 \advance \dimen6 by 1mm +\putrule from {\dimen3} {\dimen1} to {\dimen4} {\dimen1} +\putrule from {\dimen3} {\dimen5} to {\dimen3} {\dimen6} +\putrule from {\dimen4} {\dimen5} to {\dimen4} {\dimen6} +\setcoordinatemode } +\newcommand{\putyerrorbar}[3]{% +\dimen0=\Xdistance{#1} \dimen1=\Ydistance{#2} \dimen2=\Ydistance{#3} +\unitlength=1pt \setdimensionmode +\dimen3=\dimen1 \advance \dimen3 by -\dimen2 +\dimen4=\dimen1 \advance \dimen4 by \dimen2 +\dimen5=\dimen0 \advance \dimen5 by -1mm +\dimen6=\dimen0 \advance \dimen6 by 1mm +\putrule from {\dimen0} {\dimen3} to {\dimen0} {\dimen4} +\putrule from {\dimen5} {\dimen3} to {\dimen6} {\dimen3} +\putrule from {\dimen5} {\dimen4} to {\dimen6} {\dimen4} +\setcoordinatemode } +\setcoordinatesystem units <1.8cm,0.025cm> point at 0 0 +\setplotarea x from 0 to 5, y from 50 to 250 +% .......... axis ............ +\axis bottom label {} ticks numbered from 0 to 5 by 1 / +\axis left label {} ticks numbered from 50 to 250 by 50 / +% .......... heading ............ +\plotheading {} +% .......... series ............. +\shaderectanglesoff +\putrectangle corners at 0.6 50 and 0.866667 105 +\putrectangle corners at 1.6 50 and 1.86667 155 +\putrectangle corners at 2.6 50 and 2.86667 115 +\putrectangle corners at 3.6 50 and 3.86667 85 +\putyerrorbar{0.733333}{105}{10} +\put {} [b] <0mm,0.5\baselineskip> at 0.733333 115 +\putyerrorbar{1.73333}{155}{12} +\put {} [b] <0mm,0.5\baselineskip> at 1.73333 167 +\putyerrorbar{2.73333}{115}{9} +\put {} [b] <0mm,0.5\baselineskip> at 2.73333 124 +\putyerrorbar{3.73333}{85}{8} +\put {} [b] <0mm,0.5\baselineskip> at 3.73333 93 +\shaderectangleson +\setshadegrid span <1mm> +\putrectangle corners at 0.866667 50 and 1.13333 165 +\putrectangle corners at 1.86667 50 and 2.13333 210 +\putrectangle corners at 2.86667 50 and 3.13333 150 +\putrectangle corners at 3.86667 50 and 4.13333 130 +\putyerrorbar{1}{165}{17} +\put {} [b] <0mm,0.5\baselineskip> at 1 182 +\putyerrorbar{2}{210}{20} +\put {} [b] <0mm,0.5\baselineskip> at 2 230 +\putyerrorbar{3}{150}{18} +\put {} [b] <0mm,0.5\baselineskip> at 3 168 +\putyerrorbar{4}{130}{12} +\put {} [b] <0mm,0.5\baselineskip> at 4 142 +\shaderectanglesoff% +\dimen0=\linethickness% +\setlength{\linethickness}{\Xdistance{0.266667}}% +\putrule from 1.26667 50 to 1.26667 120 +\putrule from 2.26667 50 to 2.26667 175 +\putrule from 3.26667 50 to 3.26667 135 +\putrule from 4.26667 50 to 4.26667 95 +\setlength{\linethickness}{\dimen0}% +\putyerrorbar{1.26667}{120}{12} +\put {} [b] <0mm,0.5\baselineskip> at 1.26667 132 +\putyerrorbar{2.26667}{175}{16} +\put {} [b] <0mm,0.5\baselineskip> at 2.26667 191 +\putyerrorbar{3.26667}{135}{11} +\put {} [b] <0mm,0.5\baselineskip> at 3.26667 146 +\putyerrorbar{4.26667}{95}{8} +\put {} [b] <0mm,0.5\baselineskip> at 4.26667 103 +\setlinear +\setsolid +\plot 1 200 2 250 3 180 4 160 / +\setsolid +\putyerrorbar{1}{200}{13} +\put {} [b] <0mm,0.5\baselineskip> at 1 213 +\putyerrorbar{2}{250}{16} +\put {} [b] <0mm,0.5\baselineskip> at 2 266 +\putyerrorbar{3}{180}{9} +\put {} [b] <0mm,0.5\baselineskip> at 3 189 +\putyerrorbar{4}{160}{8} +\put {} [b] <0mm,0.5\baselineskip> at 4 168 +\put {$\bullet$} at 1 200 +\put {} [b] <0mm,0.5\baselineskip> at 1 200 +\put {$\bullet$} at 2 250 +\put {} [b] <0mm,0.5\baselineskip> at 2 250 +\put {$\bullet$} at 3 180 +\put {} [b] <0mm,0.5\baselineskip> at 3 180 +\put {$\bullet$} at 4 160 +\put {} [b] <0mm,0.5\baselineskip> at 4 160 +\endpicture +% ...... end of pictex file generated by FastPicTeX ...... diff --git a/support/fastpictex/doc/manual/xticlabels1.fpt b/support/fastpictex/doc/manual/xticlabels1.fpt new file mode 100644 index 0000000000..8fa8f0f146 --- /dev/null +++ b/support/fastpictex/doc/manual/xticlabels1.fpt @@ -0,0 +1,10 @@ +size 10 4 +type bar +x +y 12 23 45 32 +dy 1.2 2.5 5.3 4.8 +type bar +x +y 65 34 12 85 +dy 6.5 5.3 2.1 9.6 +xticlabels Germany "Un. Kingd." Sweden France diff --git a/support/fastpictex/doc/manual/xticlabels1.ltx b/support/fastpictex/doc/manual/xticlabels1.ltx new file mode 100644 index 0000000000..cdd69cffcf --- /dev/null +++ b/support/fastpictex/doc/manual/xticlabels1.ltx @@ -0,0 +1,65 @@ +% ...... start of pictex file generated by FastPicTeX ...... +\beginpicture +% ...... macros for errorbars ...... +\newcommand{\putxerrorbar}[3]{% +\dimen0=\Xdistance{#1} \dimen1=\Ydistance{#2} \dimen2=\Xdistance{#3} +\unitlength=1pt \setdimensionmode +\dimen3=\dimen0 \advance \dimen3 by -\dimen2 +\dimen4=\dimen0 \advance \dimen4 by \dimen2 +\dimen5=\dimen1 \advance \dimen5 by -1mm +\dimen6=\dimen1 \advance \dimen6 by 1mm +\putrule from {\dimen3} {\dimen1} to {\dimen4} {\dimen1} +\putrule from {\dimen3} {\dimen5} to {\dimen3} {\dimen6} +\putrule from {\dimen4} {\dimen5} to {\dimen4} {\dimen6} +\setcoordinatemode } +\newcommand{\putyerrorbar}[3]{% +\dimen0=\Xdistance{#1} \dimen1=\Ydistance{#2} \dimen2=\Ydistance{#3} +\unitlength=1pt \setdimensionmode +\dimen3=\dimen1 \advance \dimen3 by -\dimen2 +\dimen4=\dimen1 \advance \dimen4 by \dimen2 +\dimen5=\dimen0 \advance \dimen5 by -1mm +\dimen6=\dimen0 \advance \dimen6 by 1mm +\putrule from {\dimen0} {\dimen3} to {\dimen0} {\dimen4} +\putrule from {\dimen5} {\dimen3} to {\dimen6} {\dimen3} +\putrule from {\dimen5} {\dimen4} to {\dimen6} {\dimen4} +\setcoordinatemode } +\setcoordinatesystem units <2cm,0.04cm> point at 0 0 +\setplotarea x from 0 to 5, y from 0 to 100 +% .......... axis ............ +\axis bottom label {} ticks withvalues {} {Germany} {Un. Kingd.} {Sweden} {France} {} / +quantity 6 / +\axis left label {} ticks numbered from 0 to 100 by 25 / +% .......... heading ............ +\plotheading {} +% .......... series ............. +\shaderectanglesoff +\putrectangle corners at 0.6 0 and 1 12 +\putrectangle corners at 1.6 0 and 2 23 +\putrectangle corners at 2.6 0 and 3 45 +\putrectangle corners at 3.6 0 and 4 32 +\putyerrorbar{0.8}{12}{1.2} +\put {} [b] <0mm,0.5\baselineskip> at 0.8 13.2 +\putyerrorbar{1.8}{23}{2.5} +\put {} [b] <0mm,0.5\baselineskip> at 1.8 25.5 +\putyerrorbar{2.8}{45}{5.3} +\put {} [b] <0mm,0.5\baselineskip> at 2.8 50.3 +\putyerrorbar{3.8}{32}{4.8} +\put {} [b] <0mm,0.5\baselineskip> at 3.8 36.8 +\shaderectanglesoff% +\dimen0=\linethickness% +\setlength{\linethickness}{\Xdistance{0.4}}% +\putrule from 1.2 0 to 1.2 65 +\putrule from 2.2 0 to 2.2 34 +\putrule from 3.2 0 to 3.2 12 +\putrule from 4.2 0 to 4.2 85 +\setlength{\linethickness}{\dimen0}% +\putyerrorbar{1.2}{65}{6.5} +\put {} [b] <0mm,0.5\baselineskip> at 1.2 71.5 +\putyerrorbar{2.2}{34}{5.3} +\put {} [b] <0mm,0.5\baselineskip> at 2.2 39.3 +\putyerrorbar{3.2}{12}{2.1} +\put {} [b] <0mm,0.5\baselineskip> at 3.2 14.1 +\putyerrorbar{4.2}{85}{9.6} +\put {} [b] <0mm,0.5\baselineskip> at 4.2 94.6 +\endpicture +% ...... end of pictex file generated by FastPicTeX ...... diff --git a/support/fastpictex/doc/manual/xticlabels2.fpt b/support/fastpictex/doc/manual/xticlabels2.fpt new file mode 100644 index 0000000000..d3cf82e5d5 --- /dev/null +++ b/support/fastpictex/doc/manual/xticlabels2.fpt @@ -0,0 +1,9 @@ +size 10 4 +type xy +x +y 12 54 34 42 +dy 1.3 6.3 2.6 3.8 +type line +x +y 12 54 34 42 +xticlabels 1990 1992 1994 1996 diff --git a/support/fastpictex/doc/manual/xticlabels2.ltx b/support/fastpictex/doc/manual/xticlabels2.ltx new file mode 100644 index 0000000000..0fb3bcb5e5 --- /dev/null +++ b/support/fastpictex/doc/manual/xticlabels2.ltx @@ -0,0 +1,56 @@ +% ...... start of pictex file generated by FastPicTeX ...... +\beginpicture +% ...... macros for errorbars ...... +\newcommand{\putxerrorbar}[3]{% +\dimen0=\Xdistance{#1} \dimen1=\Ydistance{#2} \dimen2=\Xdistance{#3} +\unitlength=1pt \setdimensionmode +\dimen3=\dimen0 \advance \dimen3 by -\dimen2 +\dimen4=\dimen0 \advance \dimen4 by \dimen2 +\dimen5=\dimen1 \advance \dimen5 by -1mm +\dimen6=\dimen1 \advance \dimen6 by 1mm +\putrule from {\dimen3} {\dimen1} to {\dimen4} {\dimen1} +\putrule from {\dimen3} {\dimen5} to {\dimen3} {\dimen6} +\putrule from {\dimen4} {\dimen5} to {\dimen4} {\dimen6} +\setcoordinatemode } +\newcommand{\putyerrorbar}[3]{% +\dimen0=\Xdistance{#1} \dimen1=\Ydistance{#2} \dimen2=\Ydistance{#3} +\unitlength=1pt \setdimensionmode +\dimen3=\dimen1 \advance \dimen3 by -\dimen2 +\dimen4=\dimen1 \advance \dimen4 by \dimen2 +\dimen5=\dimen0 \advance \dimen5 by -1mm +\dimen6=\dimen0 \advance \dimen6 by 1mm +\putrule from {\dimen0} {\dimen3} to {\dimen0} {\dimen4} +\putrule from {\dimen5} {\dimen3} to {\dimen6} {\dimen3} +\putrule from {\dimen5} {\dimen4} to {\dimen6} {\dimen4} +\setcoordinatemode } +\setcoordinatesystem units <2cm,0.0625cm> point at 0 0 +\setplotarea x from 0 to 5, y from 0 to 64 +% .......... axis ............ +\axis bottom label {} ticks withvalues {} {1990} {1992} {1994} {1996} {} / +quantity 6 / +\axis left label {} ticks numbered from 0 to 64 by 16 / +% .......... heading ............ +\plotheading {} +% .......... series ............. +\put {$\bullet$} at 1 12 +\putyerrorbar{1}{12}{1.3} +\put {} [b] <0mm,0.5\baselineskip> at 1 13.3 +\put {$\bullet$} at 2 54 +\putyerrorbar{2}{54}{6.3} +\put {} [b] <0mm,0.5\baselineskip> at 2 60.3 +\put {$\bullet$} at 3 34 +\putyerrorbar{3}{34}{2.6} +\put {} [b] <0mm,0.5\baselineskip> at 3 36.6 +\put {$\bullet$} at 4 42 +\putyerrorbar{4}{42}{3.8} +\put {} [b] <0mm,0.5\baselineskip> at 4 45.8 +\setlinear +\setsolid +\plot 1 12 2 54 3 34 4 42 / +\setsolid +\put {} [b] <0mm,0.5\baselineskip> at 1 12 +\put {} [b] <0mm,0.5\baselineskip> at 2 54 +\put {} [b] <0mm,0.5\baselineskip> at 3 34 +\put {} [b] <0mm,0.5\baselineskip> at 4 42 +\endpicture +% ...... end of pictex file generated by FastPicTeX ...... diff --git a/support/fastpictex/doc/manual/xygraph.fpt b/support/fastpictex/doc/manual/xygraph.fpt new file mode 100644 index 0000000000..4dd465aced --- /dev/null +++ b/support/fastpictex/doc/manual/xygraph.fpt @@ -0,0 +1,9 @@ +type xy +x 3.4 5.4 7.5 9.3 12.5 +y 12 23 45 32 83 23 +type xy +x 1.2 4.5 6.5 6.9 +y 4 11 74 62 +type xy +x 3.4 5.5 7.8 9.2 10.2 11.8 +y 2 3 8 20 18 37 diff --git a/support/fastpictex/doc/manual/xygraph.ltx b/support/fastpictex/doc/manual/xygraph.ltx new file mode 100644 index 0000000000..b2e4c7977d --- /dev/null +++ b/support/fastpictex/doc/manual/xygraph.ltx @@ -0,0 +1,42 @@ +% ...... start of pictex file generated by FastPicTeX ...... +\beginpicture +\setcoordinatesystem units <0.5cm,0.06cm> point at 0 0 +\setplotarea x from 0 to 12, y from 0 to 100 +% .......... axis ............ +\axis bottom label {} ticks numbered from 0 to 12 by 3 / +\axis left label {} ticks numbered from 0 to 100 by 25 / +% .......... heading ............ +\plotheading {} +% .......... series ............. +\put {$\bullet$} at 3.4 12 +\put {} [b] <0mm,0.5\baselineskip> at 3.4 12 +\put {$\bullet$} at 5.4 23 +\put {} [b] <0mm,0.5\baselineskip> at 5.4 23 +\put {$\bullet$} at 7.5 45 +\put {} [b] <0mm,0.5\baselineskip> at 7.5 45 +\put {$\bullet$} at 9.3 32 +\put {} [b] <0mm,0.5\baselineskip> at 9.3 32 +\put {$\bullet$} at 12.5 83 +\put {} [b] <0mm,0.5\baselineskip> at 12.5 83 +\put {$\circ$} at 1.2 4 +\put {} [b] <0mm,0.5\baselineskip> at 1.2 4 +\put {$\circ$} at 4.5 11 +\put {} [b] <0mm,0.5\baselineskip> at 4.5 11 +\put {$\circ$} at 6.5 74 +\put {} [b] <0mm,0.5\baselineskip> at 6.5 74 +\put {$\circ$} at 6.9 62 +\put {} [b] <0mm,0.5\baselineskip> at 6.9 62 +\put {$\diamond$} at 3.4 2 +\put {} [b] <0mm,0.5\baselineskip> at 3.4 2 +\put {$\diamond$} at 5.5 3 +\put {} [b] <0mm,0.5\baselineskip> at 5.5 3 +\put {$\diamond$} at 7.8 8 +\put {} [b] <0mm,0.5\baselineskip> at 7.8 8 +\put {$\diamond$} at 9.2 20 +\put {} [b] <0mm,0.5\baselineskip> at 9.2 20 +\put {$\diamond$} at 10.2 18 +\put {} [b] <0mm,0.5\baselineskip> at 10.2 18 +\put {$\diamond$} at 11.8 37 +\put {} [b] <0mm,0.5\baselineskip> at 11.8 37 +\endpicture +% ...... end of pictex file generated by FastPicTeX ...... diff --git a/support/fastpictex/fastpictex-0.9.lsm b/support/fastpictex/fastpictex-0.9.lsm new file mode 100644 index 0000000000..d2514e00fd --- /dev/null +++ b/support/fastpictex/fastpictex-0.9.lsm @@ -0,0 +1,27 @@ +Begin3 +Title: fastpictex +Version: 0.9 +Entered-date: January 15, 2008 +Description: fastpictex is a preprocessor for PiCTeX. + fastpictex generates PiCTeX code based on a very + simple macro language that is described in the + included manual. With fastpictex one can generate good + looking diagrams of numbered material in just seconds. +Keywords: PiCTeX + graphics + graphs + line graphs + bar graphs + xy graphs + TeX + LaTeX +Author: harald-stauss@uiowa.edu (Harald Stauss) +Maintained-by: harald-stauss@uiowa.edu (Harald Stauss) +Primary-site: sunsite.unc.edu /pub/Linux/apps/tex + fastpictex-0.9.tar.gz + fastpictex-0.9.lsm +Alternate-site: +Original-site: +Platform: Linux, DOS, Windows +Copying-policy: GPL +End diff --git a/support/fastpictex/src/Makefile b/support/fastpictex/src/Makefile new file mode 100644 index 0000000000..55ed45c228 --- /dev/null +++ b/support/fastpictex/src/Makefile @@ -0,0 +1,39 @@ +# Makefile for FastPicTeX + +PROG = fastpictex.exe +PRGOBJ = main.o fastpictex.o myfunctions.o scale.o nrutil.o +CC = g++ +DUMADIR = ..\..\duma +CFLAGS = -O2 +# CFLAGS = -g -DDUMA +LFLAGS = -O2 +# LFLAGS = -g +LIBS = +# LIBS = $(DUMADIR)\libduma.a +RM = del +STRIP = strip +MAKE = mingw32-make + +$(PROG): $(PRGOBJ) + $(CC) $(LFLAGS) -o fastpictex.exe $(PRGOBJ) $(LIBS) + +main.o: main.cc fastpictex.h + $(CC) -c $(CFLAGS) main.cc + +fastpictex.o: fastpictex.cc fastpictex.h + $(CC) -c $(CFLAGS) fastpictex.cc + +myfunctions.o: myfunctions.cc + $(CC) -c $(CFLAGS) myfunctions.cc + +scale.o: scale.cc + $(CC) -c $(CFLAGS) scale.cc + +nrutil.o: nrutil.cc nrutil.h + $(CC) -c $(CFLAGS) nrutil.cc + +clean: + $(RM) $(PRGOBJ) *~ + +strip: + $(STRIP) $(PROG) diff --git a/support/fastpictex/src/fastpictex.cc b/support/fastpictex/src/fastpictex.cc new file mode 100644 index 0000000000..c106e53766 --- /dev/null +++ b/support/fastpictex/src/fastpictex.cc @@ -0,0 +1,947 @@ +/*******************************************************/ +/* Linux GNU C++ Compiler */ +/* Name : fastpictex.cc */ +/* Autor: Harald Stauss */ +/*******************************************************/ + +#include +#include +#include +#include +#include +#include +#include "fastpictex.h" + +#ifdef DUMA + #include + #include "../../duma/duma.h" + #include "../../duma/dumapp.h" +#endif + +/* ----------------------------- */ +/* Implementation der Funktionen */ +/* ----------------------------- */ +FASTPICTEX::FASTPICTEX() { /* Constructor */ + width=6.0; height=6.0; // default 6x6 cm; + nofseries=0; + nofbar=0; + linenoxmax=-1; + xgrid=0; ygrid=0; + noftline=0; + series=(SERIES *)malloc(sizeof(SERIES)); + need_errorbarmacros=0; + xlabel =(char*)malloc(2*sizeof(char)); strcpy(xlabel, "\0"); + ylabel =(char*)malloc(2*sizeof(char)); strcpy(ylabel, "\0"); + heading=(char*)malloc(2*sizeof(char)); strcpy(heading, "\0"); + nxticlabels=0; + xticlabels=new char* [1]; + nofrawpictex=0; + rawpictex=(char **)malloc(sizeof(char *)); + strcpy(plotsym[0], "$\\bullet$"); + strcpy(plotsym[1], "$\\circ$"); + strcpy(plotsym[2], "$\\diamond$"); + strcpy(plotsym[3], "$\\star$"); + strcpy(plotsym[4], "$\\ast$"); + strcpy(plotsym[5], "$\\oplus$"); + strcpy(plotsym[6], "$\\odot$"); + strcpy(plotsym[7], "$\\oslash$"); + strcpy(plotsym[8], "$\\otimes$"); + strcpy(plotsym[9], "$\\times$"); + strcpy(linesym[0], "\\setsolid"); + strcpy(linesym[1], "\\setdots"); + strcpy(linesym[2], "\\setdashes"); + strcpy(linesym[3], "\\setdashpattern <3mm,1mm,1mm,1mm>"); + strcpy(linesym[4], "\\setdashpattern <3mm,1mm,0.5mm,0.5mm,0.5mm,1mm>"); + strcpy(linesym[5], "\\setsolid"); + strcpy(linesym[6], "\\setdots"); + strcpy(linesym[7], "\\setdashes"); + strcpy(linesym[8], "\\setdashpattern <3mm,1mm,1mm,1mm>"); + strcpy(linesym[9], "\\setdashpattern <3mm,1mm,0.5mm,0.5mm,0.5mm,1mm>"); +} + +FASTPICTEX::~FASTPICTEX() { /* Destructor */ + int i; + unsigned long j; + for (i=0; inofseries) { + AddSeries(); + } + } + token=fpt_command; + token=strtok(NULL, WHITE_SPACE); + if (!token) { + series[ntype-1].type=0; + } + if (!strcmp(token, "xy")) { + series[ntype-1].type=1; + } + else if (!strcmp(token, "line")) { + series[ntype-1].type=2; + } + else if (!strcmp(token, "bar")) { + series[ntype-1].type=3; + nofbar++; + } + else { + series[ntype-1].type=0; + } + } + /* trendline */ + else if (!strcmp(fpt_command, "tline")) { + if (is_newcommand) { + noftline++; + if (noftline>nofseries) { + AddSeries(); + } + } + //series[noftline-1].tline=1; + token=fpt_command; + /* read one more token */ + token=strtok(NULL, WHITE_SPACE); + if (token) series[noftline-1].tline=atoi(token); + /* read remaining tokens to go to end of line */ + while (token) { + token=strtok(NULL, WHITE_SPACE); + } + } + /* legend */ + else if (!strcmp(fpt_command, "legend")) { + if (is_newcommand) { + nlegend++; + if (nlegend>nofseries) { + AddSeries(); + } + } + token=fpt_command; + if (is_newcommand) { + series[nlegend-1].legend=(char *)realloc(series[nlegend-1].legend, sizeof(char)); + strcpy(series[nlegend-1].legend, ""); + } + else { + series[nlegend-1].legend=(char *)realloc(series[nlegend-1].legend, + (strlen(series[nlegend-1].legend)+2)*sizeof(char)); + strcat(series[nlegend-1].legend, " "); + } + while (token) { + token=strtok(NULL, WHITE_SPACE); + if (token) { + series[nlegend-1].legend=(char *)realloc(series[nlegend-1].legend, + (strlen(series[nlegend-1].legend)+strlen(token)+2)*sizeof(char)); + strcat(series[nlegend-1].legend, token); + strcat(series[nlegend-1].legend, " "); + } /* endif */ + } /* endwhile */ + series[nlegend-1].legend[strlen(series[nlegend-1].legend)-1]='\0'; + } + /* pictex commands */ + else if (!strcmp(fpt_command, "pictex")) { + token=fpt_command; + if (is_newcommand) { + nofrawpictex++; + rawpictex=(char **)realloc(rawpictex, nofrawpictex*sizeof(char *)); + rawpictex[nofrawpictex-1]=(char *)malloc(sizeof(char)); + strcpy(rawpictex[nofrawpictex-1], ""); + } + else { + rawpictex[nofrawpictex-1]=(char *)realloc(rawpictex[nofrawpictex-1], + (strlen(rawpictex[nofrawpictex-1])+2)*sizeof(char)); + strcat(rawpictex[nofrawpictex-1], " "); + } + while (token) { + token=strtok(NULL, WHITE_SPACE); + if (token) { + rawpictex[nofrawpictex-1]=(char *)realloc(rawpictex[nofrawpictex-1], + (strlen(rawpictex[nofrawpictex-1])+strlen(token)+2)*sizeof(char)); + strcat(rawpictex[nofrawpictex-1], token); + strcat(rawpictex[nofrawpictex-1], " "); + } /* endif */ + } /* endwhile */ + rawpictex[nofrawpictex-1][strlen(rawpictex[nofrawpictex-1])-1]='\0'; + } + /* x coordinates */ + else if (!strcmp(fpt_command, "x")) { + if (is_newcommand) { + ndata=0; + nx++; + if (nx>nofseries) { + AddSeries(); + } + } + token=fpt_command; + while (token) { + token=strtok(NULL, WHITE_SPACE); + if (token) { + if (ndata>=nallocdata) { + nallocdata+=100; + data=(float *)realloc(data, nallocdata*sizeof(float)); + } /* endif */ + data[ndata]=atof(token); + ndata++; + } /* endif */ + } /* endwhile */ + series[nx-1].nx=ndata; + series[nx-1].x=(float *)realloc(series[nx-1].x, ndata*sizeof(float)); + for (n=0; nnofseries) { + AddSeries(); + } + } + token=fpt_command; + while (token) { + token=strtok(NULL, WHITE_SPACE); + if (token) { + if (ndata>=nallocdata) { + nallocdata+=100; + data=(float *)realloc(data, nallocdata*sizeof(float)); + } /* endif */ + series[ny-1].sig=(char **)realloc(series[ny-1].sig, (ndata+1)*sizeof(char *)); + series[ny-1].sig[ndata]=getsig(token); + data[ndata]=atof(token); + ndata++; + } /* endif */ + } /* endwhile */ + series[ny-1].ny=ndata; + series[ny-1].y=(float *)realloc(series[ny-1].y, ndata*sizeof(float)); + for (n=0; nnofseries) { + AddSeries(); + } + } + token=fpt_command; + while (token) { + token=strtok(NULL, WHITE_SPACE); + if (token) { + if (ndata>=nallocdata) { + nallocdata+=100; + data=(float *)realloc(data, nallocdata*sizeof(float)); + } /* endif */ + data[ndata]=atof(token); + ndata++; + } /* endif */ + } /* endwhile */ + series[ndx-1].ndx=ndata; + series[ndx-1].dx=(float *)realloc(series[ndx-1].dx, ndata*sizeof(float)); + for (n=0; nnofseries) { + AddSeries(); + } + } + token=fpt_command; + while (token) { + token=strtok(NULL, WHITE_SPACE); + if (token) { + if (ndata>=nallocdata) { + nallocdata+=100; + data=(float *)realloc(data, nallocdata*sizeof(float)); + } /* endif */ + data[ndata]=atof(token); + ndata++; + } /* endif */ + } /* endwhile */ + series[ndy-1].ndy=ndata; + series[ndy-1].dy=(float *)realloc(series[ndy-1].dy, ndata*sizeof(float)); + for (n=0; n0 && (series[i].nx!=series[i].ny)) { + series[i].nx=series[i].ny; + series[i].x=(float *)realloc(series[i].x, series[i].nx*sizeof(float)); + for (n=0; n0) { + if (series[i].ny>j) {j=series[i].ny; linenoxmax=i;} + series[i].nx=series[i].ny; + series[i].x=(float *)realloc(series[i].x, series[i].nx*sizeof(float)); + for (n=0; n0) { + xlmin=1.0; xlmax=(float)nxticlabels; + GetExtrema(1, xlmin, xlmax, &xmin, &xmax, &ymin, &ymax); + xmin=1.0; xmax=(float)nxticlabels; + scale(xmin-1, xmax+1, nxticlabels+2, &valmin, &step, &valmax); + } + /* number of x-tics depend on bar-graphs second */ + else if (nofbar>0) { + j=0; + for (i=0; ij) j=series[i].nx; + } + scale(xmin-1, xmax+1, j+2, &valmin, &step, &valmax); + } + /* number of x-tics depend on line- and xy-series without x-values third */ + else if (linenoxmax>=0) + scale(xmin-1, xmax+1, series[linenoxmax].nx+2, &valmin, &step, &valmax); + /* finally default */ + else + scale(xmin, xmax, N_XTICKS, &valmin, &step, &valmax); + xstep=floor(step*10000.0+0.5)/10000.0; + if (xmin>valmin) xmin=floor(valmin*10000.0+0.5)/10000.0; + else xmin=floor((valmin-xstep)*10000.0+0.5)/10000.0; + if (xmaxvalmin) ymin=floor(valmin*10000.0+0.5)/10000.0; + else ymin=floor((valmin-ystep)*10000.0+0.5)/10000.0; + if (ymax point at 0 0 \n"; + pictex << "\\setplotarea x from " << xmin << " to " << xmax + << ", y from " << ymin << " to " << ymax << " \n"; + /* plot axis */ + pictex << "% .......... axis ............ \n"; + pictex << "\\axis bottom "; + if (xlabel) pictex << "label {" << xlabel << "} "; + pictex << "ticks "; + if (xgrid) pictex << "andacross "; + if (nxticlabels==0) { + pictex << "numbered from " + << xmin << " to " << xmax << " by " << xstep << " / \n"; + } + else { + pictex << "withvalues {} "; + for (n=0; n=xlmin && series[i].x[n]<=xlmax) { + pictex << "\\put {" << plotsym[(int)fmod(nxy,10)] << "} at " + << series[i].x[n] << " " << series[i].y[n] << " \n"; + sx2+=(series[i].x[n]*series[i].x[n]); sy2+=(series[i].y[n]*series[i].y[n]); + sxy+=(series[i].x[n]*series[i].y[n]); + sx+=series[i].x[n]; sy+=series[i].y[n]; + nreg++; + if (series[i].ndx>n) { + pictex << "\\putxerrorbar{" << series[i].x[n] << "}{" + << series[i].y[n] << "}{" << series[i].dx[n] << "} \n"; + } + if (series[i].ndy>n) { + pictex << "\\putyerrorbar{" << series[i].x[n] << "}{" + << series[i].y[n] << "}{" << series[i].dy[n] << "} \n"; + } + /* plot significance signs */ + if (series[i].sig[n]) { + ypos=series[i].y[n]; + if (series[i].ndy>n) ypos+=series[i].dy[n]; + pictex << "\\put {" << series[i].sig[n] << "} [b] <0mm,0.5\\baselineskip> at " + << series[i].x[n] << " " << ypos << "\n"; + } + } + } + /* calculate regression line */ + if (nreg>2) { + qx=sx2-(sx*sx/nreg); qy=sy2-(sy*sy/nreg); qxy=sxy-(sx*sy/nreg); + r=qxy/sqrt(qx*qy); + by=qxy/qx; bx=qxy/qy; + ay=(sy-by*sx)/nreg; ax=(sx-bx*sy)/nreg; + s2yx=(qy-(qxy*qxy/qx))/(nreg-2); + s2xy=(qx-(qxy*qxy/qy))/(nreg-2); + pwert=2.0*(1.0-prho(nreg, (nreg*nreg*nreg-nreg)*(1.0-fabs(r))/6.0, &is_fault)); + series[i].m1=by; series[i].m2=bx; series[i].b=ay; series[i].nreg=nreg; + if (pwert>1.0) pwert=1.0; + if (pwert<0.0) pwert=0.0; + /* plot regression line */ + rxmin=xmin; rxmax=xmax; + if (series[i].tline>0) { + if (ymin>xmin*by+ay) rxmin=(ymin-ay)/by; + if (ymaxxmax*by+ay) rxmax=(ymin-ay)/by; + if (ymax2 */ + else series[i].tline=0; + /* clean up */ + nxy++; + break; + case 2: // line graph; + /* write lines */ + pictex << "\\setlinear \n"; + pictex << linesym[(int)fmod(nline,10)] << " \n"; + is_first=1; + for (n=0; n=xlmin && series[i].x[n]<=xlmax) { + if (is_first) {pictex << "\\plot "; is_first=0;} + pictex << series[i].x[n] << " " << series[i].y[n] << " "; + } + } + pictex << "/ \n"; + pictex << "\\setsolid \n"; + for (n=0; n=xlmin && series[i].x[n]<=xlmax) { + if (series[i].ndx>n) { + pictex << "\\putxerrorbar{" << series[i].x[n] << "}{" + << series[i].y[n] << "}{" << series[i].dx[n] << "} \n"; + } + if (series[i].ndy>n) { + pictex << "\\putyerrorbar{" << series[i].x[n] << "}{" + << series[i].y[n] << "}{" << series[i].dy[n] << "} \n"; + } + /* plot significance signs */ + if (series[i].sig[n]) { + ypos=series[i].y[n]; + if (series[i].ndy>n) ypos+=series[i].dy[n]; + pictex << "\\put {" << series[i].sig[n] << "} [b] <0mm,0.5\\baselineskip> at " + << series[i].x[n] << " " << ypos << "\n"; + } + } + } + nline++; + break; + case 3: // bar graph; + /* write bars */ + if (nbar==0) { + pictex << "\\shaderectanglesoff \n"; + } + if (nbar>0 && nbar \n"; + } + if (nbar!=0 && nbar==nofbar-1) { + pictex << "\\shaderectanglesoff%\n"; + pictex << "\\dimen0=\\linethickness%\n"; + pictex << "%look here\n"; + pictex << "\\setlength{\\linethickness}{" << (BARWIDTH*xunit)/(float)nofbar << "cm}%\n"; + //pictex << "\\setlength{\\linethickness}{\\Xdistance{" << BARWIDTH/(float)nofbar << "}}%\n"; + } + if (nbar==0 || nbar=xlmin && series[i].x[n]<=xlmax) { + pictex << "\\putrectangle corners at "; + pictex << (series[i].x[n]-BARWIDTH/2.0)+(BARWIDTH*(float)nbar/(float)nofbar) << " " << ymin << " and "; + pictex << (series[i].x[n]-BARWIDTH/2.0)+(BARWIDTH*(float)(nbar+1)/(float)nofbar) << " " + << series[i].y[n] << " \n"; + } + } + } + if (nbar!=0 && nbar==nofbar-1) { + for (n=0; n=xlmin && series[i].x[n]<=xlmax) { + pictex << "\\putrule from " + << (series[i].x[n]-BARWIDTH/2)+BARWIDTH/(float)(2*nofbar)+(BARWIDTH*(float)(nbar)/(float)nofbar) << " " + << ymin << " to " + << (series[i].x[n]-BARWIDTH/2)+BARWIDTH/(float)(2*nofbar)+(BARWIDTH*(float)(nbar)/(float)nofbar) << " " + << series[i].y[n] << " \n"; + } + } + pictex << "\\setlength{\\linethickness}{\\dimen0}%\n"; + } + for (n=0; n=xlmin && series[i].x[n]<=xlmax) { + /* plot errorbars */ + if (series[i].ndy>n) { + pictex << "\\putyerrorbar{" + << (series[i].x[n]-BARWIDTH/2)+BARWIDTH/(float)(2*nofbar)+(BARWIDTH*(float)(nbar)/(float)nofbar) + << "}{" + << series[i].y[n] << "}{" << series[i].dy[n] << "} \n"; + } + /* plot significance signs */ + if (series[i].sig[n]) { + ypos=series[i].y[n]; + if (series[i].ndy>n) ypos+=series[i].dy[n]; + pictex << "\\put {" << series[i].sig[n] << "} [b] <0mm,0.5\\baselineskip> at " + << (series[i].x[n]-BARWIDTH/2)+BARWIDTH/(float)(2*nofbar)+(BARWIDTH*(float)(nbar)/(float)nofbar) + << " " << ypos << "\n"; + } + } + } + nbar++; + break; + } /* endswitch */ + } /* endfor */ + /* legend */ + is_valid=0; + for (i=0; i0) || + (series[i].type==1 && series[i].tline>0 && series[i].nreg>2)) + is_valid=1; + } + if (is_valid) { + pictex << "% .......... legends ............. \n"; + j=0; nxy=0; nbar=0, nline=0; + for (i=0; i0) || + (series[i].type==1 && series[i].tline>0 && series[i].nreg>2)) { + /* first symbols */ + if (series[i].type==1) { /* xy */ + if (series[i].tline>0 && series[i].nreg>2) { + pictex << "\\put {" << plotsym[(int)fmod(nxy,10)] << "} [cc] <0.2cm,-" << 2.5*j+1 << "ex> at " << xmax << " " << ymax << "\n"; + pictex << "\\setlinear \n"; + pictex << linesym[(int)fmod(nxy,10)] << " \n"; + pictex << "\\put {\\frame{\\hspace*{8mm}}} [lc] <0.4cm,-" << 2.5*j+1 << "ex> at " << xmax << " " << ymax << "\n"; + } + else + pictex << "\\put {" << plotsym[(int)fmod(nxy,10)] << "} [cc] <0.8cm,-" << 2.5*j+1 << "ex> at " << xmax << " " << ymax << "\n"; + } + if (series[i].type==2) { /* line */ + pictex << linesym[(int)fmod(nline,10)] << " \n"; + pictex << "\\putrule <0.4cm,-" << 2.5*j+1 << "ex> from " << + xmax << " " << ymax << " to " << xmax+0.8/xunit << " " << ymax << "\n"; + } + if (series[i].type==3) { /* bar */ + if (nbar==0) { + pictex << "\\shaderectanglesoff \n"; + pictex << "\\putrectangle <5mm,-" << 2.5*j << "ex> corners at " << + xmax << " " << ymax << " and " << xmax+0.6/xunit << " " << ymax-0.3/yunit << "\n"; + } + if (nbar>0 && nbar \n"; + pictex << "\\putrectangle <5mm,-" << 2.5*j << "ex> corners at " << + xmax << " " << ymax << " and " << xmax+0.6/xunit << " " << ymax-0.3/yunit << "\n"; + } + if (nbar!=0 && nbar==nofbar-1) { + pictex << "\\shaderectanglesoff%\n"; + pictex << "\\dimen0=\\linethickness%\n"; + pictex << "\\setlength{\\linethickness}{6mm}%\n"; + pictex << "\\putrule <8mm,-" << 2.5*j << "ex> from " << + xmax << " " << ymax << " to " << xmax << " " << ymax-0.3/yunit << "\n"; + pictex << "\\setlength{\\linethickness}{\\dimen0}%\n"; + } + } + /* then labels */ + pictex << "\\put {" << series[i].legend; + if (series[i].type==1 && series[i].tline>0 && series[i].nreg>2) { + if (strlen(series[i].legend)>0) pictex << ", n=" << series[i].nreg; + else pictex << "n=" << series[i].nreg; + } + pictex << "} [lc] <1.4cm,-" << 2.5*j+1 << "ex> at " << xmax << " " << ymax << "\n"; + j++; + if (series[i].type==1 && series[i].tline==2 && series[i].nreg>2) { + pictex << "\\put "; + by=series[i].m1; ay=series[i].b; bx=series[i].m2; + pictex.precision(3); + if (ay>0) + pictex << "{\\footnotesize $(y=" << by << "x+" << ay << ", r^2=" << by*bx << ")$}"; + else pictex << "{\\footnotesize $(y=" << by << "x-" << (-1)*ay << ", r^2=" << by*bx << ")$}"; + pictex.precision(6); + pictex << " [lc] <1.4cm,-" << 2.5*j+1 << "ex> at " << xmax << " " << ymax << "\n"; + j++; + } + } + if (series[i].type==1) nxy++; + if (series[i].type==2) nline++; + if (series[i].type==3) nbar++; + } /* endfor i */ + } /* endif is_valid */ + /* pictex commands */ + if (nofrawpictex>0) pictex << "% .......... rawpictex ............. \n"; + for (i=0; i0) { + /* start values */ + mxmin=FLT_MAX; mymin=FLT_MAX; + mxmax=FLT_MIN; mymax=FLT_MIN; + for (i=0; i=x1)) { + if (series[i].ndx>n) { + wert1=series[i].x[n]-series[i].dx[n]; + wert2=series[i].x[n]+series[i].dx[n]; + } + else { + wert1=series[i].x[n]; + wert2=series[i].x[n]; + } + if (mxmin>wert1) mxmin=wert1; + if (mxmaxn) { + wert1=series[i].y[n]-series[i].dy[n]; + wert2=series[i].y[n]+series[i].dy[n]; + } + else { + wert1=series[i].y[n]; + wert2=series[i].y[n]; + } + if (mymin>wert1) mymin=wert1; + if (mymax + +class FASTPICTEX { + + typedef struct { + short type; /* type of graph: 0:ndef, 1:xy, 2:line, 3:bar */ + short tline; /* trendline for xy: 0:no, 1:yes no formula, 2: yes with formula */ + float m1, m2, b; /* linear regression line parameters */ + unsigned long nreg; /* number of data points for regression line */ + unsigned long ndata, nx, ny, ndx, ndy; /* number of data points */ + float *x; /* pointer to x values */ + float *y; /* pointer to y values */ + float *dx; /* pointer to x-errors */ + float *dy; /* pointer to y-errors */ + char **sig; /* pointer to sig. signs */ + char *legend; /* pointer to legend string */ + } + SERIES; + + /* holds plot symbols */ + char plotsym[NSYMBOL][80]; + char linesym[NSYMBOL][80]; + short need_errorbarmacros; + + /* To add a new series */ + int AddSeries(); + + /* Get Extrema */ + int GetExtrema(short is_limit, float x1, float x2, float *xmin, float *xmax, float *ymin, float *ymax); + +public: + + float width, height; /* width and height of graph */ + short nofseries; /* number of series */ + short nofbar; /* number of bar graph series */ + short linenoxmax; /* fist line graph without x-values */ + short noftline; /* number of trendlines */ + short xgrid, ygrid; /* if 1 draw x/y-gridlines */ + char *xlabel, *ylabel, *heading; /* various labels */ + unsigned long nxticlabels; /* number of ticlabels */ + char **xticlabels; /* pointers to x tic labels */ + int nofrawpictex; /* number of pictex commands */ + char **rawpictex; /* raw pictex commands */ + SERIES *series; /* pointer to an array of SERIES */ + + /* Initialisierung der Registrierung */ + FASTPICTEX(); // Constructor; + ~FASTPICTEX(); // Destructor; + + /* function to read input file */ + int Read(char *fname); + + /* function to write PicTeX file */ + int Write(char *fname); + +}; /* Ende der Klassendefinition */ + +#endif diff --git a/support/fastpictex/src/global.h b/support/fastpictex/src/global.h new file mode 100644 index 0000000000..32bd0e05ee --- /dev/null +++ b/support/fastpictex/src/global.h @@ -0,0 +1,2 @@ +#define VERSION "0.9" +extern FASTPICTEX fpt; diff --git a/support/fastpictex/src/main.cc b/support/fastpictex/src/main.cc new file mode 100644 index 0000000000..e1f593954e --- /dev/null +++ b/support/fastpictex/src/main.cc @@ -0,0 +1,40 @@ +/* Program main.cc (FastPicTeX) */ +/* By Harald Stauss */ +/* Last change January 12, 2008 */ + +#include +#include "fastpictex.h" + +#ifdef DUMA + #include + #include "../../duma/duma.h" + #include "../../duma/dumapp.h" +#endif + +/* global variables */ +#define VERSION "0.9" +FASTPICTEX fpt; + +main(int argc, char *argv[]) { + int rc=0; + + /* hello world */ + std::cout << "FastPicTeX by Harald M. Stauss, Ver. " << VERSION << "\n"; + + /* allocate memory */ + + /* get command line parameters */ + if (argc!=3) { + rc=1; + std::cout << "number of parameters wrong! \n"; + std::cout << "usage: fastpictex fin fout \n"; + goto ende; + } + + fpt.Read(argv[1]); + + fpt.Write(argv[2]); + +ende: + return(rc); +} /* Ende von main */ diff --git a/support/fastpictex/src/myfunctions.cc b/support/fastpictex/src/myfunctions.cc new file mode 100644 index 0000000000..1bfb73b6b1 --- /dev/null +++ b/support/fastpictex/src/myfunctions.cc @@ -0,0 +1,211 @@ +#include +#include +#include +#include + +int myatoi(char *s, int *i) { + float wert; + int rc=0; + char *endp; + + wert=strtod(s, &endp); + if (s==endp) { + rc=0; + } + else { + *i=(int)floor(wert); + rc=1; + } + return(rc); +} + +int myatof(char *s, float *f) { + double wert; + int rc=0; + char *endp; + + wert=strtod(s, &endp); + if (s==endp) { + rc=0; + } + else { + *f=(float)wert; + rc=1; + } + return(rc); +} + +char *getsig(char *s) { + char *a, *b, *rc; + /* allocates memory for a string in */ + /* doublequotes and returns a pointer to it */ + if (strchr(s, '"')) { + a=strchr(s, '"'); + b=strrchr(s, '"'); + if (a n*(n*n-1)/3) return(rc); + js=(long)is; + if (js!= 2*(js/2)) js=js+1; + /* if (n>6) goto mark6; */ + goto mark6; + + /* Exact evaluation of probability */ + nfac=1; + for (i=1; i<=n; i++) { + nfac*=i; + l[i]=i; + } +mark1: + rc=1.0/(float)(nfac); + if (js != n*(n*n-1)/3) return(rc); + ifr=0; + for (m=1; m<=nfac; m++) { + ise=0; + for (i=1; i<=n; i++) { + ise+=(i-l[i])*(i-l[i]); + } + mark2: + if (js <= ise) ifr++; + n1=n; + mark3: + mt=l[1]; + nn=n1-1; + for (i=1; i<=nn; i++) { + l[i]=l[i+1]; + } + mark4: + l[n1]=mt; + if ((l[n1]!=n1) || (n1==2)) goto mark5; + n1--; + if (m!=nfac) goto mark3; + } +mark5: + rc=(float)(ifr)/(float)(nfac); + return(rc); + /* Evaluation by Edgeworth series expansion */ +mark6: + b=1.0/(double)(n); + x=(6.0*((double)(js)-1.0)*b/(1.0/(b*b)-1.0)-1.0)*sqrt(1.0/b-1.0); + y=x*x; + u=x*b*(c1+b*(c2+c3*b)+y*(-c4+b*(c5+c6*b)-y*b*(c7+c8*b-y*(c9-c10*b+y*b*(c11-c12*y))))); + /* Call to algorithm AS 66 */ + rc=u/exp(y/2.0)+alnorm(x,1); + if (rc < 0.0) rc=0.0; + if (rc > 1.0) rc=1.0; + return(rc); +} + + +/* + Algorithm AS66 Applied Statistics (1973) vol22 no.3 + Evaluates the tail area of the standardised normal curve + from x to infinity if upper is .true. or + from minus infinity to x if upper is .false. +*/ +float stdnorm(float x) { + return (1.0/sqrt(2*3.141592653))*exp(-0.5*x*x); +} +float alnorm(float x, int upper) { + float q; + + float stdnorm(float x); + extern float qtrap(float (*func)(float x), float a, float b); + + if (x==0.0) q=0; + else q=qtrap(&stdnorm, 0, x); + + if (upper) q=1.0-q-0.5; + else q+=0.5; + + return(q); +} + + +#define EPS 1.0e-5 +#define JMAX 20 +float qtrap(float (*func)(float), float a, float b) +{ + float trapzd(float (*func)(float), float a, float b, int n); + void nrerror(char error_text[]); + int j; + float s,olds; + + olds = -1.0e30; + for (j=1;j<=JMAX;j++) { + s=trapzd(func,a,b,j); + if (fabs(s-olds) < EPS*fabs(olds)) return s; + olds=s; + } + nrerror("Too many steps in routine qtrap"); + return 0.0; +} +#undef EPS +#undef JMAX + +#define FUNC(x) ((*func)(x)) +float trapzd(float (*func)(float), float a, float b, int n) +{ + float x,tnm,sum,del; + static float s; + int it,j; + + if (n == 1) { + return (s=0.5*(b-a)*(FUNC(a)+FUNC(b))); + } else { + for (it=1,j=1;j +#include +#include +#define NR_END 1 +#define FREE_ARG char* + +void nrerror(char error_text[]) +/* Numerical Recipes standard error handler */ +{ fprintf(stderr,"Numerical Recipes run-time error...\n"); + fprintf(stderr,"%s\n",error_text); + fprintf(stderr,"...now exiting to system...\n"); + exit(1); +} + +float *vector(long nl, long nh) +/* allocate a float vector with subscript range v[nl..nh] */ +{ + float *v; + + v=(float *)malloc((size_t) ((nh-nl+1+NR_END)*sizeof(float))); + if (!v) nrerror("allocation failure in vector()"); + return v-nl+NR_END; +} + +int *ivector(long nl, long nh) +/* allocate an int vector with subscript range v[nl..nh] */ +{ + int *v; + + v=(int *)malloc((size_t) ((nh-nl+1+NR_END)*sizeof(int))); + if (!v) nrerror("allocation failure in ivector()"); + return v-nl+NR_END; +} + +unsigned char *cvector(long nl, long nh) +/* allocate an unsigned char vector vith subscript range v[nl..nh] */ +{ + unsigned char *v; + + v=(unsigned char *)malloc((size_t) ((nh-nl+1+NR_END)*sizeof(unsigned char))); + if (!v) nrerror("allocation failure in cvector()"); + return v-nl+NR_END; +} + +unsigned long *lvector(long nl, long nh) +/* allocate an unsigned long vector with subscript range v[nl..nh] */ +{ + unsigned long *v; + + v=(unsigned long *)malloc((size_t) ((nh-nl+1+NR_END)*sizeof(long))); + if (!v) nrerror("allocation failure in lvector()"); + return v-nl+NR_END; +} + +double *dvector(long nl, long nh) +/* allocate a double vector with subscript range v[nl..nh] */ +{ + double *v; + + v=(double *)malloc((size_t) ((nh-nl+1+NR_END)*sizeof(double))); + if (!v) nrerror("allocation failure in dvector()"); + return v-nl+NR_END; +} + +float **matrix(long nrl, long nrh, long ncl, long nch) +/* allocate a float matrix with subscript range m[nrl..nrh][ncl..nch] */ +{ + long i, nrow=nrh-nrl+1,ncol=nch-ncl+1; + float **m; + + /* allocate pointers to rows */ + m=(float **) malloc((size_t)((nrow+NR_END)*sizeof(float*))); + if (!m) nrerror("allocation failure 1 in matrix()"); + m += NR_END; + m -= nrl; + + /* allocate rows and set pointers to them */ + m[nrl]=(float *) malloc((size_t)((nrow*ncol+NR_END)*sizeof(float))); + if (!m[nrl]) nrerror("allocation failure 2 in matrix()"); + m[nrl] += NR_END; + m[nrl] -= ncl; + + for(i=nrl+1;i<=nrh;i++) m[i]=m[i-1]+ncol; + + /* return pointer to array of pointers to rows */ + return m; +} + +double **dmatrix(long nrl, long nrh, long ncl, long nch) +/* allocate a double matrix with subscript range m[nrl..nrh][ncl..nch] */ +{ + long i, nrow=nrh-nrl+1,ncol=nch-ncl+1; + double **m; + + /* allocate pointers to rows */ + m=(double **) malloc((size_t)((nrow+NR_END)*sizeof(double*))); + if (!m) nrerror("allocation failure 1 in matrix()"); + m += NR_END; + m -= nrl; + + /* allocate rows and set pointers to them */ + m[nrl]=(double *) malloc((size_t)((nrow*ncol+NR_END)*sizeof(double))); + if (!m[nrl]) nrerror("allocation failure 2 in matrix()"); + m[nrl] += NR_END ; + m[nrl] -= ncl; + + for(i=nrl+1;i<=nrh;i++) m[i]=m[i-1]+ncol; + + /* return pointer to array of pointers to rows */ + return m; +} + +int **imatrix(long nrl, long nrh, long ncl, long nch) +/* allocate a int matrix with subscript range m[nrl..nrh][ncl..nch] */ +{ + long i, nrow=nrh-nrl+1,ncol=nch-ncl+1; + int **m; + + /* allocate pointers to rows */ + m=(int **) malloc((size_t)((nrow+NR_END)*sizeof(int*))); + if (!m) nrerror("allocation failure 1 in matrix()"); + m += NR_END; + m -= nrl; + + + /* allocate rows and set pointers to them */ + m[nrl]=(int *) malloc((size_t)((nrow*ncol+NR_END)*sizeof(int))); + if (!m[nrl]) nrerror("allocation failure 2 in matrix()"); + m[nrl] += NR_END; + m[nrl] -= ncl; + + for(i=nrl+1;i<=nrh;i++) m[i]=m[i-1]+ncol; + + /* return pointer to array of pointers to rows */ + return m; +} + +float **submatrix(float **a, long oldrl, long oldrh, long oldcl, long oldch, + long newrl, long newcl) +/* point a submatrix [newrl..][newcl..] to a[oldrl..oldrh][oldcl..oldch] */ +{ + long i,j,nrow=oldrh-oldrl+1,ncol=oldcl-newcl; + float **m; + + /* allocate array of pointers to rows */ + m=(float **) malloc((size_t) ((nrow+NR_END)*sizeof(float*))); + if (!m) nrerror("allocation failure in submatrix()"); + m += NR_END; + m -= newrl; + + /* set pointers to rows */ + for(i=oldrl,j=newrl;i<=oldrh;i++,j++) m[j]=a[i]+ncol; + + /* return pointer to array of pointers to rows */ + return m; +} + +float **convert_matrix(float *a, long nrl, long nrh, long ncl, long nch) +/* allocate a float matrix m[nrl..nrh][ncl..nch] that points to the matrix +declared in the standard C mamer as a[nrow][ncol], where nrow=nrh-nrl+1 +and ncol=nch-ncl+1. The routine should be called vith the address +&a[0][0] as the first argument. */ +{ + long i,j,nrow=nrh-nrl+1,ncol=nch-ncl+1; + float **m; + + /* allocate pointers to rows */ + m=(float **) malloc((size_t) ((nrow+NR_END)*sizeof(float*))); + if (!m) nrerror("allocation failure in convert_matrix()"); + m += NR_END; + m -= nrl; + + /* set pointers to rovs */ + m [nrl] =a-ncl; + for(i=1,j=nrl+1;i (dmaxarg2) ?\ +(dmaxarg1) : (dmaxarg2)) + +static double dminarg1,dminarg2; +#define DMIN(a,b) (dminarg1=(a),dminarg2=(b),(dminarg1) < (dminarg2) ?\ +(dminarg1) : (dminarg2)) + +static float maxarg1,maxarg2; +#define FMAX(a,b) (maxarg1=(a),maxarg2=(b),(maxarg1) > (maxarg2) ?\ +(maxarg1) : (maxarg2)) + +static float minarg1,minarg2; +#define FMIN(a,b) (minarg1=(a),minarg2=(b),(minarg1) < (minarg2) ?\ +(minarg1) : (minarg2)) + +static long lmaxarg1,lmaxarg2; +#define LMAX(a,b) (lmaxarg1=(a),lmaxarg2=(b),(lmaxarg1) > (lmaxarg2) ?\ +(lmaxarg1) : (lmaxarg2)) + +static long lminarg1,lminarg2; +#define LMIN(a,b) (lminarg1=(a),lminarg2=(b),(lminarg1) < (lminarg2) ?\ +(lminarg1) : (lminarg2)) + +static int imaxarg1,imaxarg2; +#define IMAX(a,b) (imaxarg1=(a),imaxarg2=(b),(imaxarg1) > (imaxarg2) ?\ +(imaxarg1) : (imaxarg2)) + +static int iminarg1,iminarg2; +#define IMIN(a,b) (iminarg1=(a),iminarg2=(b),(iminarg1) < (iminarg2) ?\ +(iminarg1) : (iminarg2)) + +#define SIGN(a,b) ((b) >= 0.0 ? fabs(a) : -fabs(a)) + +#if defined(__STDC__) || defined(ANSI) || defined(NRANSI) /* ANSI */ + +void nrerror(char error_text[]); +float *vector(long nl, long nh); +int *ivector(long nl, long nh); +unsigned char *cvector(long nl, long nh); +unsigned long *lvector(long nl, long nh); +double *dvector(long nl, long nh); +float **matrix(long nrl, long nrh, long ncl, long nch); +double **dmatrix(long nrl, long nrh, long ncl, long nch); +int **imatrix(long nrl, long nrh, long ncl, long nch); +float **submatrix(float **a, long oldrl, long oldrh, long oldcl, long oldch, + long newrl, long newcl); +float **convert_matrix(float *a, long nrl, long nrh, long ncl, long nch); +float ***f3tensor(long nrl, long nrh, long ncl, long nch, long ndl, long ndh); +void free_vector(float *v, long nl, long nh); +void free_ivector(int *v, long nl, long nh); +void free_cvector(unsigned char *v, long nl, long nh); +void free_lvector(unsigned long *v, long nl, long nh); +void free_dvector(double *v, long nl, long nh); +void free_matrix(float **m, long nrl, long nrh, long ncl, long nch); +void free_dmatrix(double **m, long nrl, long nrh, long ncl, long nch); +void free_imatrix(int **m, long nrl, long nrh, long ncl, long nch); +void free_submatrix(float **b, long nrl, long nrh, long ncl, long nch); +void free_convert_matrix(float **b, long nrl, long nrh, long ncl, long nch); +void free_f3tensor(float ***t, long nrl, long nrh, long ncl, long nch, + long ndl, long ndh); + +#else /* ANSI */ +/* traditional - K&R */ + +void nrerror(); +float *vector(); +/* Rest of traditional declarations are here on the diskette. */ + +#endif /* ANSI */ + +#endif /* _NR_UTILS_H_ */ + diff --git a/support/fastpictex/src/scale.cc b/support/fastpictex/src/scale.cc new file mode 100644 index 0000000000..11f8eedc94 --- /dev/null +++ b/support/fastpictex/src/scale.cc @@ -0,0 +1,66 @@ +/* + SUBROUTINE SCALE(FMN, FMX, N, VALMIN, STEP, VALMAX, IFAULT) + + ALGORITHM AS 96 APPL. STATIST. (1976) VOL.25, NO.1 + + Given extreme values FMN, FMX, and the need for a scale with N + marks, calculates value for the lowest scale mark (VALMIN) and + step length (STEP) and highest scale mark (VALMAX). +*/ + +#include + +int scale(float fmn, float fmx, int n, float *valmin, float *step, float *valmax) { + + float unit[12]={0.0, 1.0, 1.2, 1.6, 2.0, 2.5, 3.0, 4.0, 5.0, 6.0, 8.0, 10.0}; + int i, j, ifault, nunit=11;; + float tol=5.0e-6; + float bias=1.0e-4; + float fmax, fmin, rn, x, s, range; + + fmax=fmx; + fmin=fmn; + ifault=1; + + /* Test for valid parameter values */ + if ((fmax < fmin) || (n <= 1)) return(ifault); + ifault=0; + rn=(float)(n - 1.0); + x=fabs(fmax); + if (x == 0.0) x=1.0; + if ((fmax-fmin)/x <= tol) { + /* All values effectively equal */ + if (fmax < 0.0) fmax=0.0; + else if (fmax == 0.0) fmax=1.0; + else fmin=0.0; + } + *step=(fmax-fmin)/rn; + s=*step; + + /* Find power of 10 */ + while (s<1.0) s*=10.0; + while (s>=10.0) s/=10.0; + + /* Calculate STEP */ + x=s-bias; + i=1; + while ((i<=nunit) && (x>unit[i])) i++; + *step=(*step)*unit[i]/s; + range=(*step)*rn; + + /* Make first estimate of VALMIN */ + x=0.5 * (1.0 +(fmax+fmin-range)/(*step)); + j=(int)(x-bias); + if (x<0.0) j--; + *valmin=(*step)*(float)j; + /* Test if VALMIN could be zero */ + if ((fmin >= 0.0) && (range >= fmax)) *valmin=0.0; + *valmax=(*valmin)+range; + + /* Test if VALMAX could be zero */ + if ((fmax > 0.0) || (range < (-1)*fmin)) return(ifault); + *valmax=0.0; + *valmin=(-1)*range; + return(ifault); +} + -- cgit v1.2.3