| 28 May |
Como crear un archivo de gráfico de dispersión en Latex |
Sacado de: http://www.texample.net/tikz/examples/scatterplot/
\documentclass{article} \usepackage{tikz} \begin{document} \begin{tikzpicture}[only marks, y=.5cm] % les indicas lo que ocupa cada unidad de las x y las y \draw plot[mark=*,xshift=-6cm] file {data/ScatterPlotExampleData.data}; %dibujas los puntos \draw[->,xshift=-6cm] (6,0) -- coordinate (x axis mid) (17,0); %dibujas la linea de coordenadas x \draw[->,xshift=-6cm] (6,0) -- coordinate (y axis mid)(6,27); %dibujas la linea de coordenadas y \foreach \x in {6,8,10,12,14,16} \draw [xshift=-6cm](\x cm,1pt) -- (\x cm,-3pt) %dibujas cada subdivision y cada valor de la subdivsion node[anchor=north] {$\x$}; \foreach \y/\ytext in {0/0,2.5/5000,5/10000,7.5/15000,10/20000,12.5/25000} %dibujas cada subdivision y cada valor de la subdivsion \draw (1pt,\y cm) -- (-3pt,\y cm) node[anchor=east] {$\ytext$}; \node[below=1cm] at (x axis mid) {Education}; %dibujas los titulos \node[left=2cm,rotate=90] at (y axis mid) {Income}; \end{tikzpicture} \end{document}
