With pgfplots
one can for axis
use the options minor xtick
and minor ytick
together with grid=minor
to manually produce grid lines. If one use such grid lines one may want to emphasize a certain region bounded by the grid lines and the axes by filling it with some color. Is this possible?
Here is an example to illustrate the problem. Say that I have the following
\documentclass{article}
\usepackage{pgfplots}
\begin{document}
\begin{tikzpicture}
\begin{axis}[
minor ytick={2},
minor xtick={2},
grid=minor
]
\addplot{x};
\end{axis}
\end{tikzpicture}
\end{document}
which produces
and say that I want to emphasize upper right region that is bounded by the grid lines and the axes. How can I do this? That is, to produce something like the following: