caporaso-lab / sourcetracker2

SourceTracker2
BSD 3-Clause "New" or "Revised" License
61 stars 45 forks source link

Drop `mpl.use` or move plotting out of the main `_sourcetracker.py` file #91

Closed jakereps closed 6 years ago

jakereps commented 6 years ago

Hard changing the users matplotlib backend seems aggressive (considering not everyone uses a headless environment), but wouldn't be terrible if it wasn't part of the main package itself.

I would recommend moving all plotting functionality (i.e. anything requiring a matplotlib backend change) to a _plot.py file or something unrelated to the "beef" of the system itself, as currently 99% of the time importing sourcetracker will result in ugly warnings, like so:

image