Finite-temperature anisotropy of PtCo magnets