def group_plot(groups, no_group, figname="group_plot.png"): colors = ["r", "g", "b", "y", "k", "w"] * 100 for group, color in zip(groups, colors): scatter(group.x, group.y, c=color) if len(no_group): scatter(no_group.x, no_group.y, c="m", marker="s") native_plot.gca().set_aspect("equal", adjustable="datalim") native_plot.savefig(figname) native_plot.clf()
def group_plot(groups, no_group, figname="group_plot.png"): colors = ["r", "g", "b", "y", "k", "w"]*100 for group, color in zip(groups, colors): scatter(group.x, group.y, c=color) if len(no_group): scatter(no_group.x, no_group.y, c="m", marker="s") native_plot.gca().set_aspect("equal", adjustable = "datalim") native_plot.savefig(figname) native_plot.clf()
def energy_evolution_plot(time, kinetic, potential, thermal, figname="energy_evolution.png"): native_plot.subplot(211) plot(time, kinetic, label='K') plot(time, potential, label='U') plot(time, thermal, label='Q') plot(time, kinetic + potential + thermal, label='E') xlabel('Time') ylabel('Energy') native_plot.legend(prop={'size':"x-small"}, loc=4) native_plot.subplot(212) plot(time, thermal, label='Q') native_plot.savefig(figname) native_plot.clf()