[Tex/LaTex] Is there a common pgfplots styles/templates repository

pgfplotstemplates

I (try to) use the same plot layout in pgfplots everytime. I keep having to input the same details and although I do my best to cut and paste, it would be great if there were a simple set of chart types that could be used over and over again.

I know the value of pgfplots and pgfplottables is the ability to change everything and anything but most people use the same simple plots each time.

Basically, is there a simple repository/ set of templates for eg scatter plot, line plots, area charts, (no pie charts;) ), pareto plots, linked axes (like in a previous question of mine how to have linked axes on plots) and similar to this question on how to generate chart templates.

I am not requesting Excel Templates but more simpler pgfplots styles which can be selected out of the box with minimal user adjustment/interaction. By all means have the user change titles, legend, marks etc but the overall layout can be a style.

Should this be a community wiki question?

Or for some hardliners out there should it be closed immediately and removed!

EDIT:
Following the comments from @JosephWright and @ChristianFeuersaenger I have decided to add the following:

Would pgfplots users post some code of their favourite plot styles, giving the type of plot (Scatter, Bode, Pareto, Histogram, etc) and maybe a picture of it. (or at least an MWE so people can check it out themselves)

Best Answer

A template library for different plots styles would not work, because there a to many different kinds of data and ways to present the data. Futhermore the style depends on the personal taste. For example I prefer to have the ticks outside of the plot, other find it more elegant to have them inside of the plot. Next question is if the opposide axis should have ticks or not.

Coming back to your question, you do not have to repeat yourself by "copy and paste". You can define your own styles and reuse them. Hence if you change your mind or your supervisor you only have to change it in one place. Here is one example:

\documentclass{standalone}

\usepackage{pgfplots}
\pgfplotsset{compat=1.5}
\usepackage{siunitx}
\SendSettingsToPgf

% define a general plot style
\pgfplotsset{general plot/.style={ 
        xtick pos=left,
        ytick pos=left,
        enlarge x limits=false,
        minor x tick num=1,
        every x tick/.style={color=black, thin},
        every y tick/.style={color=black, thin},
        tick align=outside,
        xlabel near ticks,
        ylabel near ticks,
    } 
}

% define a plot style for absorbance
\pgfplotsset{ir absorbance/.style={
        general plot, % reuse the general plot style
        x dir= reverse,
        ytick = \empty,
        % insteed of hard coding the unit you could also use
        % the pgfplots unit library
        xlabel=Wavenumber (\si{\per\centi\metre}),
        ylabel=Absorbance (a.\,u.),
    }
}

\pgfplotsset{ir absorbance data/.style={mark=none}}

\begin{document}
    \begin{tikzpicture}
        \begin{axis}[ir absorbance,
            domain=2000:2200, samples=100 % only needed for the function plottiong
        ]
            \addplot[ir absorbance data] { % here you would have: table[...] {mydata.txt}
                exp(-((x-2080)^2/40))
            };
        \end{axis}
    \end{tikzpicture}
\end{document}

Example

Related Question