def addPatchSpecPlot(self, title, sim, patch_id, spec_id, data_size = 1000, x_range = None, y_range = None, **kwargs):
"""
Add plot to display the amount changes of species in a patch.
Parameters:
* title Title of the plot
* sim STEPS solver
* patch_id ID of the patch
* spec_id ID of the species
* data_size Size of the data history
* x_range Range of X axis
* 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 = PatchSpecUpdater(plot, sim, patch_id, spec_id, data_size, x_range, y_range, **kwargs)
self.updater[title] = updater
return plot
评论列表
文章目录