Skip to content

Commit

Permalink
Fixing issue #315 , diagonal line along x = y
Browse files Browse the repository at this point in the history
  • Loading branch information
nhall6 committed Aug 9, 2024
1 parent 4483c72 commit 9d782f5
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 9d782f5

Please sign in to comment.