Skip to content

Commit

Permalink
Update classdesc ref.
Browse files Browse the repository at this point in the history
Test for finiteness of data when computing plot bounds.
  • Loading branch information
highperformancecoder committed Mar 13, 2024
1 parent 1731b1c commit 41b010a
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 9 deletions.
22 changes: 14 additions & 8 deletions src/plot.cc
Original file line number Diff line number Diff line change
Expand Up @@ -322,17 +322,23 @@ namespace ecolab
assert(x[i].size()==y[i].size());
for (size_t j=0; j<x[i].size(); ++j)
{
if (x[i][j]<minx) minx=x[i][j];
if (x[i][j]>maxx) maxx=x[i][j];
if (i<penSide.size() && penSide[i]==right)
if (finite(x[i][j]))
{
if (y[i][j]<miny1) miny1=y[i][j];
if (y[i][j]>maxy1) maxy1=y[i][j];
if (x[i][j]<minx) minx=x[i][j];
if (x[i][j]>maxx) maxx=x[i][j];
}
else
if (finite(y[i][j]))
{
if (y[i][j]<miny) miny=y[i][j];
if (y[i][j]>maxy) maxy=y[i][j];
if (i<penSide.size() && penSide[i]==right)
{
if (y[i][j]<miny1) miny1=y[i][j];
if (y[i][j]>maxy1) maxy1=y[i][j];
}
else
{
if (y[i][j]<miny) miny=y[i][j];
if (y[i][j]>maxy) maxy=y[i][j];
}
}
}
}
Expand Down

0 comments on commit 41b010a

Please sign in to comment.