File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -114,6 +114,7 @@ S3method(ggoncoplot,"NULL")
114114S3method(ggoncoplot,default)
115115S3method(ggoncoplot,formula)
116116S3method(ggoncoplot,functon)
117+ S3method(ggplot,ggalign_area)
117118S3method(ggplot_add,FacetSector)
118119S3method(ggplot_build,ggalign_facet_sector_plot)
119120S3method(ggplot_build,ggalign_heatmap)
@@ -553,5 +554,4 @@ importFrom(utils,getFromNamespace)
553554importFrom(utils,getS3method)
554555importFrom(utils,modifyList)
555556importFrom(utils,packageName)
556- importFrom(utils,packageVersion)
557557importFrom(utils,str)
Original file line number Diff line number Diff line change @@ -192,16 +192,16 @@ as_areas.character <- function(x) {
192192as_areas.patch_area <- function (x ) new_areas(unclass(x ))
193193
194194# ' @importFrom grid unit
195- # ' @importFrom ggplot2 aes margin theme ggplot
196- # ' @importFrom utils packageVersion
195+ # ' @importFrom ggplot2 ggplot aes margin theme
196+ # ' @keywords internal
197197# ' @export
198- plot .ggalign_area <- function (x , ... ) {
199- data <- vec_data(x )
198+ ggplot .ggalign_area <- function (data , ... ) {
199+ data <- vec_data(data )
200200 data $ l <- data $ l - 0.45
201201 data $ r <- data $ r + 0.45
202202 data $ t <- data $ t - 0.45
203203 data $ b <- data $ b + 0.45
204- data $ name <- as.factor(vec_seq_along(x ))
204+ data $ name <- as.factor(vec_seq_along(data ))
205205 b_fun <- function (lim ) {
206206 if (lim [1 ] < lim [2 ]) {
207207 lim <- seq(floor(lim [1 ]), ceiling(lim [2 ]), by = 1 )
@@ -210,7 +210,7 @@ plot.ggalign_area <- function(x, ...) {
210210 }
211211 lim [- c(1 , length(lim ))]
212212 }
213- ggplot(data ) +
213+ ggplot(data , ... ) +
214214 ggplot2 :: geom_rect(
215215 aes(
216216 xmin = .data $ l , xmax = .data $ r ,
@@ -234,3 +234,6 @@ plot.ggalign_area <- function(x, ...) {
234234 plot.margin = margin(10 , 10 , 10 , 10 )
235235 )
236236}
237+
238+ # ' @export
239+ plot.ggalign_area <- function (x , ... ) plot(ggplot(data = x , ... ))
You can’t perform that action at this time.
0 commit comments