![](https://secure.gravatar.com/avatar/46da49256462126dbe77187c073aa6c6.jpg?s=120&d=mm&r=g)
30 Aug
2024
30 Aug
'24
1:19 p.m.
Hi, I have plotted a log function and I want to draw an xy axis grid. Below is the code \starttext \startMPcode draw function(1,"x", "log(x)", .1, 10, .01) scaled 1cm; for i = 0 upto 10: draw (i*cm, -5cm) -- (i*cm, 5cm) dashed; endfor; for i = -5 upto 5: draw (0, i*cm) -- (10cm, i*cm) dashed; endfor; \stopMPcode \stoptext My first for loop draws lines but the second gives me an error. Please help. -- Respect, Shiv Shankar Dayal