Advertisement
Guest User

Untitled

a guest
Aug 18th, 2019
92
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.88 KB | None | 0 0
  1. documentclass[letterpaper]{article}
  2. usepackage{pgfplots,amsmath}
  3. usepgfplotslibrary{dateplot}
  4. pgfplotsset{compat=1.11}
  5.  
  6. begin{document}
  7.  
  8. begin{tikzpicture}
  9.  
  10. begin{axis}[date coordinates in=x,
  11. x tick label style={rotate=90,anchor=near xticklabel},
  12. xticklabel=day. hour:minute,
  13. date ZERO=2009-08-18]
  14.  
  15. %% I want to restrict the range of the plot over certain dates and times.
  16.  
  17.  
  18. addplot[restrict x to domain=2009-08-18 09:00:2009-08-18 15:00]
  19. coordinates {
  20. (2009-08-18 09:00, 050)
  21. (2009-08-18 12:00, 100)
  22. (2009-08-18 15:00, 100)
  23. (2009-08-18 18:35, 100)
  24. (2009-08-18 21:30, 040)
  25. (2009-08-19 2:00, 020)
  26. (2009-08-19 3:00, 000)
  27. (2009-08-19 6:00, 035)
  28. };
  29. end{axis}
  30.  
  31. end{tikzpicture}
  32. end{document}
  33.  
  34. restrict x to domain=2009-08-18 09:00:2009-08-18 15:00
  35.  
  36. xmin=2009-08-18 09:00, xmax=2009-08-18 15:00,
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement