diff options
| author | jeanpouget-abadie <jean.pougetabadie@gmail.com> | 2015-02-06 11:23:51 -0500 |
|---|---|---|
| committer | jeanpouget-abadie <jean.pougetabadie@gmail.com> | 2015-02-06 11:23:51 -0500 |
| commit | 300363430bf01b2a4dfa190797450b6f4b809a08 (patch) | |
| tree | d2538fa7b47d180fb88b26bdf40cadfba833d11c /src/make_plots.py | |
| parent | 07aaef11e08916bf022743b570566a78f0ec27df (diff) | |
| download | cascades-300363430bf01b2a4dfa190797450b6f4b809a08.tar.gz | |
better plots
Diffstat (limited to 'src/make_plots.py')
| -rw-r--r-- | src/make_plots.py | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/src/make_plots.py b/src/make_plots.py index 9615d1b..85850b1 100644 --- a/src/make_plots.py +++ b/src/make_plots.py @@ -101,9 +101,10 @@ def plot_barabasi_albert_graph(): ax.plot(x, lasso, 'ko-', color="orange", label="Lasso") ax.plot(x, max_likel, 'ko-', color="cornflowerblue", label="MLE") ax.plot(x, sparse_recov, 'ko-', color="k", label="Our Method") - plt.legend(loc="lower right") + plt.legend(loc="lower right", fontsize=18) ax.set_xticks(x) ax.set_xticklabels(tuple(labels)) + plt.savefig("../paper/figures/"+"barabasi_albert.pdf") @@ -111,7 +112,7 @@ def plot_barabasi_albert_graph(): def plot_kronecker_l2norm(): plt.clf() fig = plt.figure(1) - x = [50, 100, 500, 1000, 2000] + x = [50, 150, 500, 1000, 2000] sparse_recov = [62, 60, 36, 28, 21] max_likel = [139, 101, 42, 31, 25] lasso = [50, 48, 33, 29, 23] @@ -130,14 +131,15 @@ def plot_kronecker_l2norm(): ax.plot(x, sparse_recov, 'ko-', color="k", label="Our Method") plt.legend(loc="upper right") ax.set_xticks(x) - ax.set_xticklabels(tuple(x)) + ax.set_xticklabels(tuple([50, 100, 500, 1000, 2000])) + ax.set_yticklabels(tuple(['', 20, 40, 60, 80, 100, 120, 140])) plt.savefig("../paper/figures/"+"kronecker_l2_norm.pdf") def plot_kronecker_l2norm_nonsparse(): plt.clf() fig = plt.figure(1) - x = [50, 100, 500, 1000, 2000] + x = [50, 150, 500, 1000, 2000] sparse_recov = [56, 55, 28, 21, 15] max_likel = [125, 80, 35, 25, 20] lasso = [47, 47, 27, 22, 17] @@ -156,7 +158,8 @@ def plot_kronecker_l2norm_nonsparse(): ax.plot(x, sparse_recov, 'ko-', color="k", label="Our Method") plt.legend(loc="upper right") ax.set_xticks(x) - ax.set_xticklabels(tuple(x)) + ax.set_xticklabels(tuple([50, 100, 500, 1000, 2000])) + ax.set_yticklabels(tuple(['', 20, 40, 60, 80, 100, 120, 140])) plt.savefig("../paper/figures/"+"kronecker_l2_norm_nonsparse.pdf") |
