# How to change the thickness of a sparkline?

I tried to use a sparkline in my text, as shown in the documentation:

\documentclass[a4paper,10pt]{article}
\usepackage{sparklines}

\begin{document}

\begin{sparkline}{5}
\sparkspike .083 .18
\sparkspike .25 .55
\sparkspike .417 1
\sparkspike .583 .62
\sparkspike .75 .42
\sparkspike .917 .5
\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 /
\sparkdot 1 0.2 blue
\end{sparkline}\space

\end{document}


However, the line is too thick and blocks out the bars:

According to the documentation the thickness of the line can be changed using:

\setlength\sparklinethickness{0.2pt}


But this does not change the thickness of the line. I am using Kubuntu 16.04.

You are using a wrong version of the sparklines package. The default version installed with (K)Ubuntu 16.04 is sparklines 1.6 (an old version from 2014) which behaves differently.

## How to notice this

Look at the .log file or the output tab of your editor of choice. There you will find a section that looks something like this:

/usr/share/texlive/texmf-dist/tex/latex/sparklines/sparklines.sty
Package: sparklines 2014/10/19 v1.6 Sparklines (see more about sparklines at ww
w.EdwardTufte.com)

Package: sparklines' 1.6bp  2014/10/19


This tells you that you are using an old (2014) version of the sparklines package, while the documentation you reference is for version 1.7 (2016).

## How to fix this

The easiest way to fix this is to download the new version of sparklines (sparklines.tex, sparklines.sty) from CTAN and place it in your project folder.

my_project/
├── example.tex
├── sparklines.sty
└── sparklines.tex


If you try to compile now, the local files will be used and you can use version 1.7 which behaves like you expect:

• The TeX live distributions that come in the package repositories with some well-known Linux distributions are very stable (read: outdated). If you want to have a more up-to-date system with full control via tlmgr` you should look into installing a "vanilla" TeX live. The strategy of updating only some packages directly from CTAN may work in some cases, but can cause more problems with more complex packages with many dependencies. May 30, 2018 at 13:28