Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
def newStackedFigure(self, title=None, logX=False, logY=False, layout=PlottingLayout()):
""" Returns a figure object."""
return PlotlyStackedFigure(title=title, layout=layout)
def newFigure(cls, title=None, logX=False, logY=False, layout=None, xtitle=None, ytitle=None):
""" Returns a figure object."""
if layout is None:
layout = PlottingLayout()
fig = MatplotlibFigure(title=title, layout=layout, xtitle=xtitle, ytitle=ytitle, logx=logX, logy=logY)
return fig
def __init__(self, layout=PlottingLayout(), use_legend=True, xtitle=None, ytitle=None, title=None,
linewidth=None, xlim=None, ylim=None, logx=None, logy=None, xscale=None, yscale=None,
grid=None, ordinates=None, tag=None, labels=None, figsize=(9,6), savefig=None, dpi=None):
super(MatplotlibFigure, self).__init__(title=title, layout=layout,
xtitle=xtitle, ytitle=ytitle, logx=logx, logy=logy)
self.use_legend = use_legend
self.linewidth = linewidth
self.xscale = xscale
self.yscale = yscale
self.grid = grid
self.ordinates = ordinates
self.tag = tag
self.labels = labels
self.figsize = figsize
self.savefig = savefig
self.dpi = dpi
def __init__(self, title=None, layout=PlottingLayout(), logx=False, logy=False, save_to_pdf=False, xtitle=None, ytitle=None):
super(PlotlyFigure, self).__init__(title=title, layout=layout, logx=logx, xtitle=xtitle, logy=logy, ytitle=ytitle)
def newFigure(self, title=None, logX=False, logY=False, layout=PlottingLayout(), xtitle=None, ytitle=None):
""" Returns a figure object."""
return PlotlyFigure(title=title, layout=layout, xtitle=xtitle, ytitle=ytitle)
def __init__(self, title=None, layout=PlottingLayout(), logx=False, xtitle=None, logy=False, ytitle=None, selections=None):
""" Initialize the figure.
:param title: The title of the plot.
:param layout: Plotting layout information.
:param logx: Use log scale in x.
:param logy: Use log scale in y.
:param selections: Filter plotted traces based on passed name.
"""
self.title = title
self.xy_datasets = []
self.tagged_data = defaultdict(list)
self.xtitle = xtitle
self.ytitle = ytitle
self.logx = logx
self.logy = logy
self.selections=selections