diff --git a/wing_design/src/taw/cantilever/cantileverWingDesignPlot.cpp b/wing_design/src/taw/cantilever/cantileverWingDesignPlot.cpp index df7d70778076f10da9b0c4a100dbc11683c6319e..e587467ae7a61efce7b30cdb636535a4bc82755c 100644 --- a/wing_design/src/taw/cantilever/cantileverWingDesignPlot.cpp +++ b/wing_design/src/taw/cantilever/cantileverWingDesignPlot.cpp @@ -177,10 +177,9 @@ fs::path Wing::plot_wing_planform() { ax->legend()->font_size(8); - fs::path plot_path = rtIO->getPlotDir() + "/wing_planfrom.svg"; + fs::path plot_path = rtIO->getPlotDir() + "/wing_design_wing_planform.svg"; matplot::save(f, plot_path.string(), "svg"); std::this_thread::sleep_for(std::chrono::milliseconds(500)); - system("pkill gnuplot"); return fs::relative(plot_path, fs::path(rtIO->getHtmlDir())); } @@ -214,36 +213,10 @@ fs::path Wing::plot_thickness_and_twist_distribution() { ax2->ylabel("\u03F5 [\u00b0]"); ax2->xlabel("\u03B7"); ax2->grid(true); - /* - // Plot the first set of data - ax1->plot(eta, thickness_to_chord_ratio, "g-")->use_y2(false).color("black").line_width(1.5); - ax1->xlabel("\u03B7"); - ax1->ylabel("t/c"); - ax1->limits_mode_automatic(); - ax1->legend({"t/c"}); - matplot::hold(true); - // Create a secondary y-axis - auto ax2 = f->add_axes(ax1, false, false); - ax2->plot(eta, twist, "b-")->use_y2(true).color("green").line_style("--").line_width(1.5); - ax2->y2_axis().limits({-1, 1}); - // ax2->visible(false); - ax2->grid(true); - ax2->y_axis().color("black"); - ax2->y2_axis().label("\u03F5 [\u00b0]"); - ax2->legend({"t/c", "\u03F5"}); - - // Set the secondary y-axis invisible except for the y-axis itself - ax2->x_axis().visible(true); - ax2->y2_axis().color("black"); - // Adjust limits and ticks if necessary - ax2->ylim({0, 0.2}); - ax2->y2lim({-1, 1}); - */ - fs::path plot_path = rtIO->getPlotDir() + "/thickness_and_twist_distribution.svg"; + fs::path plot_path = rtIO->getPlotDir() + "/wing_design_thickness_and_twist_distribution.svg"; matplot::save(f, plot_path.string(), "svg"); std::this_thread::sleep_for(std::chrono::milliseconds(500)); - system("pkill gnuplot"); return fs::relative(plot_path, fs::path(rtIO->getHtmlDir())); } @@ -291,11 +264,11 @@ std::vector<fs::path> Wing::plot_airfoils() { ax->xlim({0, 1}); ax->axis(matplot::equal); - fs::path plot_path = rtIO->getPlotDir() + "/" + airfoil_data.first + "_airfoil.svg"; + fs::path plot_path = rtIO->getPlotDir() + "/wing_design_" + airfoil_data.first + "_airfoil.svg"; matplot::save(f, plot_path.string(), "svg"); airfoil_plots_path.push_back(fs::relative(plot_path, fs::path(rtIO->getHtmlDir()))); std::this_thread::sleep_for(std::chrono::milliseconds(500)); - system("pkill gnuplot"); + } } return airfoil_plots_path;