I was wondering if anyone could point me in the direction of some good sources to learn about user-defined styles in pgfplots? I've been through the pgfplots manual but it seems to only touch on this subject. So far I've been able to define some styles of my own, and call them without any issues, but I'd like to expand on this functionality, and for that I need some more detail about what styles are and aren't capable of, and what the appropriate syntax is. Some of my questions are:
Q1: Can I define nested styles? For example, my preamble defines MyStyle1 like so:
\pgfplotsset{MyStyle1/.style={code-goes-here}} I then call this style in my document with something like this:
\begin{tikzpicture} \begin{axis}[MyStyle1] \addplot[MyStyleA] pseudo-code; \end{axis} \end{tikzpicture} What I'd like to do is have MyStyleA have one definition if the axis uses MyStyle1, and a different definition if the axis is using MyStyle2. Can this be done? How would I go about this?
Q2: How do I overwrite parts of a style? Let's say MyStyle1 includes the line xmin=5, and I apply MyStyle1 to an axis environment as above. I want the minimum x value to instead be 0, but to otherwise use all other settings from MyStyle1. How do I override this for just this axis environment (i.e. not affect any other things that use MyStyle1)?
Q3: Are there any limitations to what I can put in a style? I'm assuming any settings I can put in [] brackets can also be put in a style. Any exceptions or additions to this rule?
