We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
After the recent Contour changes I wonder if we should have a Contour levels discretization setting.
void Contour::buildDefaultLevels(const UnsignedInteger number) { const UnsignedInteger size = data_.getSize(); levels_.resize(number); if (levelsDiscretization_ == "linear") { const Scalar xMin = data_.getMin()[0]; const Scalar xMax = data_.getMax()[0]; for (UnsignedInteger i = 0; i < number; ++ i) levels_[i] = xMin + (i * 1.0 / (number - 1.0)) * (xMax - xMin); } else if (levelsDiscretization_ == "ranks") { // Use the empirical quantiles const Sample sortedData(data_.sort(0)); for (UnsignedInteger i = 0; i < number; ++ i) levels_[i] = sortedData(static_cast<UnsignedInteger>(size * (i + 0.5) / number), 0); levels_.erase(std::unique(levels_.begin(), levels_.end()), levels_.end()); } }
Currently if we want a plot with linear discretization we should erase the default ranks discretization and let matplotlib compute its own.
No response
The text was updated successfully, but these errors were encountered:
@josephmure : What's your point of view on this topic?
Sorry, something went wrong.
No branches or pull requests
What is the idea?
After the recent Contour changes I wonder if we should have a Contour levels discretization setting.
Currently if we want a plot with linear discretization we should erase the default ranks discretization and let matplotlib compute its own.
Why is this needed?
No response
Additional Context
No response
The text was updated successfully, but these errors were encountered: