File tree Expand file tree Collapse file tree 2 files changed +8
-0
lines changed Expand file tree Collapse file tree 2 files changed +8
-0
lines changed Original file line number Diff line number Diff line change 11# Generated by roxygen2: do not edit by hand
22
3+ S3method(print_plot,"function")
4+ S3method(print_plot,default)
5+ S3method(print_plot,ggplot)
6+ S3method(print_plot,recordedplot)
37export(expect_doppelganger)
48export(write_svg)
59import(rlang)
Original file line number Diff line number Diff line change @@ -27,10 +27,12 @@ print_plot <- function(p, title = "") {
2727 UseMethod(" print_plot" )
2828}
2929
30+ # ' @export
3031print_plot.default <- function (p , title = " " ) {
3132 print(p )
3233}
3334
35+ # ' @export
3436print_plot.ggplot <- function (p , title = " " ) {
3537 if (title != " " && ! " title" %in% names(p $ labels )) {
3638 p <- p + ggplot2 :: ggtitle(title )
@@ -41,10 +43,12 @@ print_plot.ggplot <- function(p, title = "") {
4143 print(p )
4244}
4345
46+ # ' @export
4447print_plot.recordedplot <- function (p , title ) {
4548 grDevices :: replayPlot(p )
4649}
4750
51+ # ' @export
4852print_plot.function <- function (p , title ) {
4953 p()
5054}
You can’t perform that action at this time.
0 commit comments