Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

Is it possible to modifiy the plot style (for example color) for every plot in a tikzpicture environment at once?

I tried this, but it didn't work:

\documentclass{article}

\usepackage{pgfplots}
\usepackage{tkz-fct}
\usetkzobj{all}

\begin{document}

\begin{tikzpicture}[scale=.5,every plot/.style={color=green,thick}]
\tkzInit[xmax=10,ymax=10]
\tkzAxeXY
\tkzGrid
\tkzFct[domain=0:10]{\x}
\tkzFct[domain=0:10]{\x**2}
\end{tikzpicture}


\end{document}
share|improve this question

1 Answer 1

up vote 3 down vote accepted

You can use a scope

\documentclass{article}    
\usepackage{pgfplots}
\usepackage{tkz-fct}
\usetkzobj{all}

\begin{document}

\begin{tikzpicture}[scale=.5]
\tkzInit[xmax=10,ymax=10]
\tkzAxeXY
\tkzGrid
\begin{scope}[color=red,thick]
    \tkzFct[domain=0:10]{\x}
    \tkzFct[domain=0:10]{\x**2}     
\end{scope}

\end{tikzpicture}

\end{document} 

enter image description here

share|improve this answer
    
pgfplots is a more powerful tool than my package and I'm sure you can find something more consistent with pgfplots to define the style of the plots –  Alain Matthes Jan 2 '12 at 17:55

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.