From 77393391ad7d35a3b04b1754c9ef7de11fc97176 Mon Sep 17 00:00:00 2001 From: Johann Dreo Date: Mon, 2 Jun 2014 16:09:47 +0200 Subject: [PATCH] save images with the depth in the filename same dpi for both png and svg --- run_all.py | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/run_all.py b/run_all.py index b8cb362..3ba2b45 100755 --- a/run_all.py +++ b/run_all.py @@ -208,6 +208,8 @@ voronoi_centers = graph.nodes_of( voronoi_graph ) # PLOT ######################################################################## +dpi = 600 + contrast = [ ("pheromones",{"edgecolor":"blue"}), # do not specify linewidth and alpha ("tour",{"edgecolor":"red","alpha":0.9, "linewidth":3}), @@ -282,11 +284,11 @@ ax.set_aspect('equal') # transparent background in SVG fig.patch.set_visible(False) ax.axis('off') -plot.savefig("ubergeekism.svg", dpi=600) +plot.savefig("ubergeekism_d%i.svg" % depth, dpi=dpi) -ax.axis('off') fig.patch.set_visible(True) fig.patch.set_facecolor('white') -plot.savefig("ubergeekism.png", dpi=600) +plot.savefig("ubergeekism_d%i.png" % depth, dpi=dpi) + plot.show()