I teach an introductory course in Complex Analysis and it would help me a lot if I could use a free online tool to plot how a particular function maps a given grid in $z$-plane to $w$-plane but I am unable to find anything close to what I want. To specify a bit more:
- Needham's book Visual Complex Analysis uses exactly this approach;
- I am NOT interested in anything using coloring plotting;
- I tried Sage but could not find what I wanted (it would be great if Sage did because it is a free pretty much universal math software).
Do you possibly know about such a tool? I know one could write a code for that but that is not what I am asking about - ideally, one would define a function (an elementary one) and then specify a grid (say an $x$-range and $y$-range and number of horizontal and vertical lines) and it would draw the picture of the grid transformed by the function.

Most programs that support Matlab-style or NumPy-style array operations and plotting can do that. Examples are Octave, FreeMat, or Scilab. The essence (in Octave syntax), demonstrated for the $\tanh$ function, is:
But then the segments between the grid points will be straight. You may want a little more refinement. Run the following as a script file or enter its contents in the Octave UI: