Skip to content

Commit

Permalink
Merge pull request #316 from OHDSI/prerelease-issue#315
Browse files Browse the repository at this point in the history
Fixing issue #315 , diagonal line along x = y
  • Loading branch information
jreps authored Aug 16, 2024
2 parents 025ce0d + 9d782f5 commit e3a70ff
Showing 1 changed file with 12 additions and 2 deletions.
14 changes: 12 additions & 2 deletions R/estimation-cohort-method-covariateBalance.R
Original file line number Diff line number Diff line change
Expand Up @@ -454,7 +454,7 @@ plotCohortMethodCovariateBalanceScatterPlotNew <- function(
x1 = limits[2],
xref = "paper",
y0 = 0,
y1 = limits[2],
y1 = limits[2],
line = list(color = color, dash = 'dash')
)
}
Expand All @@ -468,7 +468,17 @@ plotCohortMethodCovariateBalanceScatterPlotNew <- function(
colors = colors
) %>%
plotly::layout(
shapes = list(xyline(limits)),
#shapes = list(xyline(limits)),
shapes = list(list(
type = "line",
x0 = 0,
x1 = ~max(absBeforeMatchingStdDiff, absAfterMatchingStdDiff),
xref = "x",
y0 = 0,
y1 = ~max(absBeforeMatchingStdDiff, absAfterMatchingStdDiff),
yref = "y",
line = list(color = "grey", dash = "dash")
)),
plot_bgcolor = "#e5ecf6",
xaxis = list(title = beforeLabel, range = limits),
yaxis = list(title = afterLabel, range = limits)
Expand Down

0 comments on commit e3a70ff

Please sign in to comment.