Redundant newlines in grid command removed.
xlabel and ylabel function added.
Documentation updated.