Skip to content

Commit

Permalink
Merge pull request #245 from paxtonfitzpatrick/master
Browse files Browse the repository at this point in the history
full control over plotting backend, non-animated interactive plots, and plotting-related bug fixes
  • Loading branch information
jeremymanning authored Jan 6, 2021
2 parents 32716f3 + c98c49b commit 36c12fd
Show file tree
Hide file tree
Showing 5 changed files with 903 additions and 14 deletions.
1 change: 1 addition & 0 deletions hypertools/__init__.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
#!/usr/bin/env python
from .config import __version__
from .plot.plot import plot
from .plot.backend import set_interactive_backend
from .tools.load import load
from .tools.analyze import analyze
from .tools.reduce import reduce
Expand Down
8 changes: 8 additions & 0 deletions hypertools/_shared/exceptions.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
class HypertoolsError(Exception):
pass


class HypertoolsBackendError(HypertoolsError):
def __init__(self, message):
super().__init__(message)
self.message = message
10 changes: 4 additions & 6 deletions hypertools/plot/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,7 @@
import warnings
import matplotlib as mpl

try:
with warnings.catch_warnings():
warnings.simplefilter("ignore")
mpl.use('TkAgg')
except:
warnings.warn('Could not switch backend to TkAgg. This may impact performance of the plotting functions.')
from .backend import _init_backend


_init_backend()
Loading

0 comments on commit 36c12fd

Please sign in to comment.