tAdded dpi, changed example colors - polygen - generative drawing of polygonal … | |
git clone git://src.adamsgaard.dk/polygen | |
Log | |
Files | |
Refs | |
LICENSE | |
--- | |
commit 22a5d91a7ae7845038d6b110beb2d2d096cc48c5 | |
parent a77f286052906c75effedcc28fc68873164d26c9 | |
Author: Anders Damsgaard <[email protected]> | |
Date: Thu, 13 Mar 2014 21:49:39 +0100 | |
Added dpi, changed example colors | |
Diffstat: | |
M octahedron.py | 4 ++-- | |
M polygen.py | 5 +++-- | |
2 files changed, 5 insertions(+), 4 deletions(-) | |
--- | |
diff --git a/octahedron.py b/octahedron.py | |
t@@ -4,6 +4,6 @@ import polygen | |
octahedron = polygen.regular_star_polygon(8) | |
p = polygen.polyplot() | |
p.set_points(octahedron.points) | |
-p.plot_all_to_all(line_width=4, line_color='white', | |
+p.plot_all_to_all(line_width=4, line_color='#666666', | |
exceptions=[[0,4], [1,5], [2,6], [3,7]]) | |
-p.save_plot(background_color='#666666', transparent_background=False) | |
+p.save_plot(background_color='#333333', transparent_background=False) | |
diff --git a/polygen.py b/polygen.py | |
t@@ -14,11 +14,12 @@ class polyplot: | |
def plot_all_to_all(self, line_color='black', line_width=2, | |
line_style='solid', | |
- figure_size=(8,8), | |
+ figure_size_inches=(8,8), | |
+ dpi=None, | |
plot_points=False, points_style='wo', | |
show_axes=False, exceptions=[]): | |
self.points = numpy.asarray(self.points) | |
- self.fig = plt.figure(figsize=figure_size) | |
+ self.fig = plt.figure(figsize=figure_size_inches, dpi=dpi) | |
for i in range(self.points.shape[0]): | |
for j in range(self.points.shape[0]): | |
if (i != j and |