[rkward-cvs] SF.net SVN: rkward-code:[4778] trunk/rkward
m-eik at users.sf.net
m-eik at users.sf.net
Sat Mar 15 16:03:30 UTC 2014
Revision: 4778
http://sourceforge.net/p/rkward/code/4778
Author: m-eik
Date: 2014-03-15 16:03:28 +0000 (Sat, 15 Mar 2014)
Log Message:
-----------
added rudimentary support to export plots as LaTeX/TikZ -- please test
Modified Paths:
--------------
trunk/rkward/ChangeLog
trunk/rkward/rkward/plugins/x11device/export.js
trunk/rkward/rkward/plugins/x11device/export.xml
Modified: trunk/rkward/ChangeLog
===================================================================
--- trunk/rkward/ChangeLog 2014-03-06 15:12:24 UTC (rev 4777)
+++ trunk/rkward/ChangeLog 2014-03-15 16:03:28 UTC (rev 4778)
@@ -1,3 +1,4 @@
+- Add basic support to export plots using tikzDevice
- Fixed: cbind-value of <matrix> element was missing commas
- Fixed: Give a label to an unlabelled toolbar
- IN PROGESS: Allow plugins to be translated
Modified: trunk/rkward/rkward/plugins/x11device/export.js
===================================================================
--- trunk/rkward/rkward/plugins/x11device/export.js 2014-03-06 15:12:24 UTC (rev 4777)
+++ trunk/rkward/rkward/plugins/x11device/export.js 2014-03-15 16:03:28 UTC (rev 4778)
@@ -5,6 +5,8 @@
echo (' require (cairoDevice)\n');
echo (' svg <- Cairo_svg\n');
echo ('}\n');
+ } else if (getValue ("format") == "tikz") {
+ echo ('require (tikzDevice)\n');
}
}
@@ -23,7 +25,7 @@
jpegpng = ((type == "jpeg") | (type == "png"));
eps = (type == "postscript") && (getValue ("formateps"));
- // Does the filename end with .ps/.eps or .pdf or .png or .jpeg/.jpg?
+ // Does the filename end with .ps/.eps or .pdf or .png or .jpeg/.jpg or .tex?
// If not, add the appropriate extension.
if (getValue ("autoextension")) {
if (type == "jpeg") {
@@ -34,6 +36,8 @@
} else {
if (file.search (/\.e?ps$/i) < 0) file += ".ps";
}
+ } else if (type == "tikz") {
+ if (file.search (/\.tex$/i) < 0) file += ".tex";
} else {
var regexp = new RegExp ("\." + type + "$", "i");
if (file.search (regexp) < 0) file += "." + type;
Modified: trunk/rkward/rkward/plugins/x11device/export.xml
===================================================================
--- trunk/rkward/rkward/plugins/x11device/export.xml 2014-03-06 15:12:24 UTC (rev 4777)
+++ trunk/rkward/rkward/plugins/x11device/export.xml 2014-03-15 16:03:28 UTC (rev 4778)
@@ -55,12 +55,12 @@
<connect client="frame_gsoptions.enabled" governor="isGS" />
</logic>
- <dialog label="Export contents of graphics device to png/jpeg format">
+ <dialog label="Export contents of graphics device to various formats">
<tabbook>
<tab id="tab_file_and_type" label="Filename and Generic options">
<row>
<column>
- <browser type="savefile" id="file" label="File name" initial="Rplot" filter="*.ps *.eps *.pdf *.png *.jpg *.jpeg *.bmp" />
+ <browser type="savefile" id="file" label="File name" initial="Rplot" filter="*.ps *.eps *.pdf *.png *.jpg *.jpeg *.bmp *.tex" />
<checkbox id="autoextension" value="1" value_unchecked="0" checked="true" label="Automatic File extension"/>
<frame id="frame_dimensions" label="Dimensions">
<row>
@@ -82,8 +82,9 @@
<option value="svg" label="SVG" />
<option value="png" label="PNG" />
<option value="jpeg" label="JPEG" />
- <option value="gs" label="via Ghostscript" />
- </radio>
+ <option value="gs" label="via Ghostscript" />
+ <option value="tikz" label="LaTeX/TikZ" />
+ </radio>
<checkbox id="formateps" label="EPS compatible" checked="true" value="1" value_unchecked="0"/>
</column>
</row>
More information about the rkward-tracker
mailing list