Created
February 12, 2020 22:38
-
-
Save bstellato/e92a1e461ef598b2e40e4cc4ba54e9f2 to your computer and use it in GitHub Desktop.
Create PGFPlots lines from csv file
This file contains 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
\begin{figure} | |
\begin{tikzpicture} | |
\begin{axis} | |
[ | |
axis x line=bottom, | |
axis y line=left, | |
enlarge y limits=0.1, % Enlarge limits by 10% | |
% ymode=log, % If you want to be logarithmic | |
width=\textwidth, | |
height=0.33\textheight, | |
xlabel=$n$, | |
ylabel=Time, | |
% y unit=\si{\second}, % Measurement units using the siunitx | |
] | |
\addplot table [x=n, y=time_diff, col sep=comma] {./data/lot_sizing_data.csv}; | |
% \addplot[mark=none, very thick] coordinates {(2,1000) (76, 1000)}; % Add straight line | |
\legend{Myline} | |
\end{axis} | |
\end{tikzpicture} | |
\caption{My Caption.} | |
\label{fig:my_label} | |
\end{figure} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment