I'd like to draw multiple dashed lines to visual the slope of a line. I'm not yet familiar with foreach, but I think this should somehow work.
The code below gives the following error:
! Undefined control sequence. \x , \y
l.14 \end{axis}
What goes wrong? And how to fix it?
As it seems you want to draw a stair function, maybe you don't need a loop. You could try instead a constant plot, with
Example:
You could use