@@ -5,6 +5,11 @@ import VortexStepMethod: calculate_filaments_for_plotting
55export plot_geometry, plot_distribution, plot_polars, save_plot, show_plot,
66 plot_polar_data, plot_combined_analysis
77
8+ # Set this extension as the active plotting backend when loaded
9+ function __init__ ()
10+ VortexStepMethod. _PLOT_BACKEND[] = VortexStepMethod. MakieBackend ()
11+ end
12+
813# Global storage for panel mesh observables (for dynamic plotting)
914const PANEL_MESH_OBSERVABLES = Ref {Union{Nothing,Dict}} (nothing )
1015
@@ -479,7 +484,8 @@ Plot wing geometry from different viewpoints using Makie.
479484- `view_azimuth`: View azimuth angle in degrees (default: -120)
480485- `use_tex`: Ignored for Makie (default: false)
481486"""
482- function VortexStepMethod. plot_geometry (body_aero:: BodyAerodynamics , title;
487+ function VortexStepMethod. plot_geometry (body_aero:: BodyAerodynamics , title,
488+ :: VortexStepMethod.MakieBackend ;
483489 data_type= nothing ,
484490 save_path= nothing ,
485491 is_save= false ,
@@ -535,7 +541,8 @@ Plot spanwise distributions of aerodynamic properties using Makie.
535541- `is_show`: Whether to display (default: true)
536542- `use_tex`: Ignored for Makie (default: false)
537543"""
538- function VortexStepMethod. plot_distribution (y_coordinates_list, results_list, label_list;
544+ function VortexStepMethod. plot_distribution (y_coordinates_list, results_list, label_list,
545+ :: VortexStepMethod.MakieBackend ;
539546 title= " spanwise_distribution" ,
540547 data_type= nothing ,
541548 save_path= nothing ,
@@ -700,7 +707,8 @@ Plot polar data comparing different solvers using Makie.
700707function VortexStepMethod. plot_polars (
701708 solver_list,
702709 body_aero_list,
703- label_list;
710+ label_list,
711+ :: VortexStepMethod.MakieBackend ;
704712 literature_path_list= String[],
705713 angle_range= range (0 , 20 , 2 ),
706714 angle_type= " angle_of_attack" ,
@@ -882,7 +890,8 @@ Plot polar data (Cl, Cd, Cm) as 3D surfaces using Makie.
882890- `is_show`: Whether to display (default: true)
883891- `use_tex`: Ignored for Makie (default: false)
884892"""
885- function VortexStepMethod. plot_polar_data (body_aero:: BodyAerodynamics ;
893+ function VortexStepMethod. plot_polar_data (body_aero:: BodyAerodynamics ,
894+ :: VortexStepMethod.MakieBackend ;
886895 alphas= collect (deg2rad .(- 5 : 0.3 : 25 )),
887896 delta_tes= collect (deg2rad .(- 5 : 0.3 : 25 )),
888897 is_show= true ,
@@ -972,7 +981,8 @@ Create combined multi-panel figure with geometry, polar data, distributions, and
972981function VortexStepMethod. plot_combined_analysis (
973982 solver,
974983 body_aero,
975- results;
984+ results,
985+ :: VortexStepMethod.MakieBackend ;
976986 solver_label= " VSM" ,
977987 labels= nothing ,
978988 angle_range= range (0 , 20 , length= 20 ),
0 commit comments