I want to plot data from file using TikZ, and I successfully do. However, I want to plot every value for the x-axis along the x-axis and remove the comma that appears for each number.
My current output:
Using the following code:
\documentclass{article}
\usepackage{pgfplotstable}
\usepackage{pgfplots}
\usepackage{filecontents}
\begin{filecontents*}{kvinner.data}
anno,andel
1998,8.70
1999,22.73
2000,10.71
2001,26.32
2002,16.33
2003,23.53
2004,20.69
2005,22.08
2006,21.51
2007,26.67
2008,24.10
2009,22.33
2010,19.64
2011,21.05
2012,21.19
2013,20.44
2014,19.69
2015,21.58
2016,25.00
2017,27.38
2018,30.14
\end{filecontents*}
\begin{document}
\begin{tikzpicture}
\begin{axis}
\addplot table [x=anno, y=andel, col sep=comma] {kvinner.data};
\end{axis}
\end{tikzpicture}
\end{document}
The x-axis contains years, and the y-axis a precentage. How may I plot year value without the comma, and plot every year value along the x-axis?