DOC: update example of histogram2d to doctest format.
DOC: fix some minor issues with histogram2d docstring formatting.
Merge branch 'pr/3591' into master.

See https://github.com/numpy/numpy/pull/3591