def plot_state_change_graph_leaves(self): import matplotlib.pyplot as plt import numpy as np import analysis saved_projection = self.get_projection() n = len(self.unique_addresses) xyvals = [] for leaf_projection in self.leaf_projections: self.set_projection(leaf_projection) xyvals += [analysis.compute_changes_per_round(self, subdivisions=1, bucket_scalar = 1./n)] # restore previous projection self.set_projection(saved_projection) xlabel = "MiCA Rounds (%s ms)" % self.runtime_info.round_ms ylabel = "Fraction of nodes changed state" legend_labels = self.leaf_projections ipython.analysis_plot_2d_multiple(xyvals, xlabel, ylabel, legend_labels)
def plot_state_change_graph(self): x,y = analysis.compute_changes_per_round(self) xlabel = "Round" ylabel = "State changes per node per round" self.plot_2d(x,y, xlabel, ylabel)