I am trying to show graphically the solution to the system of linear inequalities
\begin{equation*}
\begin{cases}
7x + 3y \geq 21 \\
-x + 3y < -3
\end{cases}
.
\end{equation*}
There are some modifications that I want to the display. First, I use pattern=north east lines for the solution set to 7x + 3y \geq 21. The lines are too close. I do not want the boundary. Second, I get an error when I tried to compile the code with pattern=south east lines. Third, I do not want these lines indicating the solution sets to interfere with the tick marks.
\documentclass{amsart}
\usepackage{tikz}
\usetikzlibrary{calc,angles,positioning,intersections,quotes,decorations.markings,backgrounds,patterns}
\usepackage{pgfplots}
\pgfplotsset{compat=1.11}
\begin{document}
\begin{center}\Large{\bf Algebra 2}\end{center}\vskip0.3in
\noindent \hspace*{\fill}
\begin{tikzpicture}
\begin{axis}[width=6in,grid=both,grid style={line width=.1pt, draw=gray!10},
axis equal image,
axis lines=middle,
xmin=-11,xmax=11,
ymin=-11,ymax=11,
restrict y to domain=-11:11,
xtick={},ytick={},
ticklabel style={font=\tiny,fill=white},
enlargelimits={abs=0.25cm},
axis line style={latex-latex},
axis line style={shorten >=-7.5pt, shorten <=-7.5pt},
xlabel=$x$,
ylabel=$y$,
xlabel style={at={(ticklabel* cs:1)},anchor=north west},
ylabel style={at={(ticklabel* cs:1)},anchor=south west}
]
\coordinate (P) at (-9/7,10);
\coordinate (Q) at (10,10);
\coordinate (R) at (10,-10);
\coordinate (S) at (51/7,-10);
\draw[pattern=north east lines] (P) -- (Q) -- (R) -- (S);
\coordinate (P1) at (-10,-13/3);
\coordinate (Q1) at (10,7/3);
\coordinate (R1) at (10,-10);
\coordinate (S1) at (-10,-10);
%\draw[pattern=south east lines] (P1) -- (Q1) -- (R1) -- (S1);
\addplot[latex-latex,samples=2,domain=-1.5:7.5,blue] {(-7/3)*x + 7};
\addplot[latex-latex,samples=2,domain=-10:10,dashed,green] {(1/3)*x -1};
\node[anchor=north west] at (axis description cs:1,0.5) {$x$};
\node[anchor=north west] at (axis description cs:0.5,1) {$y$};
\end{axis}
\end{tikzpicture}
\end{document}

north eastlines. That is nice. The lines are too densely packed. Is there a better way to shade than usingpatternsor usingnorth eastandnorth westoptions in patterns? – user74973 Jun 10 '15 at 13:03x=10just as much. – user74973 Jun 10 '15 at 13:10line space=parameter to get the desired results. Also extended the domain of the orange line to get the arrow past the pattern. – Peter Grill Jun 10 '15 at 17:49draw=none. – user74973 Jun 10 '15 at 19:08circle,inner sep=1.5ptto the options forticklabel style=. The display looks much better with less white space in the mesh of hatching. – user74973 Jun 10 '15 at 22:25north eastandnorth westlines below thegrid. When I compile your code, thenorth eastandnorth westlines are drawn above thegrid, which is distracting. How do I get these hatching lines above the grid? – user74973 Jun 10 '15 at 22:25