We study the local density of states at and around a substituting impurity, and use these results to compute current versus bias characteristic curves of scanning tunneling microscopy (STM) experiments done on the surface of graphene. This allows us to detect the presence of substituting impurities on graphene. The case of vacancies is also analyzed. We find that the shape and magnitude of the STM characteristic curves depend on the position of the tip and on the nature of the defect, with the strength of the binging between the impurity and the carbon atoms playing an important role. Also the nature of the last atom of the tip has an influence on the shape of the characteristic curve.