Self-similar scalar cosmologies