diff options
Diffstat (limited to 'creator.py')
-rw-r--r-- | creator.py | 8 |
1 files changed, 5 insertions, 3 deletions
@@ -362,7 +362,7 @@ class Stringer(Coordinates): return None -def plot(airfoil): +def plot_geom(airfoil): '''This function plots the airfoil's + sub-components' geometry.''' # Plot chord @@ -370,11 +370,12 @@ def plot(airfoil): y_chord = [0, 0] plt.plot(x_chord, y_chord, linewidth='1') # Plot quarter chord - plt.plot(airfoil.chord / 4, 0, '.', color='g', markersize=24) + plt.plot(airfoil.chord / 4, 0, '.', color='g', + markersize=24, label='Quarter-chord') # Plot mean camber line plt.plot(airfoil.x_c, airfoil.y_c, '-.', color='r', linewidth='2', - label='mean camber line') + label='Mean camber line') # Plot upper surface plt.plot(airfoil.x_u, airfoil.z_u, '', color='b', linewidth='1') @@ -407,6 +408,7 @@ def plot(airfoil): plt.xlim(- 0.10 * plot_bound, 1.10 * plot_bound) plt.ylim(- (1.10 * plot_bound / 2), (1.10 * plot_bound / 2)) plt.gca().set_aspect('equal', adjustable='box') + plt.gca().legend() plt.grid(axis='both', linestyle=':', linewidth=1) plt.show() return None |