Advertisement
Guest User

Untitled

a guest
Aug 18th, 2019
106
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.68 KB | None | 0 0
  1. documentclass{standalone}
  2. usepackage{pgfplots}
  3. usepgfplotslibrary{dateplot}
  4. pgfplotsset{compat=1.9}
  5.  
  6. begin{document}
  7. begin{tikzpicture}
  8. begin{axis}[date coordinates in=x,date ZERO=2013-08-18,
  9. xticklabel=month-day,ymin=0,ymax=10000]
  10. addplot coordinates {
  11. (2013-08-18, 14)
  12. (2013-08-25, 245)
  13. (2013-08-31, 3412)
  14. (2013-09-04, 4567)
  15. (2013-09-05, 5001)
  16. (2013-09-12, 6891)
  17. (2013-09-13, 7456)
  18. (2013-09-15, 8234)
  19. (2013-09-21, 9456)
  20. };
  21. addplot [red] expression {1/(1+exp(-x))}; % <-- fails if uncommented
  22. end{axis}
  23. end{tikzpicture}
  24. end{document}
  25.  
  26. documentclass{standalone}
  27.  
  28. usepackage{pgfplots}
  29. usepgfplotslibrary{dateplot}
  30. pgfplotsset{compat=1.8}
  31.  
  32. begin{document}
  33. begin{tikzpicture}
  34. begin{axis}[date coordinates in=x,date ZERO=2013-08-18,
  35. xticklabel=month-day,ymin=0,ymax=10000,
  36. xmin=2013-08-18,
  37. xmax=2013-09-21]
  38. addplot coordinates {
  39. (2013-08-18, 14)
  40. (2013-08-25, 245)
  41. (2013-08-31, 3412)
  42. (2013-09-04, 4567)
  43. (2013-09-05, 5001)
  44. (2013-09-12, 6891)
  45. (2013-09-13, 7456)
  46. (2013-09-15, 8234)
  47. (2013-09-21, 9456)
  48. };
  49. %addplot [red] expression {1/(1+exp(-x))}; % <-- fails if uncommented
  50. end{axis}
  51. end{tikzpicture}
  52. end{document}
  53.  
  54. date,days.since,function.value
  55. 2013-08-18,0.00,13
  56. 2013-08-19,1.00,15.87823586
  57. 2013-08-20,2.00,19.39372107
  58. 2013-08-21,3.00,23.68754441
  59. 2013-08-22,4.00,28.93203207
  60. 2013-08-23,5.00,35.33766377
  61. 2013-08-24,6.00,43.16152
  62. 2013-08-25,7.00,52.71759957
  63. 2013-08-26,8.00,64.38942152
  64. 2013-08-27,9.00,78.64541704
  65. 2013-08-28,10.00,96.05772929
  66. 2013-08-29,11.00,117.3251755
  67. 2013-08-30,12.00,143.3012929
  68. 2013-08-31,13.00,175.0285945
  69. 2013-09-01,14.00,213.780408
  70. 2013-09-02,15.00,261.11198
  71. 2013-09-03,16.00,318.9228926
  72. 2013-09-04,17.00,389.5333006
  73. 2013-09-05,18.00,475.7770478
  74. 2013-09-06,19.00,581.1153984
  75. 2013-09-07,20.00,709.7759504
  76. 2013-09-08,21.00,866.9223035
  77. 2013-09-09,22.00,1058.861293
  78. 2013-09-10,23.00,1293.296103
  79. 2013-09-11,24.00,1579.635428
  80. 2013-09-12,25.00,1929.371068
  81. 2013-09-13,26.00,2356.539144
  82. 2013-09-14,27.00,2878.283411
  83. 2013-09-15,28.00,3515.543297
  84. 2013-09-16,29.00,4293.894279
  85. 2013-09-17,30.00,5244.574315
  86. 2013-09-18,31.00,6405.737534
  87. 2013-09-19,32.00,7823.985492
  88. 2013-09-20,33.00,9556.23746
  89. 2013-09-21,34.00,11672.01479
  90.  
  91. documentclass{standalone}
  92.  
  93. usepackage{pgfplots}
  94. usepgfplotslibrary{dateplot}
  95. pgfplotsset{compat=1.8}
  96.  
  97. begin{document}
  98. begin{tikzpicture}
  99. begin{axis}[date coordinates in=x,date ZERO=2013-08-18,
  100. xticklabel=month-day,ymin=0,ymax=10000,
  101. xmin=2013-08-18,
  102. xmax=2013-09-21]
  103. addplot coordinates {
  104. (2013-08-18, 14)
  105. (2013-08-25, 245)
  106. (2013-08-31, 3412)
  107. (2013-09-04, 4567)
  108. (2013-09-05, 5001)
  109. (2013-09-12, 6891)
  110. (2013-09-13, 7456)
  111. (2013-09-15, 8234)
  112. (2013-09-21, 9456)
  113. };
  114. addplot table [x=date,y=function.value,col sep=comma]
  115. {2014-01-19.csv};
  116. end{axis}
  117. end{tikzpicture}
  118. end{document}
  119.  
  120. documentclass[12pt,a4paper]{article}
  121. usepackage[utf8]{inputenc}
  122. usepackage[T1]{fontenc}
  123.  
  124. usepackage{graphicx}
  125. usepackage{pgfplots}
  126.  
  127. usepgfplotslibrary{dateplot}
  128. pgfplotsset{compat=1.8}
  129.  
  130. begin{document}
  131.  
  132. begin{tikzpicture}
  133. begin{axis}[
  134. title={La dinámica de los precios del petróleo, USD/barril},
  135. date coordinates in=x,
  136. xticklabel style={rotate=90},
  137. enlarge x limits=false,
  138. xticklabel={day.month.year},
  139. date ZERO=2015-10-01,
  140. xmin=2015-10-01,
  141. xmax=2015-12-31,
  142. xtick={2015-10-01,2015-10-15,2015-11-01,2015-11-15,2015-12-01,2015-12-15,2015-12-31}]
  143.  
  144. addplot[blue] table[x=date,y=brent]{oil_prices.txt};
  145. addplot[red] table[x=date,y=wti]{oil_prices.txt};
  146. legend{Petróleo Brent,Petróleo WTI}
  147.  
  148. end{axis}
  149. end{tikzpicture}
  150. end{document}
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement