From b47c0d8709327ff2a95a88020521fff005b37878 Mon Sep 17 00:00:00 2001 From: Sylvie Lamy-Thepaut Date: Thu, 14 Dec 2023 13:34:32 +0100 Subject: [PATCH 1/2] Fixing percentiles --- src/visualisers/EpsGraph.cc | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/visualisers/EpsGraph.cc b/src/visualisers/EpsGraph.cc index 1998281f..5569c45c 100644 --- a/src/visualisers/EpsGraph.cc +++ b/src/visualisers/EpsGraph.cc @@ -2589,15 +2589,18 @@ void EpsPlume::timeserie(Data& data, BasicGraphicsObjectContainer& visitor) { } if (shading_) { for (vector::iterator level = shading_levels_.begin(); level != shading_levels_.end(); ++level) { - int i = *level * (members.size()/100.); + int i = (*level/100) * members.size(); + if (i >= members.size()) i = members.size() - 1; + + shading[*level].push_back(PaperPoint(x, members[i])); } } if (percentiles_) { for (vector::iterator level = percentiles_list_.begin(); level != percentiles_list_.end(); ++level) { - int i = *level * (members.size()/100.); + int i = (*level/100) * members.size(); if (i >= members.size()) i = members.size() - 1; percentiles[*level].push_back(PaperPoint(x, members[i])); From a62c9d8aebdb9d53ab1a3638eb6801dceff70fb2 Mon Sep 17 00:00:00 2001 From: Sylvie Lamy-Thepaut Date: Thu, 14 Dec 2023 13:36:00 +0100 Subject: [PATCH 2/2] HotFix : 4.15.1 --- CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 395d9591..0db451d1 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -15,7 +15,7 @@ cmake_minimum_required( VERSION 3.12 FATAL_ERROR ) set(CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cmake" ${CMAKE_MODULE_PATH} "${CMAKE_CURRENT_SOURCE_DIR}/../ecbuild/cmake") find_package( ecbuild 3.4 REQUIRED ) -project( magics VERSION 4.15.0 LANGUAGES CXX ) +project( magics VERSION 4.15.1 LANGUAGES CXX ) # make sure that the header files are installed into include/magics # note that this needs to be done before ecbuild_declare_project()