INNER CODE UNIT · Python

__enter__

lgienapp/aquarel · aquarel/theme.py:229

    def __enter__(self):
        # Save current state
        self.rcparams_orig = mpl.rcParams
        # Apply desired state
        self.apply()

    def __exit__(self, exc_type, exc_val, exc_tb):
        with warnings.catch_warnings():
            warnings.simplefilter("ignore", mpl.MatplotlibDeprecationWarning)
            mpl.rcParams.update(self.rcparams_orig)
        self.apply_transforms()

    def _update_params(self, param_key, value_dict):
        """
        Updates the parameters of the theme.

        :param param_key: the parameter key to modify
        :param value_dict: the value dict to update the parameter key with

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…