1

For the back-to-back stem-and-leaf plot below, how would you modify the code so that the highlighted bit comes through? For some strange reason, this is missing when I compile latex.

current output

Thanks

\documentclass[]{article}
\usepackage[margin=0.5in]{geometry}
\usepackage{pgfplots}
\usepgfplotslibrary{fillbetween}
\usepgfplotslibrary{statistics}
\newenvironment{tightcenter}{
\setlength\topsep{0pt}
\setlength\parskip{0pt}
\begin{center}}{\end{center}}
\begin{document}
\begin{table}[htbp]
\begin{tabular}{lllll|c|lllllll}
\multicolumn{5}{r}{\textbf{Town 1}} & \textbf{Stem} & \multicolumn{6
}{l}{\textbf{Town 2}}\\[0.024cm]\hline
  & 7 & 3 & 2 & 1 & 2 & 5 & 6 & 6 & 9 &   &\\[0.124cm]
  & 8 & 4 & 3 & 0 & 3 & 1 & 1 & 2 & 6 & 8 & 9\\[0.124cm]
8 & 6 & 5 & 3 & 2 & 4 & 1 & 4 & 6 & 7 &   & \\[0.124cm]
\end{tabular}
\end{table}
\end{document}
1
  • 1
    \multicolumn{5}{r|}
    – leandriis
    Jan 10, 2020 at 12:48

1 Answer 1

1

With {r|} instead of {r} you can add the missing part of the vertical line.

enter image description here

\documentclass[]{article}
\usepackage[margin=0.5in]{geometry}
\begin{document}
\begin{table}[htbp]
\begin{tabular}{lllll|c|lllllll}
\multicolumn{5}{r|}{\textbf{Town 1}} & \textbf{Stem} & \multicolumn{6
}{l}{\textbf{Town 2}}\\[0.024cm]\hline
  & 7 & 3 & 2 & 1 & 2 & 5 & 6 & 6 & 9 &   &\\[0.124cm]
  & 8 & 4 & 3 & 0 & 3 & 1 & 1 & 2 & 6 & 8 & 9\\[0.124cm]
8 & 6 & 5 & 3 & 2 & 4 & 1 & 4 & 6 & 7 &   & \\[0.124cm]
\end{tabular}
\end{table}
\end{document}
1
  • Worked beautifully. Thank you @leandriis!
    – Will Kim
    Jan 10, 2020 at 18:08

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .