1

My MWE:

\documentclass[12pt]{standalone}
\usepackage{pgfplots}
\pgfplotsset{compat=1.9}
\usepackage{amsmath}
\usepackage{mathspec}
\setmainfont[Ligatures=TeX]{Times New Roman}
\setmathsfont(Digits,Latin,Greek){Times New Roman}

\begin{document}
\pgfplotsset{every axis/.append style={
    line width=.1 pt,
    tick style={line width=.6pt}},
    major grid style={gray!15}
}
\begin{tikzpicture}
\begin{axis}[grid=major,
clip mode=individual,
height=8cm,
width=10cm,
%xmin=0,
%xmax=0.32,
%ymax=7000,
enlarge x limits=.1,
enlarge y limits=.1,
ylabel={Stokes shifts, cm$^{-1}$},
xlabel={$\Delta$f},
minor x tick num=4,
minor y tick num=4,
every node near coord/.append style={anchor=west,font=\tiny,fill=blue!10,rounded corners=3pt,inner sep=1.5pt,xshift=1mm},
]


\addplot+[nodes near coords,only marks,point meta=explicit symbolic,black,font=\tiny]
table[meta=label] {
x   y   label
0.30515 6571.54357  ACN
0.20957 5442.03427  THF
0.26329 6764.93214  DMSO
0.30859 6338.69055  MeOH
0.28869 6125.2616   EtOH
0.24969 5878.82326  n-PenOH
0.20519 5635.74187  n-DecOH
0.00579 5619.78163  Toluene
-0.00165    5415.76404  Cyclohexane
0.21467 6038.64734  DME
0.26116 5854.44675  Triton X-100
%0.28679    8886.51915  PC
};

\end{axis}
\end{tikzpicture}
\end{document}

enter image description here

As you can see labels near value 0.25 of x-axis overlap.

Is there a way to adjust position of one of those labels manually or automatically to make graph look better?

1

0

Browse other questions tagged .