Skip to content

Commit 3ffa1dd

Browse files
committed
Minor fixes
1 parent 4329a05 commit 3ffa1dd

File tree

3 files changed

+8
-5
lines changed

3 files changed

+8
-5
lines changed

examples/rectangular_wing.jl

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -84,3 +84,4 @@ plot_polars(
8484
Umag=Umag,
8585
title="Rectangular Wing Polars"
8686
)
87+
nothing

src/color_palette.jl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -69,14 +69,14 @@ end
6969
7070
Set the default style for plots using LaTeX.
7171
"""
72-
function set_plot_style()
72+
function set_plot_style(titel_size=16)
7373
# plt.style.use('seaborn-whitegrid')
7474
# plt.style.use("seaborn-v0_8-whitegrid")
7575
rcParams = plt.PyDict(plt.matplotlib."rcParams")
7676
rcParams["text.usetex"] = true
7777
rcParams["font.family"] = "serif"
7878
rcParams["font.serif"] = ["Computer Modern Roman"]
79-
rcParams["axes.titlesize"] = 28
79+
rcParams["axes.titlesize"] = titel_size
8080
# rcParams["axes.ymargin"] = 0.1
8181
rcParams["axes.labelsize"] = 12
8282
rcParams["axes.linewidth"] = 1

src/plotting.jl

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,7 @@ end
114114
Create a 3D plot of wing geometry including panels and filaments.
115115
"""
116116
function create_geometry_plot(wing_aero, title, view_elevation, view_azimuth; zoom=1.8)
117-
set_plot_style()
117+
set_plot_style(28)
118118

119119
panels = wing_aero.panels
120120
va = isa(wing_aero.va, Tuple) ? wing_aero.va[1] : wing_aero.va
@@ -442,6 +442,8 @@ function generate_polar_data(
442442

443443
# Previous gamma for initialization
444444
gamma = nothing
445+
446+
set_plot_style()
445447

446448
for (i, angle_i) in enumerate(angle_range)
447449
# Set angle based on type
@@ -730,8 +732,8 @@ function plot_polars(
730732
fig.tight_layout(h_pad=2.5, rect=(0.01,0.01,0.99,0.99))
731733

732734
# Save and show plot
733-
if is_save
734-
save_plot(res, save_path, title, data_type=data_type)
735+
if is_save && !isnothing(save_path)
736+
save_plot(fig, save_path, title, data_type=data_type)
735737
end
736738

737739
if is_show

0 commit comments

Comments
 (0)