tOptional plotting of points - polygen - generative drawing of polygonal patterns
(HTM) git clone git://src.adamsgaard.dk/polygen
(DIR) Log
(DIR) Files
(DIR) Refs
(DIR) LICENSE
---
(DIR) commit e063f3d1e7a93bf03b3d8aba162642bd0f815d68
(DIR) parent 81f436d4572ead5ff4f86d0e89547527dc20fd5d
(HTM) Author: Anders Damsgaard <anders.damsgaard@geo.au.dk>
Date: Thu, 13 Mar 2014 20:52:34 +0100
Optional plotting of points
Diffstat:
M polygen.py | 7 ++++---
1 file changed, 4 insertions(+), 3 deletions(-)
---
(DIR) diff --git a/polygen.py b/polygen.py
t@@ -13,7 +13,8 @@ class polyplot:
self.points = points
def plot_all_to_all(self, line_color='k', line_width=2,
- image_name='all_to_all', image_format='png'):
+ image_name='all_to_all', image_format='png',
+ plot_points=False, points_style='wo'):
self.points = numpy.asarray(self.points)
fig = plt.figure()
for i in range(self.points.shape[0]):
t@@ -22,8 +23,8 @@ class polyplot:
plt.plot([self.points[i,0], self.points[j,0]],
[self.points[i,1], self.points[j,1]],
line_color + '-', lw=line_width)
- print(self.points)
- plt.plot(self.points[:,0], self.points[:,1], 'ro')
+ if plot_points == True:
+ plt.plot(self.points[:,0], self.points[:,1], points_style)
plt.axis('equal')
fig.savefig(image_name + '.' + image_format)
fig.clf()