nm9505

Capsula del Frontend de PGF En LaTeX

Dec 2nd, 2022 (edited)
206
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Latex 3.53 KB | Science | 0 0
  1. \documentclass{article}
  2. \usepackage[utf8]{inputenc}
  3. \usepackage{geometry} [a4paper,lmargin=1.5cm,rmargin=1.5cm,Botton=1.5cm,top=1.75cm]
  4. \usepackage{graphicx}
  5. \usepackage{wrapfig}
  6. \usepackage{color}
  7. \usepackage{amsmath}
  8. \usepackage[T1]{fontenc}
  9. \usepackage{amsfonts}
  10. \usepackage{amssymb}
  11. \usepackage{cancel}
  12. \usepackage[all]{xy}
  13. \usepackage{pst-all}
  14. \usepackage{fancybox}
  15. \usepackage{tikz}
  16. \usepackage{gnuplottex}
  17. \tikzset{flippedeventlabel/.append style={align=center}}
  18. \usetikzlibrary{matrix.skeleton}
  19. \usetikzlibrary[shapes,arrows,positioning,fit,backgrounds,intersections,shadows,calc]
  20. \usetikzlibrary{positioning} \usetikzlibrary{decorations.text} \usetikzlibrary{decorations.pathmorphing}
  21.  
  22. \usepackage{pgfplots}
  23. \pgfplotsset{compat=newest}
  24. \usetikzlibrary{datavisualization} \usetikzlibrary[shapes,arrows,positioning,fit,backgrounds,intersections,shadows,calc,datavisualization.formats.functions]
  25. \usetikzlibrary{patterns}
  26. \usepackage[colorlinks=true,linkcolor=black,citecolor=black,filecolor=magenta,urlcolor=blue]{hyperref}
  27. %Paquete de estilo de referencias
  28. \urlstyle{same}
  29. \title{Una Pequeña Cápsula Del \texttt{Frontend Layer} de \texttt{PGF} En \LaTeX}
  30. \author{Nimrod Rodríguez}
  31. % Start the document
  32. \begin{document}
  33. \maketitle
  34. \section*{La Suma De Riemann-Stieltjes} El excelente recurso del \texttt{frontend layer} de \texttt{PGF} para programar texto con gráficos.\\
  35.  
  36. \begin{tikzpicture}[scale =1,domain=-2.5:4, axes/.style= impotant line/.style={very thick},information text/.style={rounded corners, fill=blue,inner sep=2ex}]
  37.  
  38. \draw (1.5,8.5) [xshift=1.85cm,black!90]  node  [text width=6cm, information text]
  39. {\begin{minipage}{2.5in}
  40. \bf\color{white}
  41. \begin{center}
  42. \shadowbox{Riemann-Stieltjes}\\
  43. \end{center}
  44. La figura muestra una ilustración de la suma de Riemann-Stieltjes, para el "área bajo la curva" de la función impar cúbica, utilizando el entorno resumido de \texttt{\textbackslash begin \{axis\}} y \texttt{\textbackslash end \{axis\}}, el cual facilita el manejo coordenado al utilizar \texttt {\textbackslash draw} (para agregar etiquetas), y \texttt {\textbackslash fill} (para estilizar el gráfico).
  45. \end{minipage}};
  46. \begin{axis}[color=blue]
  47. \draw[->, black,dashed] (-2.5,0)--(4.2,0) node[right]{$x$};
  48. \draw[->,black,dashed] (0,-5)--(0,18) node[right]{$y$};
  49. \draw[-] (-2,0)--(-2,-8);
  50. \draw[-] (3,0)--(3,27);
  51. \addplot[color=magenta,very thick] {x*x*x};
  52. \draw node at (1,65) {$\textcolor{magenta}{f(x)= x^3}$};
  53. \fill[blue] plot[domain=-2:0] (\x,\x * \x * \x )--(-2,0)--(-2,-8)--cycle;
  54. \fill[blue] plot[domain=0:2] (\x,\x * \x * \x )--(2,0)--(0,0)--cycle;
  55. \fill[green!65!blue!60!black] plot[domain=2:3.5] (\x,\x * \x * \x )--(3.5,0)--(2,0)--(2,8)--cycle;
  56. \draw (-0.5,45) node {$\displaystyle\int_{-2}^{\frac{7}{2}} \!\!x^3\mathrm{d}x=\textcolor{green!65!blue!60!black}{\displaystyle\int_{2}^{\frac{7}{2}} \!\!x^3\mathrm{d}x}$};
  57. \draw (-0.5,30) node {$\frac{1}{4}x^4\textcolor{black}{\displaystyle\mid}_{-2}^{\frac{7}{2}}=\textcolor{green!65!blue!60!black}{\frac{1}{4}x^4\textcolor{black}{\displaystyle\mid}_{2}^{\frac{7}{2}}}=\textcolor{green!65!blue!60!black}{33\frac{33}{64}\ unds^2}$};
  58. \draw (-2,0)node[above=0.3cm]{-2};
  59. \draw[-] (-2,1)--(-2,4);
  60. \draw (0,0)node[below=0.3cm]{0};
  61. \draw[-] (0,-1)--(0,-4);
  62. \draw (2,0)node[below=0.3cm]{2};
  63. \draw[-] (2,-1)--(2,-4);
  64. \draw (3.5,0)node[below=0.3cm]{$3\frac{1}{2}$};
  65. \draw[-] (3.5,-1)--(3.5,-4);
  66. \draw node at (1.75,3) {\bf\textcolor{white}{\tiny{+}}};
  67. \draw node at (-1.75,-3) {\bf\textcolor{white}{\tiny{-}}};
  68. \end{axis}
  69. \end{tikzpicture}
  70. \end{document}
  71.  
Add Comment
Please, Sign In to add comment