A two-dimensional-surface ‘state diagram’ for polyaniline