Skip to content

Commit

Permalink
Enhancement for Issue #260 (#261)
Browse files Browse the repository at this point in the history
* Enhancement for Issue #260

feat: added 'legend.title' parameter (takes a string) for `circosPlot()`. Allows for control over legend title

* Enhancement for Issue #260

docs: updated documentatation with `legend.title` parameter
  • Loading branch information
Max-Bladen authored Nov 14, 2022
1 parent b79fe51 commit 580b82e
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 2 deletions.
2 changes: 1 addition & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
Expand Up @@ -63,5 +63,5 @@ biocViews: ImmunoOncology,
MultipleComparison,
Classification,
Regression
RoxygenNote: 7.1.2
RoxygenNote: 7.2.2
Encoding: UTF-8
4 changes: 3 additions & 1 deletion R/circosPlot.R
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@
#' @param size.variables size of the variable labels
#' @param size.labels size of the block labels
#' @param legend Logical. Whether the legend should be added. Default is TRUE.
#' @param legend.title String. Name of the legend. Defaults to "Expression".
#' @param linkWidth Numeric. Specifies the range of sizes used for lines linking
#' the correlated variables (see details). Must be of length 2 or 1. Default to c(1). See details.
#' @param ... For object of class \code{block.splsda}, advanced plot parameters:
Expand Down Expand Up @@ -98,6 +99,7 @@ circosPlot <- function(object, ...) UseMethod('circosPlot')
size.variables = 0.25,
size.labels = 1,
legend = TRUE,
legend.title = "Expression",
linkWidth = 1,
...)
{
Expand Down Expand Up @@ -403,7 +405,7 @@ circosPlot <- function(object, ...) UseMethod('circosPlot')
col = color.cor, pch = 19, cex=size.legend, bty = "n")
# Second legend bottom righ corner
if(line==TRUE)
legend(x=figSize-(circleR/3), y = (circleR/3), title="Expression",
legend(x=figSize-(circleR/3), y = (circleR/3), title=legend.title,
legend=levels(Y), ## changed PAM50 to Y
col = lineCols, pch = 19, cex=size.legend, bty = "n",ncol=ncol.legend)
# third legend top left corner
Expand Down
3 changes: 3 additions & 0 deletions man/circosPlot.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 580b82e

Please sign in to comment.