Quantum gas microscopy of the anyon-Hubbard model