Source code for tellurium.plotting.engine_null
"""
Plotly implementation of the plotting engine.
"""
from __future__ import print_function, absolute_import
from .engine import PlottingEngine, PlottingFigure, PlottingLayout, filterWithSelections, TiledFigure, LowerTriFigure
[docs]
class NullEngine(PlottingEngine):
""" PlottingEngine using plotly. """
def __init__(self):
PlottingEngine.__init__(self)
def __str__(self):
return "<NullEngine>"
[docs]
def newFigure(self, title=None, logX=False, logY=False, layout=PlottingLayout(), xlabel=None, ylabel=None):
""" Returns a figure object."""
return NullFigure(title=title, layout=layout, xlabel=xlabel, ylabel=ylabel)
[docs]
def newTiledFigure(self, title=None, rows=None, cols=None):
return NullTiledFigure(engine=self, rows=rows, cols=cols)
[docs]
def newLowerTriFigure(self, title=None, rows=None, cols=None):
return NullLowerTriFigure(engine=self, rows=rows, cols=cols)
[docs]
class NullFigure(PlottingFigure):
""" PlotlyFigure. """
def __init__(self, title=None, layout=PlottingLayout(), logx=False, logy=False, save_to_pdf=False, xlabel=None, ylabel=None):
super(NullFigure, self).__init__(title=title, layout=layout, logx=logx, xlabel=xlabel, logy=logy, ylabel=ylabel)