packages.ufo: use gnuplot backend

This commit is contained in:
2024-09-12 06:05:27 +08:00
parent f3b02a78b1
commit 45ed2cb251
2 changed files with 2 additions and 6 deletions

View File

@@ -14,12 +14,9 @@ find_package(Matplot++ REQUIRED)
find_package(biu REQUIRED)
find_package(Threads REQUIRED)
# matplot++ requires glad but does not find it
find_package(glad REQUIRED)
add_executable(ufo src/fold.cpp src/unfold.cpp src/plot.cpp src/main.cpp)
target_include_directories(ufo PRIVATE ${PROJECT_SOURCE_DIR}/include)
target_link_libraries(ufo PRIVATE TBB::tbb Matplot++::matplot Matplot++::matplot_opengl biu::biu)
target_link_libraries(ufo PRIVATE TBB::tbb Matplot++::matplot biu::biu)
target_compile_features(ufo PRIVATE cxx_std_23)
target_compile_options(ufo PRIVATE -fexperimental-library)

View File

@@ -1,6 +1,5 @@
# include <ufo.hpp>
# include <matplot/matplot.h>
# include <matplot/backend/opengl.h>
# include <boost/container/flat_map.hpp>
void ufo::plot(std::string config_file)
@@ -185,7 +184,7 @@ void ufo::plot(std::string config_file)
if (g[i][j] < 0) g[i][j] = 0;
b[i][j] = 255;
}
auto f = matplot::figure<matplot::backend::opengl>(true);
auto f = matplot::figure(true);
auto ax = f->current_axes();
auto image = ax->image(std::tie(r, g, b));
image->matrix_a(a);