def test_fig_legend(): fig = plt.figure() ax = fig.add_subplot(111) make_legend(['a', 'b', 'c'], fig, legend_type=PATCH) set_fig_to_bw(fig, style=GREYSCALE) plt.draw()
def show_ppt(self): ''' show the peeling and pasting trajectory in a figure ''' ax = host_subplot(111) ax.set_xlabel("peeling and pasting trajectory") par = ax.twinx() par.set_ylabel("nr. restricted dimensions") ax.plot(self.mean, label="mean") ax.plot(self.mass, label="mass") ax.plot(self.coverage, label="coverage") ax.plot(self.density, label="density") par.plot(self.res_dim, label="restricted_dim") ax.grid(True, which='both') ax.set_ylim(ymin=0,ymax=1) fig = plt.gcf() make_legend(['mean', 'mass', 'coverage', 'density', 'restricted_dim'], fig, ncol=5) return fig
def test_fig_legend(): fig = plt.figure() ax = fig.add_subplot(111) make_legend(['a','b','c'], fig, legend_type=PATCH) set_fig_to_bw(fig, style=GREYSCALE) plt.show()