From 47b6bcca3455ea0d0e3996d31188ac34dcaa1f49 Mon Sep 17 00:00:00 2001 From: Marius Peter Date: Wed, 12 Jun 2019 14:52:49 -0700 Subject: proportional graph plotting --- creator.py | 7 +++---- main.py | 2 +- 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 -- cgit v1.2.3