Don't close figure if context and apply_rcparams are both set.

@mdboom - this fixes #2890