I am interested in adding a background-color to my pgfplots
plot that extends beyond the axis of the plot. See the image bellow for clarification; I am interested in adding a background color such as the plot in the image.
How would you achieve this?
Example from: The pgfplots manual (Christian Feuersänger, 2012, p. 20)
Best Answer
As Qrrbrbirlbel suggested, you might use the
backgrounds
library from TikZ. The example I provide you uses as predefined color the same one adopted in the pgfmanual and in the pgfplots documentation, but it can be easily changed via a specific key.The code:
The result: