Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- documentclass{article}
- usepackage{pgfplots}
- pgfplotsset{compat=newest}
- usepgfplotslibrary{groupplots}
- newcommand{datapthreeone}{prob3.dat}
- begin{filecontents*}{datapthreeone}
- x1 y1 averX averY Ex Ey
- 2.000, 3.000, -0.714, 1.000, 1.000, -0.714
- 1.000, 2.000, -1.714, 0.000, 0.000, -1.714
- 1.000, 1.000, -1.714, -1.000, -1.000, -1.714
- 2.000, 2.000, -0.714, 0.000, 0.000, -0.714
- 4.000, 2.000, 1.286, 0.000, 0.000, 1.286
- 4.000, 3.000, 1.286, 1.000, 1.000, 1.286
- 5.000, 1.000, 2.286, -1.000, -1.000, 2.286
- end{filecontents*}
- begin{document}
- begin{figure}
- begin{center}
- begin{tikzpicture}
- begin{groupplot}[group style={group size=2 by 2, horizontal sep=4em, vertical sep=5em}]
- nextgroupplot[xmin=-2, xmax=2, ymin=-2.5, ymax=2.5, legend style={font=fontsize{7}{9}selectfont}, title = (c) PCA Projection Points]
- addplot [only marks, line width = 0.3mm, mark=x, blue, mark options={scale=1.2}]table[x index=4, y index=5, only marks,col sep=comma] {datapthreeone}; addlegendentry{emph{Projected Data}}
- addplot [-latex, dashed, blue, domain=-2:2, samples=2]{0*x + 0};
- addplot[-latex, dashed]coordinates {(-3,0) (2.5,0)};
- addplot[-latex, dashed]coordinates {(0,-2.5) (0,2.5)};
- nextgroupplot[xmin=-2, xmax=2, ymin=-2.5, ymax=2.5, legend style={font=fontsize{7}{9}selectfont}, title = (c) PCA Projection Points]
- addplot [only marks, line width = 0.3mm, mark=x, blue, mark options={scale=1.2}]table[x index=4, y index=5, only marks,col sep=comma] {datapthreeone}; addlegendentry{emph{Projected Data}}
- addplot [-latex, dashed, blue, domain=-2:2, samples=2]{0*x + 0};
- addplot[-latex, dashed]coordinates {(-3,0) (2.5,0)};
- addplot[-latex, dashed]coordinates {(0,-2.5) (0,2.5)};
- end{groupplot}
- end{tikzpicture}
- end{center}
- end{figure}
- end{document}
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement