Tendency indicator for bar charts

by Moka   Last Updated January 11, 2019 12:23 PM

I´d like to add an indicator to my bar chart to indicate which values are better. For example sales per days: bigger/more = better vs. bankruptcies per mio residents: less = better).

Q: How do you call such an "indicator" and how can I generate one with LaTeX (like tikzpicture or bchart)?. It would also be nice to use this indicator-icon within the text.

Here is an example of a bar chart depicting a hardware performance comparison (notice the small indicator at the lower right corner, stating "► Besser" ("Besser" = better [german]).

enter image description here



Answers 1


There are tons of such symbols available. This answer is only to tell you that, if you are thinking of building your own with TikZ, you may want use a \savebox when using it in a bar chart by pgfplots.

\documentclass[tikz,border=3.14mm]{standalone}
\usepackage{pgfplots}
\usetikzlibrary{patterns}
\pgfplotsset{compat=1.16}
\newsavebox\myarrow
\sbox\myarrow{\tikz[baseline]{\fill[blue](0,0.2) --(0.2,0.1) -- (0,0);}}
\begin{document}
\begin{tikzpicture}[font=\sffamily]
\begin{axis}[xbar,enlargelimits=0.15,
 symbolic y coords={Vancouver Island,Yellow bellied,Alpine},
 ytick={Vancouver Island,Yellow bellied,Alpine},
 title={Growth of marmot population (\usebox{\myarrow} is better)}]
    \addplot [draw=blue,
        pattern=horizontal lines light blue,
    ] coordinates {
        (2.5,Vancouver Island) (0.5,Yellow bellied) (0.2,Alpine)
    };
\end{axis}
\end{tikzpicture}
\end{document}

enter image description here

marmot
marmot
January 11, 2019 15:39 PM

Related Questions


LaTeX Horizontal Bar Chart, Gradient Color for Bars

Updated October 15, 2018 22:23 PM

Making a Stacked Bar Chart in Latex

Updated March 27, 2015 15:07 PM

Shifted Stacked Bars in Population Pyramid

Updated April 05, 2018 23:23 PM

Making bar charts for big values

Updated May 13, 2017 15:23 PM

how to remove label from bar in bar graph

Updated August 19, 2017 05:23 AM