I have slight problem with pgfplots barplot. What I am trying to build is relatively simple, and for the life of me I can't see where my error is. The funny thing is that when I try to compile with the pgfplot code, I get all sorts of citation errors..... commenting pgfplots code out and compilign again, everything works and no errors.
The pgfplots code:
\begin{figure}[ht]
\centering
\begin{tikzpicture}
\begin{axis}[
ybar,
width=.8\linewidth,
height=7cm,
title=Flutningstakmarkanir yfir spátímabilið,
xlabel={Sviðsmyndir},
ylabel={Milljón \$ },
symbolic x coords={Mynd 1,Mynd 2, Mynd 3},
xtick=data,
legend columns=-1, % to set one line legend
legend style={at={(0.5,-0.3)},anchor=center},
ymajorgrids
]
\addplot+[ybar] coordinates { (mynd1,98) (mynd2,59) (mynd3,43)};
\addplot+[ybar] coordinates { (mynd1,95) (mynd2,57) (mynd3,42)};
\end{axis}
\end{tikzpicture}
\end{figure}
All of the packages I am using:
\documentclass[a4paper,12pt,twoside,BCOR=10mm]{scrbook}
% Packages
\usepackage[utf8]{inputenc}
\usepackage[icelandic]{babel}
\usepackage{t1enc}
\usepackage{graphicx,booktabs}
\usepackage[intoc]{nomencl}
\usepackage{enumerate,color}
\usepackage{url}
\usepackage[pdfborder={0 0 0}]{hyperref}
\BeforeTOCHead[toc]{\cleardoublepage\pdfbookmark{\contentsname}{toc}} % Add Table of Contents to PDF "bookmark" table of contents
\usepackage{appendix}
\usepackage{eso-pic}
\usepackage{amsmath}
\usepackage{amssymb}
\usepackage{longtable}
\usepackage[sf,normalsize]{subfigure}
\usepackage[format=plain,labelformat=simple,labelsep=colon]{caption}
\usepackage{placeins}
\usepackage{tabularx}
\usepackage{multirow}
\usepackage{subfigure}
\usepackage{adjustbox}
% Packages used for title page layout
\usepackage[dvipsnames]{xcolor}
\usepackage{tikz}
\usetikzlibrary{positioning}
\usepackage{pgfplots}
\pgfplotsset{compat=newest}
\usepgfplotslibrary{external}
% Blue color according to HÍ corporate design
\convertcolorspec{RGB}{16,9,159}{rgb}\tmphiblue
\definecolor{hiblue}{rgb}\tmphiblue
\setlength{\parskip}{\baselineskip}
\setlength{\parindent}{0cm}
\raggedbottom
\setkomafont{captionlabel}{\itshape}
\setkomafont{caption}{\itshape}
\setkomafont{section}{\FloatBarrier\Large}
\setcapwidth{\textwidth}
%\setcapwidth[l]{\textwidth} % The original template had the [l] which leads to a warning that it gets ignored, so to reduce warnings, removed it.
\setcapindent{1em}
\usepackage{lmodern} % Use Latin Modern (instead of the default Computer Modern that is rendered using a bitmap font).
\usepackage{fixcmex} % To fix that Latin Modern large symbol math fonts has by default only one size: https://tex.stackexchange.com/a/621536
% Times new roman font instead of the standard LaTeX fonts: has not been test -- try this on your own risk
\usepackage[T1]{fontenc}
\usepackage{mathptmx}
%%%%%%%%%%%%%%%%% Configurations (Useful defaults, but OK to change %%%%%%%%%%%%%%%%%%%
\graphicspath{{figs/}} % Figures in directory figs
% Bibliography
% \usepackage[authoryear]{natbib} % Uncoment if you want to used NatBib instead of BibLaTeX (and comment the bitlatex line below)
\usepackage[backend=biber, style=authoryear]{biblatex} % BibLaTeX used for references.
\usepackage{csquotes} % BibLaTex wants to have context sensitive quotes
\addbibresource{references.bib} % Name of *.bib file containing references
I do have pgfplots line plot set up in a similar way that works very beautifully. Most of the articles I look up have the pgfplots code set up in similar matter. I only want to use my language for labes, titles and stuff like that. If someone could point me to my error, I would really appreciate it :)

symbolic x coordsshould be the same as incoordinates. otherwise you get error `coordinate ... is unknow, – Zarko Mar 21 '23 at 15:12