From f05cc577240984e8b56ba032748756506c790581 Mon Sep 17 00:00:00 2001 From: "abel.vertesy" Date: Thu, 12 Oct 2023 13:22:25 +0200 Subject: [PATCH] ... --- CITATION.cff | 2 +- DESCRIPTION | 4 +- .../Create_the_ggExpress_Package.v0.1.R | 2 +- Development/Development.bac | 66 ++++++++++++------- R/ggExpress.R | 3 +- man/qbarplot.Rd | 5 +- man/qbarplot.df.Rd | 5 +- man/qboxplot.Rd | 6 +- man/qdensity.Rd | 5 +- man/qhistogram.Rd | 5 +- man/qpie.Rd | 5 +- man/qqSave.Rd | 5 +- man/qscatter.Rd | 6 +- man/qstripchart.Rd | 6 +- man/qvenn.Rd | 5 +- man/qviolin.Rd | 6 +- 16 files changed, 86 insertions(+), 50 deletions(-) diff --git a/CITATION.cff b/CITATION.cff index 63ab736..455fba7 100644 --- a/CITATION.cff +++ b/CITATION.cff @@ -1,6 +1,6 @@ cff-version: 1.2.0 title: vertesy/ggExpress - the fastest way to create, annotate and and save plots in R. -version: v0.7.2 +version: v0.7.3 message: >- If you use this software, please cite it using these metadata. type: software diff --git a/DESCRIPTION b/DESCRIPTION index 5d5710c..67e186b 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -1,7 +1,7 @@ Package: ggExpress Title: ggExpress is the fastest way to create, annotate and export plots in R -Version: 0.7.2 +Version: 0.7.3 Authors@R: person("Abel", "Vertesy", , "a.vertesy@imba.oeaw.ac.at", role = c("aut", "cre")) Author: Abel Vertesy [aut, cre] @@ -38,6 +38,6 @@ Imports: stats, tidyverse Encoding: UTF-8 -Packaged: 2023-09-04 18:38:27.811761 +Packaged: 2023-10-12 13:21:20.976129 Roxygen: list(markdown = TRUE) RoxygenNote: 7.2.3 diff --git a/Development/Create_the_ggExpress_Package.v0.1.R b/Development/Create_the_ggExpress_Package.v0.1.R index 5f77b3d..329ae4e 100644 --- a/Development/Create_the_ggExpress_Package.v0.1.R +++ b/Development/Create_the_ggExpress_Package.v0.1.R @@ -18,7 +18,7 @@ require('Stringendo') # Setup ------------------------ PackageName = "ggExpress" -package.version = "0.7.2" +package.version = "0.7.3" setwd("~/GitHub/Packages/") RepositoryDir = kollapse("~/GitHub/Packages/", PackageName, "/") diff --git a/Development/Development.bac b/Development/Development.bac index 2945257..1f4390a 100644 --- a/Development/Development.bac +++ b/Development/Development.bac @@ -10,13 +10,13 @@ # ____________________________________________________________________ - # _________________________________________________________________________________________________ #' @title Quick Histogram Plotting #' #' @description This function generates a histogram and saves the plot for a given vector and offers several customizations. #' @param vec A numeric vector for which the histogram is to be plotted. #' @param ext File extension for the saved plot. Either '.pdf' or '.png'. Default is '.pdf'. +#' @param also.pdf Save plot in both png and pdf formats #' @param xlab Label for the X-axis. By default, it uses the plot name. #' @param plot Logical indicating whether to display the plot. Default is TRUE. #' @param add Character defining the type of plot annotations to add. Default is 'median'. @@ -50,7 +50,8 @@ #' #' @export qhistogram <- function(vec - , ext = MarkdownHelpers::unless.specified('b.def.ext', def = 'pdf') + , also.pdf = FALSE + , ext = MarkdownHelpers::ww.set.file.extension(def = 'png') , xlab = FALSE, plot = TRUE, save = TRUE, mdlink = MarkdownHelpers::unless.specified('b.mdlink', def = FALSE) , suffix = NULL , plotname = FixPlotName(substitute(vec), suffix) @@ -102,7 +103,7 @@ qhistogram <- function(vec } file_name <- FixPlotName(file_name) - if (save) qqSave(ggobj = p, title = plotname, fname = file_name, ext = ext, w = w, h = h) + if (save) qqSave(ggobj = p, title = plotname, fname = file_name, ext = ext, w = w, h = h, also.pdf = also.pdf) if (mdlink & save) qMarkdownImageLink(file_name) if (plot) p } @@ -116,6 +117,7 @@ qhistogram <- function(vec #' @description Draw and save a density plot. #' @param vec The variable to plot. #' @param ext File extension (.pdf / .png). +#' @param also.pdf Save plot in both png and pdf formats #' @param xlab X-axis label. #' @param plot Display the plot. #' @param suffix A suffix added to the filename. NULL by default. @@ -139,7 +141,8 @@ qhistogram <- function(vec #' @examples weight <- rnorm(1000); qdensity(weight) qdensity <- function(vec - , ext = MarkdownHelpers::unless.specified('b.def.ext', def = 'pdf') + , also.pdf = FALSE + , ext = MarkdownHelpers::ww.set.file.extension(def = 'png') , xlab = FALSE, plot = TRUE , suffix = NULL , plotname = FixPlotName(substitute(vec), suffix) @@ -172,7 +175,7 @@ qdensity <- function(vec file_name <- if (!isFALSE(filename)) { filename } else { FixPlotName(plotname, suffix, "dens", flag.nameiftrue(logX), flag.nameiftrue(logY), ext) } - if (save) qqSave(ggobj = p, title = plotname, fname = file_name, ext = ext, w = w, h = h) + if (save) qqSave(ggobj = p, title = plotname, fname = file_name, ext = ext, w = w, h = h, also.pdf = also.pdf) if (mdlink & save) qMarkdownImageLink(file_name) if (plot) p } @@ -185,6 +188,7 @@ qdensity <- function(vec #' @description Draw and save a barplot. #' @param vec The variable to plot. #' @param ext File extension (.pdf / .png). +#' @param also.pdf Save plot in both png and pdf formats #' @param plot Display the plot. #' @param suffix A suffix added to the filename. NULL by default. #' @param plotname The title of the plot and the name of the file (unless specified in `filename`). @@ -216,7 +220,8 @@ qdensity <- function(vec #' qbarplot(weight3, filtercol = 1, hline = .5) qbarplot <- function(vec - , ext = MarkdownHelpers::unless.specified('b.def.ext', def = 'pdf') + , also.pdf = FALSE + , ext = MarkdownHelpers::ww.set.file.extension(def = 'png') , plot = TRUE , suffix = NULL , plotname = FixPlotName(substitute(vec), suffix) @@ -271,7 +276,7 @@ qbarplot <- function(vec file_name <- if (!isFALSE(filename)) filename else { FixPlotName(plotname, suffix, "bar", flag.nameiftrue(logY), ext) } - if (save) qqSave(ggobj = p, title = plotname, fname = file_name, ext = ext, w = w, h = h, limitsize = limitsize) + if (save) qqSave(ggobj = p, title = plotname, fname = file_name, ext = ext, w = w, h = h, limitsize = limitsize, also.pdf = also.pdf) if (mdlink & save) qMarkdownImageLink(file_name) if (plot) p } @@ -286,6 +291,7 @@ qbarplot <- function(vec #' @param fill Color (split) by along Y. #' @param color Color (split) by along Y. #' @param ext File extension (.pdf / .png). +#' @param also.pdf Save plot in both png and pdf formats #' @param plot Display the plot. #' @param suffix A suffix added to the filename. NULL by default. #' @param plotname The title of the plot and the name of the file (unless specified in `filename`). @@ -321,7 +327,8 @@ qbarplot.df <- function(df , fill = colnames(df)[3] , label = NULL , color = 1 - , ext = MarkdownHelpers::unless.specified('b.def.ext', def = 'pdf') + , also.pdf = FALSE + , ext = MarkdownHelpers::ww.set.file.extension(def = 'png') , plot = TRUE , suffix = NULL , plotname = FixPlotName(substitute(df), suffix) @@ -362,7 +369,7 @@ qbarplot.df <- function(df file_name <- if (!isFALSE(filename)) filename else { FixPlotName(plotname, suffix, "bar", flag.nameiftrue(logY), ext) } - if (save) qqSave(ggobj = p, title = plotname, fname = file_name, ext = ext, w = w, h = h, limitsize = limitsize) + if (save) qqSave(ggobj = p, title = plotname, fname = file_name, ext = ext, w = w, h = h, limitsize = limitsize, also.pdf = also.pdf) if (mdlink & save) qMarkdownImageLink(file_name) if (plot) p } @@ -374,6 +381,7 @@ qbarplot.df <- function(df #' @description Draw and save a pie chart #' @param vec The variable to plot. #' @param ext File extension (.pdf / .png). +#' @param also.pdf Save plot in both png and pdf formats #' @param plot Display the plot. #' @param save Save the plot into a file. #' @param mdlink Insert a .pdf and a .png image link in the markdown report, set by "path_of_report". @@ -404,7 +412,8 @@ qbarplot.df <- function(df qpie <- function(vec = MyVec - , ext = MarkdownHelpers::unless.specified('b.def.ext', def = 'pdf') + , also.pdf = FALSE + , ext = MarkdownHelpers::ww.set.file.extension(def = 'png') , plot = TRUE, save = TRUE, mdlink = MarkdownHelpers::unless.specified('b.mdlink', def = FALSE) , suffix = NULL , plotname = FixPlotName(substitute(vec), suffix) @@ -484,7 +493,7 @@ qpie <- function(vec = MyVec file_name <- if (!isFALSE(filename)) filename else { FixPlotName(plotname, suffix, "pie", ext) } - if (save) qqSave(ggobj = p, title = plotname, fname = file_name, ext = ext, w = w, h = h) + if (save) qqSave(ggobj = p, title = plotname, fname = file_name, ext = ext, w = w, h = h, also.pdf = also.pdf) if (mdlink & save) qMarkdownImageLink(file_name) if (plot) p @@ -499,7 +508,7 @@ qpie <- function(vec = MyVec #' @param plotname The title of the plot and the name of the file (unless specified in `filename`). #' @param filename Manually provided filename (optional). Default: parse from `plotname`, #' @param ext File extension (.pdf / .png). -#' @param also.pdf also.pdf +#' @param also.pdf Save plot in both png and pdf formats #' @param logY Make Y axis log10-scale. #' @param hline Draw a horizontal line on the plot. #' @param vline Draw a vertical line on the plot. @@ -536,8 +545,8 @@ qboxplot <- function(df_XYcol_or_list # , fill = c(NULL , 3)[1] , palette_use = c("RdBu", "Dark2", "Set2", "jco", "npg", "aaas", "lancet", "ucscgb", "uchicago")[4] , hide.legend = FALSE - , ext = MarkdownHelpers::unless.specified('b.def.ext', def = 'png') , also.pdf = TRUE + , ext = MarkdownHelpers::ww.set.file.extension(def = 'png') , logY = FALSE #, logX = FALSE , annotation_logticks_Y = logY , xlab.angle = 90 @@ -588,7 +597,7 @@ qboxplot <- function(df_XYcol_or_list #' @param plotname Name of the plot #' @param filename Manually provided filename (optional). Default: parse from `plotname`, #' @param ext File extension (.pdf / .png). -#' @param also.pdf also.pdf +#' @param also.pdf Save plot in both png and pdf formats #' @param logY Make Y axis log10-scale. #' @param hline Draw a horizontal line on the plot. #' @param vline Draw a vertical line on the plot. @@ -621,8 +630,8 @@ qviolin <- function(df_XYcol_or_list , stat.method = NULL, stat.label.y.npc = "top", stat.label.x = 0.5 , palette_use = c("RdBu", "Dark2", "Set2", "jco", "npg", "aaas", "lancet", "ucscgb", "uchicago")[4] , hide.legend = FALSE - , ext = MarkdownHelpers::unless.specified('b.def.ext', def = 'png') , also.pdf = FALSE + , ext = MarkdownHelpers::ww.set.file.extension(def = 'png') , logY = FALSE #, logX = FALSE , annotation_logticks_Y = logY , xlab.angle = 45 @@ -682,7 +691,7 @@ qviolin <- function(df_XYcol_or_list #' @param filename Manually provided filename (optional). Default: parse from `plotname`, #' @param plot Display the plot. #' @param ext File extension (.pdf / .png). -#' @param also.pdf also.pdf +#' @param also.pdf Save plot in both png and pdf formats #' @param logY Make Y axis log10-scale. #' @param hline Draw a horizontal line on the plot. #' @param vline Draw a vertical line on the plot. @@ -720,8 +729,8 @@ qstripchart <- function(df_XYcol_or_list # , fill = c(NULL , 3)[1] , palette_use = c("RdBu", "Dark2", "Set2", "jco", "npg", "aaas", "lancet", "ucscgb", "uchicago")[4] , hide.legend = FALSE - , ext = MarkdownHelpers::unless.specified('b.def.ext', def = 'png') , also.pdf = TRUE + , ext = MarkdownHelpers::ww.set.file.extension(def = 'png') , logY = FALSE #, logX = FALSE , annotation_logticks_Y = logY , xlab.angle = 90 @@ -775,7 +784,7 @@ qstripchart <- function(df_XYcol_or_list #' @param filename Manually provided filename (optional). Default: parse from `plotname`, #' @param col Color of the plot. #' @param ext File extension (.pdf / .png). -#' @param also.pdf also.pdf +#' @param also.pdf Save plot in both png and pdf formats #' @param logX Make X axis log10-scale. #' @param logY Make Y axis log10-scale. #' @param hline Draw a horizontal line on the plot, yintercept or FALSE @@ -807,8 +816,8 @@ qscatter <- function(df_XYcol , col = c(NULL , 3)[1] , palette_use = c("RdBu", "Dark2", "Set2", "jco", "npg", "aaas", "lancet", "ucscgb", "uchicago")[4] , hide.legend = FALSE - , ext = MarkdownHelpers::unless.specified('b.def.ext', def = 'png') , also.pdf = TRUE + , ext = MarkdownHelpers::ww.set.file.extension(def = 'png') , logX = FALSE, logY = FALSE , annotation_logticks_Y = logY , annotation_logticks_X = logX @@ -834,8 +843,8 @@ qscatter <- function(df_XYcol if (grid %in% c("xy", "x", "y")) p <- p + grids(axis = grid) - if (hline) p <- p + ggplot2::geom_hline(yintercept = hline) - if (vline) p <- p + ggplot2::geom_vline(xintercept = vline) + if (sum(hline)) p <- p + ggplot2::geom_hline(yintercept = hline) # sum is needed to deal with multiple lines (multiple values in if statement). + if (sum(vline)) p <- p + ggplot2::geom_vline(xintercept = vline) if (sum(abline)) p <- p + ggplot2::geom_abline(intercept = abline[1], slope = abline[2]) if (add_contour_plot) p <- p + geom_density_2d() if (correlation_r2 %in% c("pearson", "spearman") ) p <- p + stat_cor(method = correlation_r2) @@ -865,6 +874,7 @@ qscatter <- function(df_XYcol #' @description Draw and save a Venn Diagram using the `ggVennDiagram` package. #' @param list The variable to plot. #' @param ext File extension (.pdf / .png). +#' @param also.pdf Save plot in both png and pdf formats #' @param plot Display the plot. #' @param save Save the plot into a file. #' @param mdlink Insert a .pdf and a .png image link in the markdown report, set by "path_of_report". @@ -884,7 +894,8 @@ qscatter <- function(df_XYcol #' @examples LetterSets <- list("One" = LETTERS[1:7], "Two" = LETTERS[3:12]); qvenn(LetterSets) qvenn <- function(list - , ext = MarkdownHelpers::unless.specified('b.def.ext', def = 'pdf') + , also.pdf = FALSE + , ext = MarkdownHelpers::ww.set.file.extension(def = 'png') , plot = TRUE, save = TRUE, mdlink = MarkdownHelpers::unless.specified('b.mdlink', def = FALSE) , suffix = NULL , plotname = FixPlotName(substitute(list), suffix) @@ -909,7 +920,7 @@ qvenn <- function(list file_name <- if (!isFALSE(filename)) filename else { sppp(plotname, suffix, "venn", ext) } - if (save) qqSave(ggobj = p, title = plotname, fname = file_name, ext = ext, w = w, h = h) + if (save) qqSave(ggobj = p, title = plotname, fname = file_name, ext = ext, w = w, h = h, also.pdf = also.pdf) if (mdlink & save) qMarkdownImageLink(file_name) if (plot) p } @@ -931,7 +942,8 @@ qvenn <- function(list #' @param w width of the plot. #' @param h height of the plot. #' @param ext File extension (.pdf / .png). -#' @param also.pdf also.pdf +#' @param also.pdf Save plot in both png and pdf formats +#' @param bgcol Plot background color #' @param page page #' @param title title field for pdf file (saved into file metadata) #' @param fname fname @@ -945,6 +957,7 @@ qvenn <- function(list qqSave <- function(ggobj, w =4, h = w , ext = MarkdownHelpers::unless.specified('b.def.ext', def = 'png') , also.pdf = FALSE + , bgcol = 'white' , page = c(F, "A4p", "A4l", "A5p", "A5l")[1] , title = FALSE, fname = FALSE , suffix = NULL, ...) { @@ -963,6 +976,9 @@ qqSave <- function(ggobj, w =4, h = w } print(paste0(getwd(),"/", fname)) + # Set the plot background to white + ggobj <- ggobj + theme(plot.background = element_rect(fill = bgcol, color = bgcol)) + if (also.pdf) { cowplot::save_plot(plot = ggobj, filename = fname2, base_width = w, base_height = h , title = ww.ttl_field(title, creator = "ggExpress") @@ -1069,7 +1085,7 @@ qA4_grid_plot <- function(plot_list #' @importFrom MarkdownHelpers llogit qMarkdownImageLink <- function(file_name = 'myplot.pdf') { - llogit(paste0("![", file_name, "]", "(", file_name, ")", collapse = '')) + MarkdownHelpers::llogit(paste0("![", file_name, "]", "(", file_name, ")", collapse = '')) } diff --git a/R/ggExpress.R b/R/ggExpress.R index 8c7100b..1f4390a 100644 --- a/R/ggExpress.R +++ b/R/ggExpress.R @@ -10,7 +10,6 @@ # ____________________________________________________________________ - # _________________________________________________________________________________________________ #' @title Quick Histogram Plotting #' @@ -1086,7 +1085,7 @@ qA4_grid_plot <- function(plot_list #' @importFrom MarkdownHelpers llogit qMarkdownImageLink <- function(file_name = 'myplot.pdf') { - llogit(paste0("![", file_name, "]", "(", file_name, ")", collapse = '')) + MarkdownHelpers::llogit(paste0("![", file_name, "]", "(", file_name, ")", collapse = '')) } diff --git a/man/qbarplot.Rd b/man/qbarplot.Rd index db111fc..3de0000 100644 --- a/man/qbarplot.Rd +++ b/man/qbarplot.Rd @@ -6,7 +6,8 @@ \usage{ qbarplot( vec, - ext = MarkdownHelpers::unless.specified("b.def.ext", def = "pdf"), + also.pdf = FALSE, + ext = MarkdownHelpers::ww.set.file.extension(def = "png"), plot = TRUE, suffix = NULL, plotname = FixPlotName(substitute(vec), suffix), @@ -36,6 +37,8 @@ qbarplot( \arguments{ \item{vec}{The variable to plot.} +\item{also.pdf}{Save plot in both png and pdf formats} + \item{ext}{File extension (.pdf / .png).} \item{plot}{Display the plot.} diff --git a/man/qbarplot.df.Rd b/man/qbarplot.df.Rd index 4939794..6cf8ad9 100644 --- a/man/qbarplot.df.Rd +++ b/man/qbarplot.df.Rd @@ -11,7 +11,8 @@ qbarplot.df( fill = colnames(df)[3], label = NULL, color = 1, - ext = MarkdownHelpers::unless.specified("b.def.ext", def = "pdf"), + also.pdf = FALSE, + ext = MarkdownHelpers::ww.set.file.extension(def = "png"), plot = TRUE, suffix = NULL, plotname = FixPlotName(substitute(df), suffix), @@ -49,6 +50,8 @@ qbarplot.df( \item{color}{Color (split) by along Y.} +\item{also.pdf}{Save plot in both png and pdf formats} + \item{ext}{File extension (.pdf / .png).} \item{plot}{Display the plot.} diff --git a/man/qboxplot.Rd b/man/qboxplot.Rd index 9032c89..e756d66 100644 --- a/man/qboxplot.Rd +++ b/man/qboxplot.Rd @@ -17,8 +17,8 @@ qboxplot( palette_use = c("RdBu", "Dark2", "Set2", "jco", "npg", "aaas", "lancet", "ucscgb", "uchicago")[4], hide.legend = FALSE, - ext = MarkdownHelpers::unless.specified("b.def.ext", def = "png"), also.pdf = TRUE, + ext = MarkdownHelpers::ww.set.file.extension(def = "png"), logY = FALSE, annotation_logticks_Y = logY, xlab.angle = 90, @@ -56,9 +56,9 @@ qboxplot( \item{hide.legend}{hide legend} -\item{ext}{File extension (.pdf / .png).} +\item{also.pdf}{Save plot in both png and pdf formats} -\item{also.pdf}{also.pdf} +\item{ext}{File extension (.pdf / .png).} \item{logY}{Make Y axis log10-scale.} diff --git a/man/qdensity.Rd b/man/qdensity.Rd index df47c5b..d3ed776 100644 --- a/man/qdensity.Rd +++ b/man/qdensity.Rd @@ -6,7 +6,8 @@ \usage{ qdensity( vec, - ext = MarkdownHelpers::unless.specified("b.def.ext", def = "pdf"), + also.pdf = FALSE, + ext = MarkdownHelpers::ww.set.file.extension(def = "png"), xlab = FALSE, plot = TRUE, suffix = NULL, @@ -30,6 +31,8 @@ qdensity( \arguments{ \item{vec}{The variable to plot.} +\item{also.pdf}{Save plot in both png and pdf formats} + \item{ext}{File extension (.pdf / .png).} \item{xlab}{X-axis label.} diff --git a/man/qhistogram.Rd b/man/qhistogram.Rd index f9762ea..07b1a74 100644 --- a/man/qhistogram.Rd +++ b/man/qhistogram.Rd @@ -6,7 +6,8 @@ \usage{ qhistogram( vec, - ext = MarkdownHelpers::unless.specified("b.def.ext", def = "pdf"), + also.pdf = FALSE, + ext = MarkdownHelpers::ww.set.file.extension(def = "png"), xlab = FALSE, plot = TRUE, save = TRUE, @@ -36,6 +37,8 @@ qhistogram( \arguments{ \item{vec}{A numeric vector for which the histogram is to be plotted.} +\item{also.pdf}{Save plot in both png and pdf formats} + \item{ext}{File extension for the saved plot. Either '.pdf' or '.png'. Default is '.pdf'.} \item{xlab}{Label for the X-axis. By default, it uses the plot name.} diff --git a/man/qpie.Rd b/man/qpie.Rd index 6d8c13e..e4f1da7 100644 --- a/man/qpie.Rd +++ b/man/qpie.Rd @@ -6,7 +6,8 @@ \usage{ qpie( vec = MyVec, - ext = MarkdownHelpers::unless.specified("b.def.ext", def = "pdf"), + also.pdf = FALSE, + ext = MarkdownHelpers::ww.set.file.extension(def = "png"), plot = TRUE, save = TRUE, mdlink = MarkdownHelpers::unless.specified("b.mdlink", def = FALSE), @@ -36,6 +37,8 @@ qpie( \arguments{ \item{vec}{The variable to plot.} +\item{also.pdf}{Save plot in both png and pdf formats} + \item{ext}{File extension (.pdf / .png).} \item{plot}{Display the plot.} diff --git a/man/qqSave.Rd b/man/qqSave.Rd index c079821..e867b7a 100644 --- a/man/qqSave.Rd +++ b/man/qqSave.Rd @@ -10,6 +10,7 @@ qqSave( h = w, ext = MarkdownHelpers::unless.specified("b.def.ext", def = "png"), also.pdf = FALSE, + bgcol = "white", page = c(F, "A4p", "A4l", "A5p", "A5l")[1], title = FALSE, fname = FALSE, @@ -26,7 +27,9 @@ qqSave( \item{ext}{File extension (.pdf / .png).} -\item{also.pdf}{also.pdf} +\item{also.pdf}{Save plot in both png and pdf formats} + +\item{bgcol}{Plot background color} \item{page}{page} diff --git a/man/qscatter.Rd b/man/qscatter.Rd index 6d955bf..dc05e4a 100644 --- a/man/qscatter.Rd +++ b/man/qscatter.Rd @@ -13,8 +13,8 @@ qscatter( palette_use = c("RdBu", "Dark2", "Set2", "jco", "npg", "aaas", "lancet", "ucscgb", "uchicago")[4], hide.legend = FALSE, - ext = MarkdownHelpers::unless.specified("b.def.ext", def = "png"), also.pdf = TRUE, + ext = MarkdownHelpers::ww.set.file.extension(def = "png"), logX = FALSE, logY = FALSE, annotation_logticks_Y = logY, @@ -49,9 +49,9 @@ qscatter( \item{hide.legend}{hide legend} -\item{ext}{File extension (.pdf / .png).} +\item{also.pdf}{Save plot in both png and pdf formats} -\item{also.pdf}{also.pdf} +\item{ext}{File extension (.pdf / .png).} \item{logX}{Make X axis log10-scale.} diff --git a/man/qstripchart.Rd b/man/qstripchart.Rd index 58a12d4..4277ab9 100644 --- a/man/qstripchart.Rd +++ b/man/qstripchart.Rd @@ -18,8 +18,8 @@ qstripchart( palette_use = c("RdBu", "Dark2", "Set2", "jco", "npg", "aaas", "lancet", "ucscgb", "uchicago")[4], hide.legend = FALSE, - ext = MarkdownHelpers::unless.specified("b.def.ext", def = "png"), also.pdf = TRUE, + ext = MarkdownHelpers::ww.set.file.extension(def = "png"), logY = FALSE, annotation_logticks_Y = logY, xlab.angle = 90, @@ -59,9 +59,9 @@ qstripchart( \item{hide.legend}{hide legend} -\item{ext}{File extension (.pdf / .png).} +\item{also.pdf}{Save plot in both png and pdf formats} -\item{also.pdf}{also.pdf} +\item{ext}{File extension (.pdf / .png).} \item{logY}{Make Y axis log10-scale.} diff --git a/man/qvenn.Rd b/man/qvenn.Rd index b9c928c..be3479a 100644 --- a/man/qvenn.Rd +++ b/man/qvenn.Rd @@ -6,7 +6,8 @@ \usage{ qvenn( list, - ext = MarkdownHelpers::unless.specified("b.def.ext", def = "pdf"), + also.pdf = FALSE, + ext = MarkdownHelpers::ww.set.file.extension(def = "png"), plot = TRUE, save = TRUE, mdlink = MarkdownHelpers::unless.specified("b.mdlink", def = FALSE), @@ -25,6 +26,8 @@ qvenn( \arguments{ \item{list}{The variable to plot.} +\item{also.pdf}{Save plot in both png and pdf formats} + \item{ext}{File extension (.pdf / .png).} \item{plot}{Display the plot.} diff --git a/man/qviolin.Rd b/man/qviolin.Rd index 308cfc1..bdedf00 100644 --- a/man/qviolin.Rd +++ b/man/qviolin.Rd @@ -16,8 +16,8 @@ qviolin( palette_use = c("RdBu", "Dark2", "Set2", "jco", "npg", "aaas", "lancet", "ucscgb", "uchicago")[4], hide.legend = FALSE, - ext = MarkdownHelpers::unless.specified("b.def.ext", def = "png"), also.pdf = FALSE, + ext = MarkdownHelpers::ww.set.file.extension(def = "png"), logY = FALSE, annotation_logticks_Y = logY, xlab.angle = 45, @@ -53,9 +53,9 @@ qviolin( \item{hide.legend}{hide legend} -\item{ext}{File extension (.pdf / .png).} +\item{also.pdf}{Save plot in both png and pdf formats} -\item{also.pdf}{also.pdf} +\item{ext}{File extension (.pdf / .png).} \item{logY}{Make Y axis log10-scale.}