Mercurial > repos > saskia-hiltemann > testrepo
comparison xy_plot.xml @ 7:afb09b6aee95 draft
Uploaded
author | saskia-hiltemann |
---|---|
date | Fri, 30 Oct 2015 06:09:30 -0400 |
parents | f259b7f33591 |
children | c3cd8bf8f3b5 |
comparison
equal
deleted
inserted
replaced
6:8a6e2b2776d2 | 7:afb09b6aee95 |
---|---|
1 <tool id="XY_Plot_1_multiformat" name="Plotting tool 2" version="1.0.1"> | 1 <tool id="XY_Plot_1_multiformat" name="Plotting tool" version="1.0.1"> |
2 <description>for multiple series and graph types</description> | 2 <description>for multiple series and graph types and multiple output types</description> |
3 <requirements> | 3 <requirements> |
4 <requirement type="package" version="3.1.2">R</requirement> | 4 <requirement type="package" version="3.1.2">R</requirement> |
5 <requirement type="package" version="2.11.1">fontconfig</requirement> | 5 <requirement type="package" version="2.11.1">fontconfig</requirement> |
6 </requirements> | 6 </requirements> |
7 <command interpreter="bash">r_wrapper.sh $script_file</command> | 7 <command interpreter="bash">r_wrapper.sh $script_file</command> |
8 | 8 |
9 <inputs> | 9 <inputs> |
10 <param name="main" type="text" value="" label="Plot Title"/> | 10 <param name="main" type="text" value="" label="Plot Title"/> |
11 <param name="xlab" type="text" value="" label="Label for x axis"/> | 11 <param name="xlab" type="text" value="" label="Label for x axis"/> |
12 <param name="ylab" type="text" value="" label="Label for y axis"/> | 12 <param name="ylab" type="text" value="" label="Label for y axis"/> |
13 <param name="ftype" type="select" label="File Type"> | |
14 <option value="pdf">PDF</option> | |
15 <option value="png">PNG</option> | |
16 <option value="jpeg">JPEG</option> | |
17 <option value="bmp">BMP</option> | |
18 <option value="tiff">TIFF</option> | |
19 </param> | |
13 <repeat name="series" title="Series"> | 20 <repeat name="series" title="Series"> |
14 <param name="input" type="data" format="tabular" label="Dataset"/> | 21 <param name="input" type="data" format="tabular" label="Dataset"/> |
15 <param name="xcol" type="data_column" data_ref="input" label="Column for x axis"/> | 22 <param name="xcol" type="data_column" data_ref="input" label="Column for x axis"/> |
16 <param name="ycol" type="data_column" data_ref="input" label="Column for y axis"/> | 23 <param name="ycol" type="data_column" data_ref="input" label="Column for y axis"/> |
17 <conditional name="series_type"> | 24 <conditional name="series_type"> |
77 y${i} = s${i}[,${s.ycol}] | 84 y${i} = s${i}[,${s.ycol}] |
78 xrange = range( x${i}, xrange ) | 85 xrange = range( x${i}, xrange ) |
79 yrange = range( y${i}, yrange ) | 86 yrange = range( y${i}, yrange ) |
80 #end for | 87 #end for |
81 ## Open output PDF file | 88 ## Open output PDF file |
82 png( "${out_file1}" , type="cairo") | 89 #if $ftype.value == "pdf" |
90 pdf("outfile.pdf") | |
91 #else | |
92 "${ftype}"( "outfile.${ftype}" , type="cairo") | |
93 #end if | |
83 ## Dummy plot for axis / labels | 94 ## Dummy plot for axis / labels |
84 plot( NULL, type="n", xlim=xrange, ylim=yrange, main="${main}", xlab="${xlab}", ylab="${ylab}" ) | 95 plot( NULL, type="n", xlim=xrange, ylim=yrange, main="${main}", xlab="${xlab}", ylab="${ylab}" ) |
85 ## Plot each series | 96 ## Plot each series |
86 #for $i, $s in enumerate( $series ) | 97 #for $i, $s in enumerate( $series ) |
87 #if $s.series_type['type'] == "line" | 98 #if $s.series_type['type'] == "line" |
94 devname = dev.off() | 105 devname = dev.off() |
95 </configfile> | 106 </configfile> |
96 </configfiles> | 107 </configfiles> |
97 | 108 |
98 <outputs> | 109 <outputs> |
99 <data format="png" name="out_file1" /> | 110 <data format="pdf" name="out_file1" from_work_dir="outfile.pdf" > |
111 <filter>(ftype == 'pdf') </filter> | |
112 </data> | |
113 <data format="png" name="out_file2" from_work_dir="outfile.png"> | |
114 <filter>(ftype == 'png') </filter> | |
115 </data> | |
116 <data format="jpg" name="out_file3" from_work_dir="outfile.jpeg"> | |
117 <filter>(ftype == 'jpeg') </filter> | |
118 </data> | |
119 <data format="bmp" name="out_file4" from_work_dir="outfile.bmp"> | |
120 <filter>(ftype == 'bmp') </filter> | |
121 </data> | |
122 <data format="tiff" name="out_file5" from_work_dir="outfile.tiff"> | |
123 <filter>(ftype == 'tiff') </filter> | |
124 </data> | |
100 </outputs> | 125 </outputs> |
101 | 126 |
102 <tests> | 127 <tests> |
103 <test> | 128 <test> |
104 <param name="main" value="Example XY Plot"/> | 129 <param name="main" value="Example XY Plot PDF"/> |
105 <param name="xlab" value="Column 1"/> | 130 <param name="xlab" value="Column 1"/> |
106 <param name="ylab" value="Column 2"/> | 131 <param name="ylab" value="Column 2"/> |
107 <param name="input" value="2.tabular" ftype="tabular"/> | 132 <param name="ftype" value="pdf"/> |
108 <param name="xcol" value="1"/> | 133 <param name="input" value="2.tabular" ftype="tabular"/> |
109 <param name="ycol" value="2"/> | 134 <param name="xcol" value="1"/> |
110 <param name="type" value="line"/> | 135 <param name="ycol" value="2"/> |
111 <param name="lty" value="2"/> | 136 <param name="type" value="line"/> |
112 <param name="col" value="2"/> | 137 <param name="lty" value="2"/> |
113 <param name="lwd" value="1.0"/> | 138 <param name="col" value="2"/> |
114 <output name="out_file1" file="XY_Plot_1_out.pdf"/> | 139 <param name="lwd" value="1.0"/> |
140 <output name="out_file1" file="XY_Plot_1_multi_out.pdf" md5="83f82e036bdd7fcd51f29e3b7a05c19b"/> | |
141 </test> | |
142 <test> | |
143 <param name="main" value="Example XY Plot PNG"/> | |
144 <param name="xlab" value="Column 1"/> | |
145 <param name="ylab" value="Column 2"/> | |
146 <param name="ftype" value="png"/> | |
147 <param name="input" value="2.tabular" ftype="tabular"/> | |
148 <param name="xcol" value="1"/> | |
149 <param name="ycol" value="2"/> | |
150 <param name="type" value="line"/> | |
151 <param name="lty" value="2"/> | |
152 <param name="col" value="2"/> | |
153 <param name="lwd" value="1.0"/> | |
154 <output name="out_file2" file="XY_Plot_1_multi_out.png" md5="777f98fc9a29c3a02ce4da2fa61437c9"/> | |
155 </test> | |
156 <test> | |
157 <param name="main" value="Example XY Plot JPEG"/> | |
158 <param name="xlab" value="Column 1"/> | |
159 <param name="ylab" value="Column 2"/> | |
160 <param name="ftype" value="jpeg"/> | |
161 <param name="input" value="2.tabular" ftype="tabular"/> | |
162 <param name="xcol" value="1"/> | |
163 <param name="ycol" value="2"/> | |
164 <param name="type" value="line"/> | |
165 <param name="lty" value="2"/> | |
166 <param name="col" value="2"/> | |
167 <param name="lwd" value="1.0"/> | |
168 <output name="out_file3" file="XY_Plot_1_multi_out.jpeg" md5="609f009b8cd92c0662cb39d6e2eb8cc7"/> | |
169 </test> | |
170 <test> | |
171 <param name="main" value="Example XY Plot BMP"/> | |
172 <param name="xlab" value="Column 1"/> | |
173 <param name="ylab" value="Column 2"/> | |
174 <param name="ftype" value="bmp"/> | |
175 <param name="input" value="2.tabular" ftype="tabular"/> | |
176 <param name="xcol" value="1"/> | |
177 <param name="ycol" value="2"/> | |
178 <param name="type" value="line"/> | |
179 <param name="lty" value="2"/> | |
180 <param name="col" value="2"/> | |
181 <param name="lwd" value="1.0"/> | |
182 <output name="out_file4" file="XY_Plot_1_multi_out.bmp" md5="a036aa3d0bbc0ff58664077cb5c8e04a"/> | |
183 </test> | |
184 <test> | |
185 <param name="main" value="Example XY Plot TIFF"/> | |
186 <param name="xlab" value="Column 1"/> | |
187 <param name="ylab" value="Column 2"/> | |
188 <param name="ftype" value="tiff"/> | |
189 <param name="input" value="2.tabular" ftype="tabular"/> | |
190 <param name="xcol" value="1"/> | |
191 <param name="ycol" value="2"/> | |
192 <param name="type" value="line"/> | |
193 <param name="lty" value="2"/> | |
194 <param name="col" value="2"/> | |
195 <param name="lwd" value="1.0"/> | |
196 <output name="out_file5" file="XY_Plot_1_multi_out.tiff" md5="e6ba5639144b23480c556e2185bb5d9a"/> | |
115 </test> | 197 </test> |
116 </tests> | 198 </tests> |
117 <help> | 199 <help> |
118 .. class:: infomark | 200 .. class:: infomark |
119 | 201 |