Advertisement
Guest User

Untitled

a guest
Jul 30th, 2016
76
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.97 KB | None | 0 0
  1. usepackage{pgfplots}
  2. pgfplotsset{width=10cm,compat=newest}
  3. usepgfplotslibrary{units}
  4. usetikzlibrary{spy,backgrounds}
  5. usepackage{pgfplotstable}
  6. usepackage{siunitx}
  7. pgfplotstableread{
  8. 0.0 1.0
  9. 0.0 -0.5
  10. }datatable
  11. begin{document}
  12.  
  13. begin{tikzpicture}[every pin/.style={fill=white}]
  14. begin{axis}[
  15. xlabel={Energy},
  16. ylabel={Intensity},
  17. x unit={eV}
  18. ]
  19. addplot +[mark=none] table [x index=0, y index=1] {datatable};
  20. addplot +[mark=none] {0.1*x^2};
  21.  
  22. coordinate (pt) at (axis cs:0,0);
  23. end{axis}
  24.  
  25. node[pin=70:{%
  26. begin{tikzpicture}[baseline,trim axis left,trim axis right]
  27. begin{axis}[
  28. tiny,
  29. xlabel={Energy},
  30. ylabel={Intensity},
  31. x unit={eV},
  32. xmin=-1,xmax=1,
  33. ymin=-0.2,ymax=0.2,
  34. enlargelimits,
  35. ]
  36. addplot +[mark=none] table [x index=0, y index=1] {datatable};
  37. addplot +[mark=none,error bars/y dir=both,
  38. error bars/y fixed=0.1] {0.1*x^2};
  39. end{axis}
  40. end{tikzpicture}%
  41. }] at (pt) {};
  42. end{tikzpicture}
  43.  
  44. end{document}
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement