def test_plotting_server():

    config = get_artemis_config()
    if config.get('plotting', 'backend') != 'matplotlib-web':
        setup_web_plotting()

    for i in xrange(5):
        dbplot(np.random.randn(10, 10, 3), 'noise')
        dbplot(np.random.randn(20, 2), 'lines')
        plt.pause(0.1)
Example #2
0
from artemis.config import get_artemis_config

__author__ = 'peter'

config = get_artemis_config()
BACKEND = config.get('plotting', 'backend')

assert BACKEND in (
    'matplotlib', 'matplotlib-web', 'bokeh'
), 'Your config file ~/.artimisrc lists "%s" as the backend.  Valid backends are "matplotlib" and "bokeh".  Change the file.' % (
    BACKEND, )

if BACKEND in ('matplotlib', 'matplotlib-web'):
    from matplotlib.pyplot import *
    from artemis.plotting.matplotlib_backend import *
elif BACKEND == 'bokeh':
    from artemis.plotting.bokeh_backend import *