Skip to content

Commit 9c418ce

Browse files
committed
Billowing can save now pdf
1 parent fb44d6c commit 9c418ce

2 files changed

Lines changed: 5 additions & 5 deletions

File tree

ext/VortexStepMethodControlPlotsExt.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ function VortexStepMethod.save_plot(fig, save_path, title; data_type=".pdf")
5656
isnothing(save_path) && throw(ArgumentError("save_path should be provided"))
5757

5858
!isdir(save_path) && mkpath(save_path)
59-
sanitized_title = replace(String(title), ' ' => '_')
59+
sanitized_title = replace(replace(String(title), ' ' => '_'), '%' => "pct")
6060
full_path = joinpath(save_path, sanitized_title * data_type)
6161

6262
@debug "Attempting to save figure to: $full_path"

ext/VortexStepMethodMakieExt.jl

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -257,7 +257,7 @@ function VortexStepMethod.save_plot(fig::Makie.Figure, save_path, title; data_ty
257257
isnothing(save_path) && throw(ArgumentError("save_path should be provided"))
258258

259259
!isdir(save_path) && mkpath(save_path)
260-
sanitized_title = replace(String(title), ' ' => '_')
260+
sanitized_title = replace(replace(String(title), ' ' => '_'), '%' => "pct")
261261
full_path = joinpath(save_path, sanitized_title * data_type)
262262
fallback_path = joinpath(save_path, sanitized_title * ".png")
263263

@@ -448,7 +448,7 @@ end
448448

449449
"""
450450
plot_geometry(body_aero::BodyAerodynamics, title;
451-
data_type=".png", save_path=nothing,
451+
data_type=nothing, save_path=nothing,
452452
is_save=false, is_show=false,
453453
view_elevation=15, view_azimuth=-120, use_tex=false)
454454
@@ -459,7 +459,7 @@ Plot wing geometry from different viewpoints using Makie.
459459
- `title`: plot title
460460
461461
# Keyword arguments:
462-
- `data_type`: File extension (default: ".png", also supports ".jpeg")
462+
- `data_type`: File extension (default: `nothing`; delegated to `save_plot` backend-aware default)
463463
- `save_path`: Path for saving (default: nothing)
464464
- `is_save`: Whether to save (default: false)
465465
- `is_show`: Whether to display (default: false)
@@ -468,7 +468,7 @@ Plot wing geometry from different viewpoints using Makie.
468468
- `use_tex`: Ignored for Makie (default: false)
469469
"""
470470
function VortexStepMethod.plot_geometry(body_aero::BodyAerodynamics, title;
471-
data_type=".png",
471+
data_type=nothing,
472472
save_path=nothing,
473473
is_save=false,
474474
is_show=false,

0 commit comments

Comments
 (0)