Decoding and encoding on a single figure