# Mathematica 9 style plots

Here’s a way of doing Mathematica 9 style plots with PGFPlots: the first plot is simply a ycomb plot, and the second we can draw using separate plots for the areas (with a trailing \closedcycle to get the filling right) and the lines.

This code was written by Jake on TeX.SE.

\documentclass[border=10pt]{standalone}
\usepackage{pgfplots}
\pgfplotsset{width=7cm,compat=1.6}
\begin{document}
\begin{tikzpicture}
\begin{axis}[
ymin=0,
xtick=\empty,
ytick=\empty,
axis background/.style={fill=gray!10},
]
\addplot [ycomb, red, very thick, mark=*, mark options={red!60!black}] table {data.dat};
\end{axis}
\end{tikzpicture}

\begin{tikzpicture}
\begin{axis}[
ymin=0,
xtick=\empty,
ytick=\empty,
axis background/.style={fill=gray!10},
enlarge x limits=false
]
\addplot [draw=none, fill=orange!40!yellow] table {data.dat} \closedcycle;
\addplot [draw=gray, very thick] table {data.dat};

\end{document}