[chronojump] Cairo in contact R graphs
- From: Xavier de Blas <xaviblas src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [chronojump] Cairo in contact R graphs
- Date: Fri, 8 Feb 2013 20:49:46 +0000 (UTC)
commit eed6c09bc9df93f61af2cc3290a0a415c12a56c4
Author: Xavier de Blas <xaviblas gmail com>
Date: Fri Feb 8 21:38:17 2013 +0100
Cairo in contact R graphs
src/stats/main.cs | 16 ++++++++++++----
1 files changed, 12 insertions(+), 4 deletions(-)
---
diff --git a/src/stats/main.cs b/src/stats/main.cs
index 78636b2..eb89fc0 100644
--- a/src/stats/main.cs
+++ b/src/stats/main.cs
@@ -1391,10 +1391,18 @@ public class Stat
if(gRO.Type == Constants.GraphTypeBarplot || gRO.Type == Constants.GraphTypeLines)
cexAxisString = ", cex.axis=" + Util.ConvertToPoint(gRO.XAxisFontSize);
- string rString = "png(filename = '" + fileName + "'\n" +
- " , width = " + gRO.Width + ", height = " + gRO.Height + ", units = 'px'\n" +
- " , pointsize = 12, bg = 'white', res = NA)\n";
- rString += "par(mar=c(" + gRO.MarginBottom + "," + gRO.MarginLeft + "," + gRO.MarginTop + "," + gRO.MarginRight + ")" + cexAxisString + ")\n";
+ string rString = "";
+ if(Util.IsWindows())
+ rString = "library(\"Cairo\")\n" +
+ "Cairo(" + gRO.Width + ", " + gRO.Height +
+ ", file = '" + fileName + "', type=\"png\", bg=\"white\")\n";
+ else
+ rString = "png(filename = '" + fileName + "'\n" +
+ " , width = " + gRO.Width + ", height = " + gRO.Height + ", units = 'px'\n" +
+ " , pointsize = 12, bg = 'white', res = NA)\n";
+
+ rString += "par(mar=c(" + gRO.MarginBottom + "," + gRO.MarginLeft + "," +
+ gRO.MarginTop + "," + gRO.MarginRight + ")" + cexAxisString + ")\n";
if(gRO.Type == Constants.GraphTypeBoxplot) {
if(hasTwoAxis()) {
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]