def lightning(ps, data, plot_inds, **kwargs):
"""
"""
if not conf.devel:
raise NotImplementedError("'mpld3' plotting backend not officially supported for this release. Enable developer mode to test.")
try:
from lightning import Lightning
except ImportError:
raise ImportError("failed to import lightning: try 'sudo pip install lightning-python' or choose another plotting backend")
_use_lgn = False
else:
_use_lgn = True
# TODO: option to use server instead of local (for sharing links, etc)
lgn = Lightning(local=True)
logger.warning("lightning plotting backend is VERY EXPERIMENTAL (read: non-existant)")
# it looks like all calls for a single figure need to be made at once by giving lists
# TODO: look into streaming option to stream fits as fitting or as sampling???
series = np.random.randn(5, 50)
viz = lgn.line(series)
# TODO: return and accept viz and then write a .show() function?
viz.save_html('_lgn.html', overwrite=True)
return None, []
评论列表
文章目录