Skip to content

Commit

Permalink
Fixing percentiles
Browse files Browse the repository at this point in the history
  • Loading branch information
sylvielamythepaut committed Dec 14, 2023
1 parent 87652a7 commit b47c0d8
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions src/visualisers/EpsGraph.cc
Original file line number Diff line number Diff line change
Expand Up @@ -2589,15 +2589,18 @@ void EpsPlume::timeserie(Data& data, BasicGraphicsObjectContainer& visitor) {
}
if (shading_) {
for (vector<double>::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<double>::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]));
Expand Down

0 comments on commit b47c0d8

Please sign in to comment.