Boehringer-Ingelheim / MVPapp

Model Visualization Platform - Shiny App to Explore Pharmacometrics Models
https://boehringer-ingelheim.github.io/MVPapp/
GNU General Public License v3.0
5 stars 0 forks source link

Median Line binning behavior is inconsistent #4

Closed stevechoy closed 1 day ago

stevechoy commented 1 day ago

The logic of how binning is handled for median lines are wrong.

Previously, increments are defined as follows:

bin_increment <- max_data_x / bin_number bin_times <- seq(min_data_x, max_data_x, by = bin_increment)

This is problematic when the min_data_x is sufficiently close to max_data_x, leading to too few bin_times.

To actually get 20 bins (bin_number default), bin_increment needs to be corrected to: bin_increment <- (max_data_x - min_data_x) / bin_number

stevechoy commented 1 day ago

This is now fixed and will be implemented for v0.2.9.