summaryrefslogtreecommitdiff
path: root/macros/latex/contrib/histogr/histogr.sty
blob: 45240d30fecf25b88e6826ff0173cdbe1c165003 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
%%
%% This is file `histogr.sty',
%% generated with the docstrip utility.
%%
%% The original source files were:
%%
%% histogr.dtx  (with options: `package')
%% 
%% IMPORTANT NOTICE:
%% 
%% For the copyright see the source file.
%% 
%% Any modified versions of this file must be renamed
%% with new filenames distinct from histogr.sty.
%% 
%% For distribution of the original source see the terms
%% for copying and modification in the file histogr.dtx.
%% 
%% This generated file may be distributed as long as the
%% original source files, as listed above, are part of the
%% same distribution. (The sources need not necessarily be
%% in the same archive or directory.)
%% File: histogr.dtx Copyright (C) 1987-1997 Rainer Sch\"opf
\NeedsTeXFormat{LaTeX2e}
\ProvidesPackage{histogr}
         [1997/02/13 v1.01 Histogram (RmS)]
\newcount\hist@x
\newcount\hist@y
\newcount\hist@ystart
\newif\ifhist@vert

\let\verticallines\hist@verttrue
\let\noverticallines\hist@vertfalse

\hist@verttrue
\def\histogram(#1,#2){\hist@x #1 \hist@y #2 \hist@ystart\hist@y
  \hist@next}
\def\hist@next{\@ifnextchar ({\hist@box}{\hist@end}}
\def\hist@box(#1,#2){\@tempcnta -\hist@x
   \advance\@tempcnta #1
   \ifnum \@tempcnta >\z@
        \put(\hist@x,\hist@y){\line(1,0){\@tempcnta}}\else
        \put(\hist@x,\hist@y){\line(-1,0){-\@tempcnta}}\fi
   \hist@x #1
   \ifhist@vert
      \ifnum \hist@y >#2 \@tempcnta\hist@y
        \else \@tempcnta #2 \fi
      \@tempcntb\@tempcnta
      \advance\@tempcnta -\hist@ystart
      \put(\hist@x,\@tempcntb){\line(0,-1){\@tempcnta}}%
   \else
      \@tempcnta -\hist@y
      \advance\@tempcnta #2
      \ifnum \@tempcnta >\z@
         \put(\hist@x,\hist@y){\line(0,1){\@tempcnta}}\else
         \put(\hist@x,\hist@y){\line(0,-1){-\@tempcnta}}\fi
   \fi
   \hist@y #2\hist@next}
\def\hist@end{}
\endinput
%%
%% End of file `histogr.sty'.