web/views/plots.py
branchtls-sprint
changeset 1132 96752791c2b6
parent 742 99115e029dca
child 1133 8a409ea0c9ec
equal deleted inserted replaced
1131:544609e83317 1132:96752791c2b6
    23 try:
    23 try:
    24     import matplotlib
    24     import matplotlib
    25     import sys
    25     import sys
    26     if 'matplotlib.backends' not in sys.modules:
    26     if 'matplotlib.backends' not in sys.modules:
    27         matplotlib.use('Agg')
    27         matplotlib.use('Agg')
    28     from matplotlib.ticker import FormatStrFormatter
    28     from pylab import figure
    29     from pylab import figure, show
       
    30 except ImportError:
    29 except ImportError:
    31     pass
    30     pass
    32 else:
    31 else:
    33     class PlotView(baseviews.AnyRsetView):
    32     class PlotView(baseviews.AnyRsetView):
    34         id = 'plot'
    33         id = 'plot'