I'm not really familiar with LaTeX (started working with it 2 days ago). Most of that work I'm doing in Overleaf, I only recently moved to graphs, could anyone possibly provide me a simple stair chart that I would be able to put in Overleaf and edit?

Example here: http://i.imgur.com/uDd02Nj.jpg

I found some example here: Tikzpicture: Step function (most minimalistic!)

But I'm having hard time with editing it.

Many thanks to anyone kind enough to help me!

EDIT: so far I have this code:

\psaxes{->}(0,0)(-0.5,-0.5)(4.5,4.6)[$x$,0][$y$, 180]   

and I want to make this out of it:

enter image description here

  • Hi, welcome to TeX.SX! What do you want to change from the example you mention? (And which of the three answers were you specifically looking at?) – Torbjørn T. Jan 17 '17 at 12:14
  • I was looking at the first one, but it's not quite it. So far I managed to do the axes and numbers in them using Overleaf: i.imgur.com/bdsfiIa.png Now I want to draw in it something like this: i.imgur.com/mEzvMUz.png So basically what I need right now is some hint on how to draw the mentioned line, thank you! – callmeadr Jan 17 '17 at 12:21
  • Well, if you're using the code from the accepted answer there, you just need to change the coordinates used in the \addplot statement. – Torbjørn T. Jan 17 '17 at 12:30
  • No, this is the code I'm using: \usepackage{pst-all} \begin{document} \begin{pspicture}(-1,-1)(5,5) \psaxes{->}(0,0)(-0.5,-0.5)(4.5,4.6)[$x$,0][$y$, 180] \end{pspicture} \vspace{1.6in} And it doesn't allow me to use \addplot in Overleaf for some reason – callmeadr Jan 17 '17 at 12:42
  • No, it doesn't work because \addplot, which is defined by the pgfplots package, only works inside an axis environment, which must be inside a tikzpicture environment. Why can't you use the code from one of the answers to the question you referred to, and just change the coordinates? – Torbjørn T. Jan 17 '17 at 12:45

enter image description here

there are several other possibilities.

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.