I have a graph like this:

enter image description here

However, when I plot it out on LaTex, it turns out like this: enter image description here

Here is the code:

\psset{xunit=0.13cm,yunit=0.5cm,algebraic=true,dimen=middle,dotstyle=o,dotsize=3pt 0,linewidth=0.8pt,arrowsize=3pt 2,arrowinset=0.25}

How do I make the y-axis appear?

Thank you!

2 Answers 2


Maybe you are interested in a pgfplots solution which is quite short:

% arara: pdflatex


        \begin{axis}[ymin=0, xmin=122, xmax=182,axis x line=bottom,axis y line=left,font=\scriptsize] 
            \addplot[ybar interval] coordinates {%
                (135,7) (140,4) (145,9) (150,5) (155,2) (160,0) (165,1) (170,0)



the first pair of coordinates defines the intersection of the axes.

  • That's what I thought too, but when I changed (0,0) to (130,0), it gave me the x-axis starting from 0, 5, 10 and so on. Would like it to start from 130, 135, 140 and so on.
    – Eugene
    Mar 30, 2015 at 12:54
  • 1
    use Ox=130 for the start value
    – user2478
    Mar 30, 2015 at 14:11

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.