Created
November 9, 2021 15:26
-
-
Save jbfink/2f28ff9fe90ad85f6b6479f3389c9c41 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
\documentclass{article} | |
\usepackage{pgfplots} | |
\begin{filecontents*}{data.csv} | |
a,b,c,d | |
1,4,5,1 | |
2,3,1,5 | |
3,5,6,1 | |
4,1,4,9 | |
5,3,4,7 | |
\end{filecontents*} | |
\pgfplotsset{compat=1.18} | |
\begin{document} | |
\begin{tikzpicture} | |
\begin{axis}[ | |
title={Sample graph generated from csv data}, | |
ylabel=c, | |
xlabel=a] | |
\addplot table [x=a, y=c, col sep=comma] {data.csv}; | |
\legend{values of c} | |
\end{axis} | |
\end{tikzpicture} | |
\end{document} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment