summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/doc/latex/sparklines
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2009-11-23 00:09:17 +0000
committerKarl Berry <karl@freefriends.org>2009-11-23 00:09:17 +0000
commit2ad99864320c53576bcc36ed5f06c55a265d92fc (patch)
tree60ef1bb2e2ee3dae0865349c08ce830b280ed219 /Master/texmf-dist/doc/latex/sparklines
parent4f453c2ddb846146a153d122f584535aee4304b3 (diff)
sparklines update (22nov09)
git-svn-id: svn://tug.org/texlive/trunk@16131 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/doc/latex/sparklines')
-rw-r--r--Master/texmf-dist/doc/latex/sparklines/sparklines.pdfbin58998 -> 71033 bytes
-rw-r--r--Master/texmf-dist/doc/latex/sparklines/sparklines.tex87
2 files changed, 52 insertions, 35 deletions
diff --git a/Master/texmf-dist/doc/latex/sparklines/sparklines.pdf b/Master/texmf-dist/doc/latex/sparklines/sparklines.pdf
index 92df9977a8d..1216b19649a 100644
--- a/Master/texmf-dist/doc/latex/sparklines/sparklines.pdf
+++ b/Master/texmf-dist/doc/latex/sparklines/sparklines.pdf
Binary files differ
diff --git a/Master/texmf-dist/doc/latex/sparklines/sparklines.tex b/Master/texmf-dist/doc/latex/sparklines/sparklines.tex
index 04bf93b76bc..2bc3eae5a2b 100644
--- a/Master/texmf-dist/doc/latex/sparklines/sparklines.tex
+++ b/Master/texmf-dist/doc/latex/sparklines/sparklines.tex
@@ -15,31 +15,12 @@
\title{Sparklines}
\author{Andreas Loeffler \and Dan Luecking}
-\date{updated 20.~April 2009}\maketitle
+\date{updated 21.~November 2009 (version 1.5)}\maketitle
\section{What are sparklines?}
-Sparklines are intense, simple, wordlike graphics (so named by Edward
-Tufte). In lieu of a more detailed introduction, Professor Tufte's site
-has an early release of a chapter on sparklines, see
-www.edwardtufte.com. A PHP implementation can be found at
-http://sparkline.sourceforge.net/.
-
-A sparkline can be added using the \env{sparkline}--environment.
-Also, you can add sparkling rectangles for the median and special
-sparkling dots in red or blue. Sparklines do not appear within a
-dvi-file, they require either pdflatex or conversion to postscript with
-dvips. The \textsf{sparklines} package requires the \pkg{pgf} package.
-This makes it incompatible with \pkg{pictex}: the combination both
-require too many dimension parameters. It is possible \pkg{sparklines}
-can be used with \pkg{pictexwd}; they can at least be loaded together
-without using too many dimensions, but no other test was conducted.
-
-If we want to add a sparkline, be careful not to leave an empty line
-between the text left of the sparkline and the environment itself,
-since otherwise the sparkline starts a new paragraph.
-
-This is an example of sparkline:
+Sparklines are intense, simple, wordlike graphics, so named by Edward
+Tufte. This is an example of sparkline:
\begin{sparkline}{10}
% This environment has now an own coordinate system. x and y run from 0 to 1.
%
@@ -58,12 +39,31 @@ This is an example of sparkline:
\spark 0.1 0.95 0.2 0.8 0.3 0.3 0.4 0.52 0.5 0.62
0.6 0.7 0.7 0.5 0.8 0.4 0.9 0.25 1 0.2 /
\end{sparkline}
-Daimler Chrysler, 12\%, \textcolor{red}{129})
+(the stock price of Daimler Chrysler, for example).
%
+In lieu of a more detailed introduction, Professor Tufte's site
+has an early release of a chapter on sparklines, see
+www.edwardtufte.com. A PHP implementation can be found at
+http://sparkline.sourceforge.net/.
-\section{Usage}
+A sparkline can be added using the \env{sparkline}--environment.
+Also, you can add sparkling rectangles for the median and special
+sparkling dots in red or blue. If we want to add a sparkline, be careful not to leave an empty line
+between the text left of the sparkline and the environment itself,
+since otherwise the sparkline starts a new paragraph.
+
+Sparklines do not appear within a
+dvi-file, they require either pdflatex or conversion to postscript with
+dvips. The \textsf{sparklines} package requires the \pkg{pgf} package.
+This makes it incompatible with \pkg{pictex}: the combination both
+require too many dimension parameters. It is possible that the package \pkg{sparklines}
+can be used with \pkg{pictexwd}; they can at least be loaded together
+without using too many dimensions, but no other test was conducted.
-The sparkline at the end of the previous section was created with the
+
+\section{Usage}
+\paragraph{Sparkline environment}
+The sparkline at the beginning of the previous section was created with the
following:
\begin{verbatim}
\begin{sparkline}{10}
@@ -88,6 +88,17 @@ font. You can redefine that macro (with \verb$\renewcommand$) to force
another height. Within the graphic, the $y$-coordinate runs from 0
(lowermost point) to 1 (uppermost).
+Each pair of numbers after the macro \verb$\spark$ represents a
+coordinate pair, giving the location of a point in the above described
+coordinate system. The macro draws a line from each point to the next.
+Each number must be followed by a space, and the list is terminated by a
+\texttt{/}. Be careful that there are an even number of coordinates. The
+thickness of the line that is created is the value of the length
+\verb$\sparklinethickness$, which the user may change (with
+\verb$\setlength$). The default value is \texttt{0.2pt}; the above
+example was created with the value \texttt{0.3pt}.
+
+\paragraph{Sparkrectangle}
The \verb$\sparkrectangle$ command produces a background rectangle. It
must be followed by two numbers, each followed by a space or the end of
the line. They are the $y$-coordinates of the bottom and top of the
@@ -99,6 +110,7 @@ which the user may redefine (with
\indent\verb$\definecolor{sparkrectanglecolor}{gray}{0.9}$\\
In the above example, it was first changed to a light green.
+\paragraph{Sparkdots}
The colored dots are produced by \verb$\sparkdot$, the diameter of the
dot is the value of the length \verb$\sparkdotwidth$, which the user may
change (with \verb$\setlength$). The default value is \texttt{1.2pt};
@@ -107,16 +119,7 @@ takes three parameters, each of which must be followed by a space or the
end of the line. The first two are the coordinates of the center of the
dot, the third is the color.
-Each pair of numbers after the macro \verb$\spark$ represents a
-coordinate pair, giving the location of a point in the above described
-coordinate system. The macro draws a line from each point to the next.
-Each number must be followed by a space, and the list is terminated by a
-\texttt{/}. Be careful that there are an even number of coordinates. The
-thickness of the line that is created is the value of the length
-\verb$\sparklinethickness$, which the user may change (with
-\verb$\setlength$). The default value is \texttt{0.2pt}; the above
-example was created with the value \texttt{0.3pt}.
-
+\paragraph{Bar graphs}
Bar graphs can be drawn easily:
\begin{sparkline}{5}
\sparkspike .083 .18
@@ -146,8 +149,22 @@ above example was drawn with it changed to \texttt{red}. The width of
each bar is the value of the length \verb$\sparkspikewidth$, which the
user may change (with \verb$\setlength$). The default is \texttt{2pt}.
+\paragraph{Colors} In case you want to change colors use
+\begin{verbatim}
+\definecolor{sparkrectanglecolor}{gray}{0.9}
+\definecolor{sparkspikecolor}{named}{red}
+\definecolor{sparklinecolor}{named}{red}
+\end{verbatim}
+before the sparkline environment (see a manual about defining colors in \LaTeX{} if you do not understand the definition of \emph{named} etc.).
+
+
+
\section*{Version history}
\begin{description}
+\item[] Nov 21, 2009
+
+version 1.5: Benno Puetz (puetz@mpipsykl.mpg.de) made change of colors possible.
+
\item[] Apr 20, 2009
version 1.4: Alexander Kowalski (Alexander.Kowarik@statistik.gv.at) found an error concerning spark-rectangles