0

I can't understand why does label position fail? I use Miktex + Pgfplots.

Code:

\documentclass[a4paper, 14pt, twoside, unicode, titlepage,  final]{extreport}

\usepackage[T2A]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage{pgfplots}

\begin{document}

\begin{figure}[!tbh]
 \pgfsetfillcolor{white}
 \pgfplotsset{width=15cm, height=9cm, compat=1.5}   
 \centering \small
 \begin{tikzpicture}[scale=1.0] 
  \begin{axis}[
    /pgf/number format/1000 sep={}, 
    symbolic x coords = {2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015, 2016,2017}, xtick=data, ylabel shift=2pt,
    ylabel=Обсяг перевезень пасажирів (млн. пас./рік),
    xlabel=Роки,
    xlabel near ticks,
    xticklabel style={rotate=90},
    legend entries={трамвай,тролейбус},
    grid=major 
    ]
    \addplot[sharp plot, mark=*, nodes near coords, every node near coord/.append style={font=\scriptsize}]
      coordinates{
     (2000,1381)
     (2001,1334)
     (2002,1196)     
     (2003,1132)
     (2004,1112)          
     (2005, 1111)
     (2006, 1083)
     (2007, 1027)
     (2008, 963)
     (2009, 787)
     (2010, 714)
     (2011, 798)
     (2012, 800) 
     (2013, 757)    
     (2014, 770)
     (2015, 739)
     (2016, 694)
     (2017, 676)
};
    \addplot[sharp plot, mark=o, nodes near coords, every node near coord/.append style={font=\scriptsize}]
      coordinates{
     (2000,2582)
     (2001,2332)
     (2002,2140)     
     (2003,1921)
     (2004,1849)          
     (2005, 1903)
     (2006, 1788)
     (2007, 1621)
     (2008, 1580)
     (2009, 1283)
     (2010, 1204)
     (2011, 1346)
     (2012, 1346)  
     (2013, 1306)   
     (2014, 1097)
     (2015, 1081)
     (2016, 1039)
     (2017, 1058)
};
 \end{axis} 
 \end{tikzpicture}
 \caption{Обсяги перевезень пасажирів трамвайним і тролейбусним видами транспорту в Україні за період 2000--2017 роки\label{pic_tramtroll}}
\end{figure} 

\end{document}

This code works right in Overleaf, but fails in Miktex.

enter image description here

  • Maybe you should update your Miktex – Sara Alshamsi Jul 23 at 6:31
  • Thanks for the reply! Week ago everythig was ok. I didn't change the code, but It happened after I've updated my MikTex. – Alex Jul 23 at 9:41

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.