We report on the magnetic properties of single Co atoms on graphene on Pt(111). By means of scanning tunneling microscopy spin-excitation spectroscopy, we infer a magnetic anisotropy of K=-8.1 meV with out-of-plane hard axis and a magnetic moment of 2.2μB. Co adsorbs on the sixfold graphene hollow site. Upon hydrogen adsorption, three differently hydrogenated species are identified. Their magnetic properties are very different from those of clean Co. Ab initio calculations support our results and reveal that the large magnetic anisotropy stems from strong ligand field effects due to the interaction between Co and graphene orbitals.