OHDSI / EmpiricalCalibration

An R package for performing empirical calibration of observational study estimates
http://ohdsi.github.io/EmpiricalCalibration/
10 stars 9 forks source link

Allow flexible x limits in plotCalibrationEffect #7

Closed azimov closed 2 years ago

azimov commented 2 years ago

Fixes #6

codecov[bot] commented 2 years ago

Codecov Report

Merging #7 (c446b50) into develop (ec17488) will increase coverage by 0.02%. The diff coverage is 100.00%.

:exclamation: Current head c446b50 differs from pull request most recent head 26a848c. Consider uploading reports for the commit 26a848c to get more accurate results Impacted file tree graph

@@             Coverage Diff             @@
##           develop       #7      +/-   ##
===========================================
+ Coverage    86.84%   86.87%   +0.02%     
===========================================
  Files           11       11              
  Lines         1574     1577       +3     
===========================================
+ Hits          1367     1370       +3     
  Misses         207      207              
Impacted Files Coverage Δ
R/Plots.R 95.27% <100.00%> (+0.02%) :arrow_up:

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update ec17488...26a848c. Read the comment docs.

schuemie commented 2 years ago

I agree there should be flexibility in picking the limits of the scale, but I would prefer the user is allowed to pick the limits, rather than deriving them from the data. As a general rule, in a report or paper you would like all plots to use the same axis, which is not possible if the axis varies per input data. So maybe just add a limits argument to the plot function?

schuemie commented 2 years ago

(actually, we should probably add xLimits and yLimits