Skip to content

Commit

Permalink
fix issue #56
Browse files Browse the repository at this point in the history
  • Loading branch information
slowkow committed Nov 8, 2016
1 parent 2c72e09 commit a2f6b11
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 10 deletions.
6 changes: 1 addition & 5 deletions R/geom-label-repel.R
Original file line number Diff line number Diff line change
Expand Up @@ -93,10 +93,6 @@ GeomLabelRepel <- ggproto(
lab <- parse(text = as.character(lab))
}

# Get the x and y limits of the panel area.
limits <- data.frame(x = panel_scales$x.range, y = panel_scales$y.range)
limits <- coord$transform(limits, panel_scales)

# Transform the nudges to the panel scales.
nudges <- data.frame(
x = data$x + nudge_x,
Expand All @@ -112,7 +108,7 @@ GeomLabelRepel <- ggproto(
nudges$y <- nudges$y - data$y

ggname("geom_label_repel", gTree(
limits = limits,
limits = data.frame(x = c(0, 1), y = c(0, 1)),
data = data,
lab = lab,
nudges = nudges,
Expand Down
6 changes: 1 addition & 5 deletions R/geom-text-repel.R
Original file line number Diff line number Diff line change
Expand Up @@ -228,10 +228,6 @@ GeomTextRepel <- ggproto("GeomTextRepel", Geom,
lab <- parse(text = lab)
}

# Get the x and y limits of the panel area.
limits <- data.frame(x = panel_scales$x.range, y = panel_scales$y.range)
limits <- coord$transform(limits, panel_scales)

# Transform the nudges to the panel scales.
nudges <- data.frame(
x = data$x + nudge_x,
Expand All @@ -247,7 +243,7 @@ GeomTextRepel <- ggproto("GeomTextRepel", Geom,
nudges$y <- nudges$y - data$y

ggname("geom_text_repel", gTree(
limits = limits,
limits = data.frame(x = c(0, 1), y = c(0, 1)),
data = data,
lab = lab,
nudges = nudges,
Expand Down

0 comments on commit a2f6b11

Please sign in to comment.