Phase transition and switching in lead titanate crystals