Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- RequirePackage{filecontents}
- begin{filecontents}{data.dat}
- X P $Q_B$ $Q_C$ $Q_D$
- 1 A1 2 6 7
- 2 A2 3 65 87
- 3 A3 1 45 65
- 4 A4 4 54 45
- 5 A5 6 56 34
- 6 A6 8 34 23
- 7 A7 9 45 45
- 8 A8 13 23 56
- 9 A9 4.6 6 87
- 10 A10 4 56 89
- end{filecontents}
- documentclass{article}
- usepackage{pgfplotstable}
- usepackage{pgfplots}
- pagestyle{empty}
- begin{document}
- pgfplotstabletypeset[columns/P/.style={string type}]{data.dat}
- vspace{1cm}
- begin{tikzpicture}
- begin{axis}[
- xlabel=Q Series,
- ylabel=P Values,
- xticklabels from table={data.dat}{P},xtick=data]
- addplot[blue,thick,mark=square*] table [y=$Q_B$,x=X]{data.dat};
- addlegendentry{$Q_B$ series}
- addplot[red,thick,mark=square*] table [y=$Q_C$,x=X]{data.dat};
- addlegendentry{$Q_C$ series}
- addplot[black,dashed,thick,mark=square*] table [y=$Q_D$,x=X]{data.dat};
- addlegendentry{$Q_D$ series}
- end{axis}
- end{tikzpicture}
- end{document}
- X P $Q_B$ $Q_C$ $Q_D$
- 1 A1 1/2 1/6 1/7
- 2 A2 1/3 65 87
- 3 A3 1 1/45 65
- 4 A4 4 54 45
- 5 A5 6 56 34
- 6 A6 8 1/4^3 23
- 7 A7 9 45 45
- 8 A8 13 23 56
- 9 A9 1/4.6 6 87
- 10 A10 4 56 89
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement