# Can I truncate very high bars in a pgfplots bar plot? [duplicate]

\documentclass[11pt]{article}

\begin{filecontents*}{table.dat}
type    v1  v2  v3 v4 v5  v6 v7
t1 0 0 0 0 0 0 0 0 0 0 0 0 0 6
t2 5 17 4 0 0 0 21 0 133 4 91 0 1 93
t3 18 0 0 0 18 0 15 0 0 111 37 0 0 48
t4 12 0 14 0 0 0 18 0 38 0 38 0 0 30
t5 3 69 4 0 64 0 69 0 80 29 6 0 1 21
t6 28 4 10 0 10 0 33 6 58 0 48 0 21 29
t7 25 144 2 0 0 0 180 0 200 0 193 0 52 370
\end{filecontents*}

\usepackage{pgfplots}
\pgfplotsset{compat=1.3}

\usepackage{lipsum}

\begin{document}
\lipsum[1]
\begin{figure}[h]
\noindent
\begin{tikzpicture}
\begin{axis}[
ybar=2pt,
bar width=3pt,
width=\textwidth,
height=3cm,
axis lines=none,
ytick=\empty,
symbolic x coords={ t1, t2, t3, t4, t5, t6, t7 }
]

\end{axis}
\end{tikzpicture}
\end{figure}
\lipsum[1]
\end{document}


As you can see, I have only two very high bars that make everything else indiscernible.

For various reasons I don't like the idea to use a log axis just for these two values.

Is there a way to truncate in some way the tall bars, so that they have a manageable height? In contrast to just tweak the data to have a smaller bar, I'm looking for something that visually hints at this truncation.

• Maybe you can find something useful here: how to draw interrupted bar charts in pgfplots or here: Axis break in pgfplots – leandriis Jun 26 at 19:36
• Or just add ymax=... where ... is an appropriate value? – user121799 Jun 26 at 19:37
• @leandriis the only solution to that question is a Ps tricks one, but I’m using pgfplots – gigabytes Jun 26 at 19:40
• I confirm that @leandriis' link is on pgfplots. Did you really follow it? – user121799 Jun 26 at 20:55
• As suggested: possible duplicate of Axis break in pgfplots – Marijn Jun 26 at 21:30