diff plot_barplot.R @ 1:7e3103db022d draft default tip

planemo upload for repository https://github.com/asaim/galaxytools/tree/master/tools/plot_barplot commit 5653f2982dc5aeccd7701970fdfea444e3e53e3c-dirty
author bebatut
date Wed, 18 May 2016 12:26:19 -0400
parents a8e03ffaaedc
children
line wrap: on
line diff
--- a/plot_barplot.R	Mon Apr 18 10:35:54 2016 -0400
+++ b/plot_barplot.R	Wed May 18 12:26:19 2016 -0400
@@ -8,6 +8,7 @@
   'data_column', 'd', 2, 'integer',
   'names_column', 'n', 2, 'integer',
   'xlab', 'x', 2, 'character',
+  'log', 'g', 2, 'logical',
   'col', 'c', 2, 'character',
   'bottom_margin', 'b', 2, 'integer',
   'left_margin', 'l', 2, 'integer',
@@ -40,12 +41,15 @@
 col = "grey"
 if(!is.null(options$col)) col = options$col
 
+log = ""
+if(!is.null(options$log) && options$log) log = "x"
+
 plot_barplot <- function(){
     par(las=2)
     par(mar=margin)
     barplot(data[, data_column], horiz = T, xlab = xlab, 
         names.arg = data[, names_column], col = col, cex.names=0.7, 
-        cex.axis = 0.8)
+        cex.axis = 0.8, log = log)
 }
 
 if(!is.null(options$output_pdf_file)){