I am trying to plot a box plot in latex. Below is what I want (only horizontal axis; ticks or axis arrows are options but I do not want axes borders or any vertical axis element).
The code below is what I have so far with the statistics package:
\documentclass[]{article}
\usepackage[margin=0.5in]{geometry}
\usepackage{pgfplots}
\usepackage{caption}
\usepackage{lscape}
\usetikzlibrary{arrows}
\usepackage{flexisym}
\usepgfplotslibrary{statistics}
\usetikzlibrary{shapes.multipart,shapes.geometric,calc,angles,positioning,intersections,quotes,decorations,babel,patterns,fit}
\usetikzlibrary{decorations.markings}
\newenvironment{tightcenter}{
\setlength\topsep{0pt}
\setlength\parskip{0pt}
\begin{center}}{\end{center}}
\begin{document}
\begin{center}
\begin{tikzpicture}
\begin{axis}
[
ytick=\empty,
xtick={0,10,15,20,25,30,35,40},
%yticklabels={Index 0, Index 1, Index 2},
axis line style={draw=}
]
\addplot[
boxplot prepared={
median=23,
upper quartile=32,
lower whisker=8,
lower quartile=11,
upper whisker=35
},black
] coordinates {};
\end{axis}
\end{tikzpicture}
\end{center}
\end{document}
and it generates the box plot below, which is not what I want.
Can you please suggest how to modify the current code to achieve what I want?
Thank you so much.