]> git.donarmstrong.com Git - biopieces.git/commitdiff
added titles to plot_scores
authormartinahansen <martinahansen@74ccb610-7750-0410-82ae-013aeee3265d>
Tue, 3 May 2011 08:04:50 +0000 (08:04 +0000)
committermartinahansen <martinahansen@74ccb610-7750-0410-82ae-013aeee3265d>
Tue, 3 May 2011 08:04:50 +0000 (08:04 +0000)
git-svn-id: http://biopieces.googlecode.com/svn/trunk@1356 74ccb610-7750-0410-82ae-013aeee3265d

bp_bin/plot_scores

index 95570958c8837cae0fcb943d2050a3afc7223773..337ce0af0b853ce63f6d7c687299fee7429b50eb 100755 (executable)
@@ -30,11 +30,17 @@ require 'gnuplot'
 require 'pp'
 
 terminals = "dumb,x11,aqua,post,pdf,png,svg"
+title     = "Mean Quality Scores"
+xlabel    = "Sequence position"
+ylabel    = "Mean score"
 
 casts = []
 casts << {:long=>'no_stream', :short=>'x', :type=>'flag',   :mandatory=>false, :default=>nil,    :allowed=>nil,       :disallowed=>nil}
 casts << {:long=>'data_out',  :short=>'o', :type=>'file',   :mandatory=>false, :default=>nil,    :allowed=>nil,       :disallowed=>nil}
 casts << {:long=>'terminal',  :short=>'t', :type=>'string', :mandatory=>false, :default=>'dumb', :allowed=>terminals, :disallowed=>nil}
+casts << {:long=>'title',     :short=>'T', :type=>'string', :mandatory=>false, :default=>title,  :allowed=>nil,       :disallowed=>nil}
+casts << {:long=>'xlabel',    :short=>'X', :type=>'string', :mandatory=>false, :default=>xlabel, :allowed=>nil,       :disallowed=>nil}
+casts << {:long=>'ylabel',    :short=>'Y', :type=>'string', :mandatory=>false, :default=>ylabel, :allowed=>nil,       :disallowed=>nil}
 
 bp = Biopieces.new
 
@@ -68,9 +74,9 @@ end
 Gnuplot.open do |gp|
   Gnuplot::Plot.new(gp) do |plot|
     plot.terminal options[:terminal]
-    plot.title    "Mean Quality Scores"
-    plot.ylabel   "Mean score"
-    plot.xlabel   "Sequence position"
+    plot.title    options[:title]
+    plot.xlabel   options[:xlabel]
+    plot.ylabel   options[:ylabel]
     plot.output   options[:data_out] if options[:data_out]
     plot.xrange   "[#{x.min - 1}:#{x.max + 1}]"
     plot.yrange   "[0:40]"