@@ -257,8 +257,9 @@ 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- full_path = joinpath (save_path, title * data_type)
261- fallback_path = joinpath (save_path, title * " .png" )
260+ sanitized_title = replace (String (title), ' ' => ' _' )
261+ full_path = joinpath (save_path, sanitized_title * data_type)
262+ fallback_path = joinpath (save_path, sanitized_title * " .png" )
262263
263264 @debug " Attempting to save figure to: $full_path "
264265 @debug " Current working directory: $(pwd ()) "
504505
505506"""
506507 plot_distribution(y_coordinates_list, results_list, label_list;
507- title="spanwise_distribution", data_type=".png" ,
508+ title="spanwise_distribution", data_type=nothing ,
508509 save_path=nothing, is_save=false, is_show=true, use_tex=false)
509510
510511Plot spanwise distributions of aerodynamic properties using Makie.
@@ -516,15 +517,15 @@ Plot spanwise distributions of aerodynamic properties using Makie.
516517
517518# Keyword arguments
518519- `title`: Plot title (default: "spanwise_distribution")
519- - `data_type`: File extension (default: ".png", also supports ".jpeg" )
520+ - `data_type`: File extension (default: `nothing`; delegated to `save_plot` backend-aware default )
520521- `save_path`: Path to save plots (default: nothing)
521522- `is_save`: Whether to save (default: false)
522523- `is_show`: Whether to display (default: true)
523524- `use_tex`: Ignored for Makie (default: false)
524525"""
525526function VortexStepMethod. plot_distribution (y_coordinates_list, results_list, label_list;
526527 title= " spanwise_distribution" ,
527- data_type= " .png " ,
528+ data_type= nothing ,
528529 save_path= nothing ,
529530 is_save= false ,
530531 is_show= true ,
@@ -659,7 +660,7 @@ Generate polar data for aerodynamic analysis over a range of angles.
659660 literature_path_list=String[],
660661 angle_range=range(0, 20, 2), angle_type="angle_of_attack",
661662 angle_of_attack=0.0, side_slip=0.0, v_a=10.0,
662- title="polar", data_type=".png" , save_path=nothing,
663+ title="polar", data_type=nothing , save_path=nothing,
663664 is_save=true, is_show=true, use_tex=false)
664665
665666Plot polar data comparing different solvers using Makie.
@@ -677,7 +678,7 @@ Plot polar data comparing different solvers using Makie.
677678- `side_slip`: Side slip angle [°] (default: 0.0)
678679- `v_a`: Wind speed [m/s] (default: 10.0)
679680- `title`: Plot title
680- - `data_type`: File extension (default: ".png", also supports ".jpeg" )
681+ - `data_type`: File extension (default: `nothing`; delegated to `save_plot` backend-aware default )
681682- `save_path`: Path to save (default: nothing)
682683- `is_save`: Whether to save (default: true)
683684- `is_show`: Whether to display (default: true)
@@ -695,7 +696,7 @@ function VortexStepMethod.plot_polars(
695696 side_slip= 0.0 ,
696697 v_a= 10.0 ,
697698 title= " polar" ,
698- data_type= " .png " ,
699+ data_type= nothing ,
699700 save_path= nothing ,
700701 is_save= true ,
701702 is_show= true ,
0 commit comments