Skip to content

Commit cd2a8d8

Browse files
committed
Sgg$ggtitle() = Sgg$title()
1 parent 018eff9 commit cd2a8d8

File tree

3 files changed

+8
-3
lines changed

3 files changed

+8
-3
lines changed

DESCRIPTION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
Package: chart
22
Type: Package
3-
Version: 1.5.0
3+
Version: 1.5.1
44
Title: General Charting (Plotting) Function
55
Description: Chart generalizes plot generation in R, being with base R plot
66
function, lattice or ggplot2. A formula interface is available for both

NEWS.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
# chart 1.5.1
2+
3+
- `sgg()` now prefers using `Sgg$ggtitle()`, but `Sgg$title()` is accepted as well.
4+
15
# chart 1.5.0
26

37
- The `gg()` subsettable function is now called `Sgg()` and it implements `svMisc:aka()` and `svMisc::section()` to sort items in different sections.

R/Sgg.R

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,7 @@ Sgg <- structure(function(ggplot, ...) {
7272
#' @rdname Sgg
7373
#' @method $ subsettable_Sgg
7474
`$.subsettable_Sgg` <- function(x, name) {
75+
# We use ggtitle(), but also allow title()
7576
if (name == "title")
7677
name <- "ggtitle"
7778
if (grepl("o__", name)) {
@@ -100,7 +101,7 @@ Sgg <- structure(function(ggplot, ...) {
100101
o__GEOMETRIES__ = construct_section("o__GEOMETRIES__", obj,
101102
apropos("^geom_")),
102103
o__AXES_LABELS__ = construct_section("o__AXES_LABELS__", obj,
103-
c("expand_limits", "guides", "labs", "lims", "title",
104+
c("expand_limits", "guides", "labs", "lims", "ggtitle",
104105
"xlab", "xlim", "ylab", "ylim")),
105106
o__STATS__ = construct_section("o__STATS__", obj,
106107
apropos("^stat_")),
@@ -149,7 +150,7 @@ Sgg <- structure(function(ggplot, ...) {
149150
l <- c(l, apropos(paste0("^geom_", pattern)))
150151
l <- c(l, "o__AXES_LABELS__")
151152
l <- c(l, "expand_limits", "guides", "labs", "lims",
152-
"title", # Instead of ggtitle (special case!)
153+
"ggtitle", # No, not any more! Instead of ggtitle (special case!)
153154
"xlab", "xlim", "ylab", "ylim")
154155
l <- c(l, "o__STATS__")
155156
l <- c(l, apropos(paste0("^stat_", pattern)))

0 commit comments

Comments
 (0)