Advertisement
Guest User

Untitled

a guest
Jul 7th, 2015
200
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.15 KB | None | 0 0
  1. documentclass[a4paper,11pt]{article}
  2. usepackage{tikz,pgfplots}
  3. usetikzlibrary{fadings}
  4. begin{document}
  5. begin{tikzpicture}[>=stealth]
  6. begin{axis}[scale=3, domain=-1.1:6.5, xmin=-1, xmax=6.5,ymax=2, axis lines=none]
  7.  
  8. addplot+[no marks,red,dashed,domain=-1:6.5] {0.7};
  9. addplot+[no marks,red,dashed,domain=-1:6.5,path fading=east] {0.8}; %not working
  10.  
  11.  
  12. draw[red,dashed,path fading=east] (axis cs:-1,0.9) -- (axis cs:6.5,0.9); %not working
  13. draw[red,dashed,path fading=east] (axis cs:-1,0.9) -- (axis cs:6.5,1);
  14.  
  15. end{axis}
  16.  
  17. end{tikzpicture}
  18. end{document}
  19.  
  20. documentclass[a4paper,11pt]{article}
  21. usepackage{pgfplots}
  22. pgfplotsset{compat=1.7}
  23. usetikzlibrary{fadings}
  24.  
  25. begin{document}
  26. begin{tikzpicture}[>=stealth]
  27. begin{axis}[domain=-1.1:6.5, xmin=-1, xmax=6.5,ymax=2, axis lines=none]
  28.  
  29. addplot+[no marks,red,dashed,domain=-1:6.5] {0.7};
  30. addplot+[no marks,red,dashed,domain=-1:6.5,path fading=east,fit fading=false] {0.8}; %now working
  31.  
  32.  
  33. draw[red,dashed,path fading=east] (axis cs:-1,0.9) -- (axis cs:6.5,0.9) ++(0,1pt); %now working
  34. draw[red,dashed,path fading=east] (axis cs:-1,0.9) -- (axis cs:6.5,1);
  35.  
  36. end{axis}
  37.  
  38. end{tikzpicture}
  39. end{document}
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement