tick
tick copied to clipboard
Matplotlib back-end overwritten
Importing tick overrides the matplotlib back-end:
>>> import matplotlib
>>> matplotlib.get_backend()
'module://backend_interagg'
>>> from tick.linear_model import LogisticRegression
>>> matplotlib.get_backend()
'agg'
we set agg if the environment variable "DISPLAY" is set to "-1"
https://github.com/X-DataInitiative/tick/blob/master/tick/base/init.py#L14
this is for testing without a GUI
Thanks for quick response! The first part of the condition evaluates to True when I use pycharm with Ubuntu WSL:
(os.name == 'posix' and 'DISPLAY' not in os.environ and not (sys.platform == 'darwin' and matplotlib.get_backend() == 'MacOSX')
Maybe you should remove it and leave the DISPLAY == -1 condition only? I have a work-around so no worries if that's not possible :-)
And happy to submit a pull-request if you agree