Skip to content

Commit

Permalink
remove panel.fun.rd
Browse files Browse the repository at this point in the history
  • Loading branch information
jokergoo committed Jun 19, 2017
1 parent d0ce2fc commit f910c32
Show file tree
Hide file tree
Showing 4 changed files with 23 additions and 51 deletions.
2 changes: 1 addition & 1 deletion NAMESPACE
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ export('circos.nested')
export('circos.par')
export('circos.points')
export('circos.polygon')
export('circos.raster')
export('circos.rect')
export('circos.segments')
export('circos.text')
Expand All @@ -49,7 +50,6 @@ export('get.current.sector.index')
export('get.current.track.index')
export('highlight.chromosome')
export('highlight.sector')
export('panel.fun')
export('posTransform.default')
export('posTransform.text')
export('print.CELL_META')
Expand Down
2 changes: 1 addition & 1 deletion R/raster.R
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
# facing = "inside", niceFacing = TRUE)
# })
# circos.clear()

#
# \dontrun{
# # NOTE: following takes quite a long time to run
# load(system.file("extdata", "doodle.RData", package = "circlize"))
Expand Down
31 changes: 21 additions & 10 deletions man/circos.raster.rd
Original file line number Diff line number Diff line change
Expand Up @@ -12,20 +12,20 @@ circos.raster(image, x, y, width, height,
"downward", "bending.inside", "bending.outside"),
niceFacing = FALSE, sector.index = get.cell.meta.data("sector.index"),
track.index = get.cell.meta.data("track.index"),
scaling = ifelse(grepl("bend", facing), 0.5, 1))
scaling = 1)
}
\arguments{

\item{image}{a \code{raster} object, or an object that can be converted by \code{\link[grDevices]{as.raster}}}
\item{x}{position of the center of the raster image, measued in the data coordinate in the cell}
\item{y}{position of the center of the raster image, measued in the data coordinate in the cell}
\item{width}{width of the raster image. When \code{facing} is one of "inside", "outside", "clockwise" and "reverse.clockwise", the image should have absolute size where the value of \code{width} should be specified as \code{20mm}, \code{1cm} or \code{0.5inche}. When \code{facing} is one of \code{bending.inside} and \code{bending.outside}, the value of \code{width} is measured in the data coordinate in the cell.}
\item{height}{height of the raster image. Same format as \code{width}. If the value of \code{height} is omit, default height is calculated by taking the aspect ratio of the original image.}
\item{width}{width of the raster image. When \code{facing} is one of "inside", "outside", "clockwise" and "reverse.clockwise", the image should have absolute size where the value of \code{width} should be specified like \code{20mm}, \code{1cm} or \code{0.5inche}. When \code{facing} is one of \code{bending.inside} and \code{bending.outside}, the value of \code{width} is measured in the data coordinate in the cell.}
\item{height}{height of the raster image. Same format as \code{width}. If the value of \code{height} is omit, default height is calculated by taking the aspect ratio of the original image. But when \code{facing} is one of \code{bending.inside} and \code{bending.outside}, \code{height} is mandatory to set.}
\item{facing}{facing of the raster image}
\item{niceFacing}{facing of text. Please refer to vignette for different settings}
\item{sector.index}{index for the sector}
\item{track.index}{index for the track}
\item{scaling}{scaling factor to resize the raster image. The size measured in pixel is calculated according to the size in the final plot. The size can be adjusted by multiplying \code{scaling}.}
\item{scaling}{scaling factor to resize the raster image.}

}
\author{
Expand All @@ -37,15 +37,26 @@ image = system.file("extdata", "Rlogo.png", package = "circlize")
image = as.raster(readPNG(image))
circos.initialize(letters[1:8], xlim = c(0, 1))
circos.track(ylim = c(0, 1), panel.fun = function(x, y) {
circos.raster(image, CELL_META$xcenter, CELL_META$ycenter, width = "2cm",
facing = "inside", niceFacing = TRUE)
circos.raster(image, CELL_META$xcenter, CELL_META$ycenter, width = "2cm",
facing = "inside", niceFacing = TRUE)
})
circos.clear()

\dontrun{
circos.initialize(letters[1:8], xlim = c(0, 1))
# NOTE: following takes quite a long time to run
load(system.file("extdata", "doodle.RData", package = "circlize"))
circos.par("cell.padding" = c(0, 0, 0, 0))
circos.initialize(letters[1:16], xlim = c(0, 1))
circos.track(ylim = c(0, 1), panel.fun = function(x, y) {
circos.raster(image, CELL_META$xcenter, CELL_META$ycenter, width = 1,
height = 1, facing = "bending.inside")
})
img = img_list[[CELL_META$sector.numeric.index]]
circos.raster(img, CELL_META$xcenter, CELL_META$ycenter, width = 1,
height = 1, facing = "bending.inside")
}, track.height = 0.25, bg.border = NA)
circos.track(ylim = c(0, 1), panel.fun = function(x, y) {
img = img_list[[CELL_META$sector.numeric.index + 16]]
circos.raster(img, CELL_META$xcenter, CELL_META$ycenter, width = 1,
height = 1, facing = "bending.inside")
}, track.height = 0.25, bg.border = NA)
circos.clear()
}
}
39 changes: 0 additions & 39 deletions man/panel.fun.rd

This file was deleted.

0 comments on commit f910c32

Please sign in to comment.