Quantcast
Channel: Add fancy design to pgfplots (shadows, rounded corners, reflections) - TeX - LaTeX Stack Exchange
Viewing all articles
Browse latest Browse all 2

Add fancy design to pgfplots (shadows, rounded corners, reflections)

$
0
0

In our company we would like to run the client reportings in LaTeX, which works quite well, but we are struggeling with the design requirements for plots - we use pgfplots. Our aim is to get those fancy "kind of reflecting" plots, which also could use some shadow, so it looks a bit three-dimensional.

The only shadow we can get is this drop shadow, but it should look like the glowing shadow in the TikZ/PGF reference (v2.1 p.418), which seems only available for circles (at least for me). For the reflection I tried fadings, but this leeds to problems with the shadow. Also the fading does not work equal for all bars, but depends on their heights.

Last points are the round corners, which work, but for the top corners and the bottom corners (intererstingly not for the shadow). This also looks strange and it would be prefered to only get round top corners.

Below I attached a small sample with our current status and I would be glad for suggestions.

\documentclass{article}\usepackage{pgfplots}\usetikzlibrary{shadows}\begin{document}\tikzfading[name=fade down,    top color=transparent!30,    bottom color=transparent!0]\begin{tikzpicture}    \begin{axis}[axis x line*=bottom,            axis y line*=left, drop shadow]     \addplot[ybar, blue, fill,path fading=fade down, rounded corners=2pt]    coordinates{(1,2.9) (2,1.7) (3,4.2) (4,5.1) (5,4) (6,2.2)};\end{axis}\end{tikzpicture}\end{document}

Viewing all articles
Browse latest Browse all 2

Trending Articles