Skip to content

Commit f155d2f

Browse files
authored
Uses OutDec in isolines (#5556)
* Uses OutDec in isolines * Updates news * Fix typo
1 parent a96e664 commit f155d2f

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

NEWS.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
# ggplot2 (development version)
22

3+
* Contour functions will not fail when `options("OutDec")` is not `.` (@eliocamp, #5555).
4+
35
* The `legend.key` theme element is set to inherit from the `panel.background`
46
theme element. The default themes no longer set the `legend.key` element.
57
This causes a visual change with the default `theme_gray()` (#5549).

R/stat-contour.R

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,7 @@ StatContour <- ggproto("StatContour", Stat,
107107

108108
breaks <- contour_breaks(z.range, bins, binwidth, breaks)
109109

110-
isolines <- xyz_to_isolines(data, breaks)
110+
isolines <- withr::with_options(list(OutDec = "."), xyz_to_isolines(data, breaks))
111111
path_df <- iso_to_path(isolines, data$group[1])
112112

113113
path_df$level <- as.numeric(path_df$level)
@@ -140,7 +140,7 @@ StatContourFilled <- ggproto("StatContourFilled", Stat,
140140
compute_group = function(data, scales, z.range, bins = NULL, binwidth = NULL, breaks = NULL, na.rm = FALSE) {
141141
breaks <- contour_breaks(z.range, bins, binwidth, breaks)
142142

143-
isobands <- xyz_to_isobands(data, breaks)
143+
isobands <- withr::with_options(list(OutDec = "."), xyz_to_isobands(data, breaks))
144144
names(isobands) <- pretty_isoband_levels(names(isobands))
145145
path_df <- iso_to_polygon(isobands, data$group[1])
146146

0 commit comments

Comments
 (0)