MichaelGrupp / evo

Python package for the evaluation of odometry and SLAM
https://michaelgrupp.github.io/evo/
GNU General Public License v3.0
3.33k stars 745 forks source link

Problems setting SETTINGS in python file/notebook, particular seaborn style #587

Closed mnissov closed 9 months ago

mnissov commented 10 months ago

Description: Changing some settings from within the python script seem to have no effect, the specific case which is bothersome for me is

SETTINGS.plot_seaborn_style

Setting this to be either one of darkgrid, whitegrid, white, or dark produces no discernible difference in metrics.py_API_Documentation.ipynb.

Note, an example of the change is the following modification to cell number 2

from evo.tools import log
log.configure_logging(verbose=True, debug=True, silent=False)

import pprint
import numpy as np

from evo.tools import plot
import matplotlib.pyplot as plt
%matplotlib inline
# %matplotlib notebook

# temporarily override some package settings
from evo.tools.settings import SETTINGS
SETTINGS.plot_usetex = False
SETTINGS.plot_seaborn_style = 'dark'

and the same effect is seen in a python script which I'm writing to plot some figures automatically.

Please give also the following information:

MichaelGrupp commented 10 months ago

The settings were applied in the evo.tools.plot module once when it was imported. I changed this now, so the settings can be also changed after importing the plot module. https://github.com/MichaelGrupp/evo/commit/13d55881734309815492e097bc59dccefaf47f82

Quick fix for the old notebook version: move the settings part above the import of the plot module. Changing settings needs still a kernel reload and restart unfortunately with this.