def addCompSpecDist(self, title, mesh, sim, comp_id, spec_id, axis = "x", nbins = 20, y_range = None, **kwargs):
"""
Add plot to display the distribution of species in a compartment.
Parameters:
* title Title of the plot
* sim STEPS solver
* comp_id ID of the compartment
* spec_id ID of the species
* axis Spatial direction of the distribution
* nbins Number of bins for the data
* y_range Range of y axis
* **kwargs Other keywords that are supported by pygraph.GraphicsWindow class
Return:
pyqtgraph.PlotItem object
"""
if title in self.updater:
raise NameError('A Plot with name ' + title + " exists.")
plot = self.addPlot(title = title)
updater = CompSpecDistUpdater(plot, mesh, sim, comp_id, spec_id, axis, nbins, y_range, **kwargs)
self.updater[title] = updater
return plot
评论列表
文章目录