Hello Thorsten,
first of all: Thanks a lot. I decided to use pgfplots. In my eyes it is much more convenient for my purpose than gnuplot.
I got it working with this approach:
Code: Select all
\documentclass[10,a4paper]{scrartcl}
\usepackage{pgfplots}
\begin{document}
\newcommand{\setWidthCoal}{\textwidth}
\newcommand{\setXLabelCoal}{Tage}
\begin{figure}
\begin{tikzpicture}
\begin{axis}[width=\setWidthCoal,xlabel=\setXLabelCoal]
\addplot[color=blue,mark=*] coordinates {(1,8)(2,16)(3,32)(4,64)(5,128)(6,256)(7,512)};
\end{axis}
\end{tikzpicture}
\end{figure}
\end{document}
It is ok, but it would be much better, if i could use it like that:
Code: Select all
\documentclass[10,a4paper]{scrartcl}
\usepackage{pgfplots}
\begin{document}
\newcommand{\setAxisCoal}{width=\textwidth,xlabel=Tage}
\begin{figure}
\begin{tikzpicture}
\begin{axis}[\setAxisCoal]
\addplot[color=blue,mark=*] coordinates {(1,8)(2,16)(3,32)(4,64)(5,128)(6,256)(7,512)};
\end{axis}
\end{tikzpicture}
\end{figure}
\end{document}
But i get "! Missing \endcsname inserted." with this. Is there a way to fix this?