comparison 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
comparison
equal deleted inserted replaced
0:a8e03ffaaedc 1:7e3103db022d
6 'output_png_file', 'o', 2, 'character', 6 'output_png_file', 'o', 2, 'character',
7 'output_svg_file', 's', 2, 'character', 7 'output_svg_file', 's', 2, 'character',
8 'data_column', 'd', 2, 'integer', 8 'data_column', 'd', 2, 'integer',
9 'names_column', 'n', 2, 'integer', 9 'names_column', 'n', 2, 'integer',
10 'xlab', 'x', 2, 'character', 10 'xlab', 'x', 2, 'character',
11 'log', 'g', 2, 'logical',
11 'col', 'c', 2, 'character', 12 'col', 'c', 2, 'character',
12 'bottom_margin', 'b', 2, 'integer', 13 'bottom_margin', 'b', 2, 'integer',
13 'left_margin', 'l', 2, 'integer', 14 'left_margin', 'l', 2, 'integer',
14 'top_margin', 't', 2, 'integer', 15 'top_margin', 't', 2, 'integer',
15 'right_margin', 'r', 2, 'integer', 16 'right_margin', 'r', 2, 'integer',
38 if(!is.null(options$xlab)) xlab = options$xlab 39 if(!is.null(options$xlab)) xlab = options$xlab
39 40
40 col = "grey" 41 col = "grey"
41 if(!is.null(options$col)) col = options$col 42 if(!is.null(options$col)) col = options$col
42 43
44 log = ""
45 if(!is.null(options$log) && options$log) log = "x"
46
43 plot_barplot <- function(){ 47 plot_barplot <- function(){
44 par(las=2) 48 par(las=2)
45 par(mar=margin) 49 par(mar=margin)
46 barplot(data[, data_column], horiz = T, xlab = xlab, 50 barplot(data[, data_column], horiz = T, xlab = xlab,
47 names.arg = data[, names_column], col = col, cex.names=0.7, 51 names.arg = data[, names_column], col = col, cex.names=0.7,
48 cex.axis = 0.8) 52 cex.axis = 0.8, log = log)
49 } 53 }
50 54
51 if(!is.null(options$output_pdf_file)){ 55 if(!is.null(options$output_pdf_file)){
52 pdf(options$output_pdf_file) 56 pdf(options$output_pdf_file)
53 plot_barplot() 57 plot_barplot()