Skip to content

Commit

Permalink
Update LinearModelAnalysis.cxx
Browse files Browse the repository at this point in the history
  • Loading branch information
mbaudin47 committed May 5, 2024
1 parent 447f0d3 commit 8efd36c
Showing 1 changed file with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -430,7 +430,7 @@ Graph LinearModelAnalysis::drawResidualsVsFitted() const
Cloud cloud(dataFull, "black", "fcircle");
graph.add(cloud);
// Add point identifiers for worst residuals
UnsignedInteger identifiers(ResourceMap::GetAsUnsignedInteger("LinearModelAnalysis-IdentifiersNumber"));
UnsignedInteger identifiers(std::min(size, ResourceMap::GetAsUnsignedInteger("LinearModelAnalysis-IdentifiersNumber")));
if (identifiers > 0)
{
if (identifiers > size)
Expand Down Expand Up @@ -478,7 +478,7 @@ Graph LinearModelAnalysis::drawScaleLocation() const
Cloud cloud(dataFull, "black", "fcircle");
graph.add(cloud);
// Add point identifiers for worst standardized residuals
UnsignedInteger identifiers(ResourceMap::GetAsUnsignedInteger("LinearModelAnalysis-IdentifiersNumber"));
UnsignedInteger identifiers(std::min(size, ResourceMap::GetAsUnsignedInteger("LinearModelAnalysis-IdentifiersNumber")));
if (identifiers > 0)
{
if (identifiers > size)
Expand Down Expand Up @@ -563,7 +563,7 @@ Graph LinearModelAnalysis::drawCookDistance() const
const Point cookdistances(linearModelResult_.getCookDistances());
const UnsignedInteger size(cookdistances.getSize());
// Add point identifiers for worst Cook's distance
UnsignedInteger identifiers(ResourceMap::GetAsUnsignedInteger("LinearModelAnalysis-IdentifiersNumber"));
UnsignedInteger identifiers(std::min(size, ResourceMap::GetAsUnsignedInteger("LinearModelAnalysis-IdentifiersNumber")));
Description annotations(size);
if (identifiers > 0)
{
Expand Down Expand Up @@ -622,7 +622,7 @@ Graph LinearModelAnalysis::drawResidualsVsLeverages() const
Cloud cloud(dataFull, "black", "fcircle");
graph.add(cloud);
// Add point identifiers for worst Cook's distance
UnsignedInteger identifiers(ResourceMap::GetAsUnsignedInteger("LinearModelAnalysis-IdentifiersNumber"));
UnsignedInteger identifiers(std::min(size, ResourceMap::GetAsUnsignedInteger("LinearModelAnalysis-IdentifiersNumber")));
if (identifiers > 0)
{
if (identifiers > size)
Expand Down Expand Up @@ -714,7 +714,7 @@ Graph LinearModelAnalysis::drawCookVsLeverages() const
Cloud cloud(dataFull, "black", "fcircle");
graph.add(cloud);
// Add point identifiers for worst Cook's distance
UnsignedInteger identifiers(ResourceMap::GetAsUnsignedInteger("LinearModelAnalysis-IdentifiersNumber"));
UnsignedInteger identifiers(std::min(size, ResourceMap::GetAsUnsignedInteger("LinearModelAnalysis-IdentifiersNumber")));
if (identifiers > 0)
{
if (identifiers > size)
Expand Down

0 comments on commit 8efd36c

Please sign in to comment.