Use of the spectral method for two- and three-dimensional guiding center plasmas