Advertisement
Guest User

Untitled

a guest
Oct 27th, 2016
52
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.55 KB | None | 0 0
  1. extra x ticks={-8},
  2. extra x tick style={ticklabel style={font=scriptsize, inner xsep=10pt, fill=white}},
  3. extra x tick labels={makebox[0pt][r]{$-$}8},
  4.  
  5. documentclass{amsart}
  6. usepackage{amsmath}
  7. usepackage{amsfonts}
  8.  
  9. usepackage{tikz}
  10. usetikzlibrary{calc,intersections}
  11.  
  12.  
  13.  
  14. usepackage{pgfplots}
  15. pgfplotsset{compat=1.11}
  16.  
  17.  
  18. begin{document}
  19.  
  20. begin{tikzpicture}
  21.  
  22.  
  23.  
  24. begin{axis}[width=3.5in, height=3.5in, axis lines=middle, axis on top, clip=false,
  25. axis lines=middle,
  26. xmin=-10,xmax=10,
  27. ymin=-2.5,ymax=10,
  28. restrict y to domain=-2.5:10,
  29. xtick={8}, ytick={8},
  30. ticklabel style={font=scriptsize},
  31. xticklabels={8},
  32. extra x ticks={-8},
  33. extra x tick style={ticklabel style={font=scriptsize, inner xsep=10pt, fill=white}},
  34. extra x tick labels={makebox[0pt][r]{$-$}8},
  35. axis line style={latex-latex},
  36. xlabel=$x$,ylabel=$y$,
  37. axis line style={shorten >=-12.5pt, shorten <=-12.5pt},
  38. xlabel style={at={(ticklabel* cs:1)}, xshift=12.5pt, anchor=north west},
  39. ylabel style={at={(ticklabel* cs:1)}, yshift=12.5pt, anchor=south west}
  40. ]
  41.  
  42. addplot[samples=2, blue, domain=-10:0] {x + 8} node [anchor=south east, pos=0.35, font=footnotesize] {$y= vert x vert + y = 8$};
  43. addplot[samples=2, blue, domain=0:10] {-x + 8};
  44.  
  45. addplot[dashed, latex-latex, domain=-2.5:10] (6,x) node [pos=0.9, anchor=north, font=footnotesize, sloped] {$x=6$};
  46.  
  47. coordinate (A) at (6,0);
  48. coordinate (B) at (6,2);
  49. coordinate (C) at (0,8);
  50. coordinate (D) at (-8,0);
  51.  
  52. end{axis}
  53.  
  54. fill[gray!50, fill opacity=0.25] (A) -- (B) -- (C) -- (D) -- cycle;
  55.  
  56. end{tikzpicture}
  57.  
  58. end{document}
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement