Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- extra x ticks={-8},
- extra x tick style={ticklabel style={font=scriptsize, inner xsep=10pt, fill=white}},
- extra x tick labels={makebox[0pt][r]{$-$}8},
- documentclass{amsart}
- usepackage{amsmath}
- usepackage{amsfonts}
- usepackage{tikz}
- usetikzlibrary{calc,intersections}
- usepackage{pgfplots}
- pgfplotsset{compat=1.11}
- begin{document}
- begin{tikzpicture}
- begin{axis}[width=3.5in, height=3.5in, axis lines=middle, axis on top, clip=false,
- axis lines=middle,
- xmin=-10,xmax=10,
- ymin=-2.5,ymax=10,
- restrict y to domain=-2.5:10,
- xtick={8}, ytick={8},
- ticklabel style={font=scriptsize},
- xticklabels={8},
- extra x ticks={-8},
- extra x tick style={ticklabel style={font=scriptsize, inner xsep=10pt, fill=white}},
- extra x tick labels={makebox[0pt][r]{$-$}8},
- axis line style={latex-latex},
- xlabel=$x$,ylabel=$y$,
- axis line style={shorten >=-12.5pt, shorten <=-12.5pt},
- xlabel style={at={(ticklabel* cs:1)}, xshift=12.5pt, anchor=north west},
- ylabel style={at={(ticklabel* cs:1)}, yshift=12.5pt, anchor=south west}
- ]
- addplot[samples=2, blue, domain=-10:0] {x + 8} node [anchor=south east, pos=0.35, font=footnotesize] {$y= vert x vert + y = 8$};
- addplot[samples=2, blue, domain=0:10] {-x + 8};
- addplot[dashed, latex-latex, domain=-2.5:10] (6,x) node [pos=0.9, anchor=north, font=footnotesize, sloped] {$x=6$};
- coordinate (A) at (6,0);
- coordinate (B) at (6,2);
- coordinate (C) at (0,8);
- coordinate (D) at (-8,0);
- end{axis}
- fill[gray!50, fill opacity=0.25] (A) -- (B) -- (C) -- (D) -- cycle;
- end{tikzpicture}
- end{document}
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement