# Cylindrical Bar Chart

I know this might be a long shot, but does anyone happen to know (or point me to where to start) how to draw this chart. Say we have 6 values (5, 10, 15, 20, 25, 30), one for each column.

• Where is the chart? They are cylinders on a plate. Do they actually represent anything? – percusse Aug 11 '14 at 7:51
• An ybar plot with pgfplots would be several orders of magnitude easier to understand than this example... For graphs often less is better. – s__C Aug 11 '14 at 8:03

For an actual graph where you plan to communicate something useful about your data you don't (or shouldn't) want it to look like this. But simply as an exercise the following, while a bit kludgy, is a first step in the right direction:

\documentclass[tikz,border=5]{standalone}
\tikzset{pics/.cd,
cylinder/.style 2 args={%
code={
\colorlet{cylinder color}{#2}
\edef\ch{#1}
\foreach \i in {-1,1}{
\begin{scope}[yscale=\i]
\ifnum \i=1
\path [circular glow={fill=black, opacity=0.25}]
\else
\def\ch{2}
\fi
\begin{scope}
\clip [preaction={left color=cylinder color, right color=cylinder color!25!black}] (1,0) arc (360:180:1 and 1/2) -- ++(0,\ch) arc (180:0:1 and 1/3) -- cycle;
(0.75,-1) rectangle (1,\ch+1);
(0.75,-1) rectangle (0.25,\ch+1);
(-0.5,-1) rectangle (-0.875,\ch+1);
(-0.5,-1) rectangle (-0.125,\ch+1);
\end{scope}
\ifnum\i<0\relax
\fill [white, opacity=0.25]
(-1,0) rectangle (1,\ch+1/2);
(-1,0) rectangle (1,\ch+1/2);
\else
\shade [left color=cylinder color, right color=cylinder color!25!black,