2

Consider the following:

\documentclass{article}

\usepackage{pst-plot}

\begin{document}

\begin{figure}
\savedata{\data}[172 173 184 160 183 188 176 179 176 180 184 173 182 174 177]
\psset{xunit = 0.26,yunit = 1.3, fillstyle = solid}
  \begin{pspicture}(-1,-0.4)(41.5,2.5)
    \psaxes[Ox = 155, dx = 5, Dx = 5, ticks = x, labels = x]{->}(0,0)(-1,-0.2)(37,2.5)[$h$ (cm),0][,90]
    \rput{270}(0,1){\psBoxplot[yunit = 0.2, fillcolor = blue!30]{\data}}
  \end{pspicture}
\end{figure}

\end{document}

output

As can be seen, the boxplot is not showing; how do I fix this to get a correct boxplot of the data?

It's probably a trivial mistake but I can't spot it.

1 Answer 1

3
\rput{270}(-155,1){\psBoxplot[yunit=0.2,fillcolor=blue!30]{\data}}
          ^^^^^^

you also have to transform the x coordinate for the plot: -155 instead of 0

enter image description here

5
  • Thank you, Herbert. Please post the complete code; then I'll accept your answer promptly. As the code is now, the plot is too cramped together in the x-axis direction. Commented Oct 12, 2014 at 15:50
  • Why the fuill code? It is completely the same than the rest.
    – user2478
    Commented Oct 12, 2014 at 15:59
  • The plot is too cramped in the x-axis direction. Commented Oct 12, 2014 at 16:02
  • Ah, I see the problem. Wait a minute
    – user2478
    Commented Oct 12, 2014 at 16:02
  • 1
    See my edited answer.
    – user2478
    Commented Oct 12, 2014 at 16:06

You must log in to answer this question.

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