summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarius Peter <blendoit@gmail.com>2019-06-12 14:52:49 -0700
committerMarius Peter <blendoit@gmail.com>2019-06-12 14:52:49 -0700
commit47b6bcca3455ea0d0e3996d31188ac34dcaa1f49 (patch)
treebab1350a2adac9e6d38b2339af29f9e99ee4aa4e
parent7c34c1421655f2bdabb85bd65ef7c9ca0496bf9a (diff)
proportional graph plotting
-rw-r--r--creator.py7
-rw-r--r--main.py2
2 files changed, 4 insertions, 5 deletions
diff --git a/creator.py b/creator.py
index eac3918..aa8001f 100644
--- a/creator.py
+++ b/creator.py
@@ -372,8 +372,8 @@ def plot(airfoil, spar, stringer):
airfoil.y_c,
'-.',
color='r',
- linewidth='2',
- label='mean camber line')
+ linewidth='2')
+ # label='mean camber line')
# Plot upper surface
plt.plot(airfoil.x_u, airfoil.y_u, '', color='b', linewidth='1')
# Plot lower surface
@@ -405,10 +405,9 @@ def plot(airfoil, spar, stringer):
print('Unable to plot stringers. Were they created?')
# Graph formatting
- plt.gcf().set_size_inches(9, 2.2)
+ plt.gca().set_aspect('equal', adjustable='box')
plt.xlabel('X axis')
plt.ylabel('Y axis')
- # plt.gcf().set_size_inches(self.chord, max(self.y_u) - min(self.y_l))
plt.grid(axis='both', linestyle=':', linewidth=1)
plt.show()
return None
diff --git a/main.py b/main.py
index 2a8fdbe..9278eeb 100644
--- a/main.py
+++ b/main.py
@@ -21,7 +21,7 @@ import random
import time
start_time = time.time()
-CHORD_LENGTH = 140
+CHORD_LENGTH = 1000
SEMI_SPAN = 200
POP_SIZE = 1
Copyright 2019--2024 Marius PETER