I wish to move the legend for the left chart closer to the graph, and for the right graph, I wish to let the x-axis and y-axis appeared just like the left graph (so that there is some extra spaces to the left of 1 and to the right of 9 for x-axis, similar to y-axis), here is the graph and code

\documentclass[9pt]{sig-alternate}
% GRAPHICS
\usepackage{pgf}
\usepackage{graphicx}
\usepackage{tikz}
\usepackage{pgfplots}
\usetikzlibrary{arrows,automata,positioning}
\begin{document}
\pgfplotsset{
xticklabel={$\mathsf{\pgfmathprintnumber{\tick}}$},
every axis/.append style={
font=\sffamily,
width=6.5cm,
height=4.9cm
}
}
\begin{figure*}[t]
\begin{minipage}{0.5\linewidth}
\centering
\scriptsize
\begin{tikzpicture}[font=\sffamily]
\begin{semilogyaxis}[title=Dataset 1,
legend pos=outer north east,
legend style={draw=none},
xtick={1,2,...,9}, % new bit
scaled ticks=false,
log ticks with fixed point={1000 sep=},
axis x line=bottom,
axis y line=left,
axis line style=-,
minor tick style={draw=none},
enlargelimits,
ylabel = Solving Time (ms),
xlabel = Service Class Size
]
\addplot plot coordinates{(1,5302)(2,5585)(3,5890)(4,5645)(5,5813)(6,7117)(7,8388)(8,8350)(9,8831)};
\addplot plot coordinates{(1,2)(2,2)(3,2)(4,2)(5,2)(6,3617)(7,2755)(8,2644)(9,3466)};
\addplot plot coordinates{(1,2)(2,3)(3,4)(4,2)(5,3)(6,2341)(7,3320)(8,2298)(9,3183)};
\addplot plot coordinates{(1,1)(2,2)(3,3)(4,2)(5,2)(6,4)(7,4)(8,5)(9,32)};
\addplot plot coordinates{(1,2)(2,2)(3,3)(4,2)(5,2)(6,5)(7,4)(8,4)(9,33)};
\legend{$a$,$b$,$c$,$d$,$e$}
\end{semilogyaxis}
\end{tikzpicture}
\end{minipage}% new bit
\begin{minipage}{0.5\linewidth}
\centering
\scriptsize
\begin{tikzpicture}[font=\sffamily]
\begin{axis}[title=\textbf{Dataset 2},
legend pos=outer north east,
ymin=99.4,
legend pos=outer north east,
legend style={draw=none},
xtick={1,2,...,9},
scaled ticks=false,
log ticks with fixed point={1000 sep=},
axis x line=bottom,
axis y line=left,
axis line style=-,
minor tick style={draw=none},
ylabel = Optimality (\%),
xlabel = Number of Constraints
]
\addplot plot coordinates{(1,100)(2,100)(3,100)(4,100)(5,100)(6,99.82)(7,99.84)(8,99.59)(9,99.65)};
\addplot plot coordinates{(1,100)(2,100)(3,100)(4,100)(5,100)(6,99.44)(7,100)(8,99.78)(9,99.73)};
\addplot plot coordinates{(1,100)(2,100)(3,100)(4,100)(5,100)(6,99.82)(7,99.74)(8,99.74)(9,99.86)};
\addplot plot coordinates{(1,100)(2,100)(3,100)(4,100)(5,100)(6,99.82)(7,99.74)(8,99.74)(9,99.86)};
\legend{$a$,$b$,$c$,$d$}
\end{axis}
\end{tikzpicture}
\end{minipage}%
\end{figure*}
\end{document}

