Index: tmp/org.txm.chartsengine.r.core/src/org/txm/chartsengine/r/core/RChartsEngine.java
===================================================================
--- tmp/org.txm.chartsengine.r.core/src/org/txm/chartsengine/r/core/RChartsEngine.java	(revision 2528)
+++ tmp/org.txm.chartsengine.r.core/src/org/txm/chartsengine/r/core/RChartsEngine.java	(revision 2529)
@@ -1,4 +1,5 @@
 package org.txm.chartsengine.r.core;
+
 import java.io.File;
 import java.util.ArrayList;
 
@@ -22,35 +23,36 @@
  *
  */
 public class RChartsEngine extends ChartsEngine {
-
-
-
+	
+	
+	
 	/**
 	 * The charts engine internal name.
 	 */
 	public final static String NAME = "r_charts_engine"; //$NON-NLS-1$
-
+	
 	/**
 	 * The charts engine description.
 	 */
 	public final static String DESCRIPTION = "R";
-
-
+	
+	
 	/**
 	 * Constants for extra output formats.
 	 */
 	// FIXME : for tests or further output formats implementations
-	//public final static String OUTPUT_FORMAT_RGRAPHICS = "rgraphics", OUTPUT_FORMAT_IPLOT = "iplots", OUTPUT_FORMAT_JAVAGD = "javagd"; //$NON-NLS-1$ //$NON-NLS-2$
-
-
+	// public final static String OUTPUT_FORMAT_RGRAPHICS = "rgraphics", OUTPUT_FORMAT_IPLOT = "iplots", OUTPUT_FORMAT_JAVAGD = "javagd"; //$NON-NLS-1$ //$NON-NLS-2$
+	
+	
 	/**
 	 * The R device to use for generating charts.
 	 */
 	protected RDevice rDevice;
-
-
+	
+	
 	/**
 	 * Creates a R charts engine implementation with the specified output format as current.
+	 * 
 	 * @param outputFormat
 	 */
 	public RChartsEngine(String outputFormat) {
@@ -58,28 +60,28 @@
 		this.directComputing = false;
 		this.setOutputFormat(outputFormat);
 	}
-
+	
 	/**
 	 * Creates a R charts engine implementation.
 	 */
 	public RChartsEngine() {
 		this(RChartsEnginePreferences.getInstance().getString(RChartsEnginePreferences.OUTPUT_FORMAT));
 	}
-
 	
+	
 	@Override
-	public File createChartFile(Object chart, File file)	{
+	public File createChartFile(Object chart, File file) {
 		return this.plot(file, (String) chart);
 	}
 	
-
+	
 	/**
 	 * Plots the specified expression using R workspace instance and current charts engine output format.
 	 * 
 	 * @param file
 	 * @param cmd
 	 */
-	public File plot(File file, String cmd)	{
+	public File plot(File file, String cmd) {
 		return this.plot(file, cmd, null, null, null);
 	}
 	
@@ -89,43 +91,46 @@
 	 * @param file
 	 * @param cmd
 	 * @param result
+	 * @param title
+	 * @param subtitle
+	 * @return
 	 */
-	public File plot(File file, String cmd, ChartResult result, String title, String subtitle)	{
+	public File plot(File file, String cmd, ChartResult result, String title, String subtitle) {
 		try {
-
+			
 			if (!cmd.endsWith(";") && !cmd.endsWith("\n")) { //$NON-NLS-1$
 				cmd += ";"; //$NON-NLS-1$
 			}
 			
 			// FIXME: margin tests
-			//cmd += "windows.options(width=100, height=10);\n"; //$NON-NLS-1$
-			//cmd += "par(mar = c(50,6,4,1) + .1);\n"; //$NON-NLS-1$
+			// cmd += "windows.options(width=100, height=10);\n"; //$NON-NLS-1$
+			// cmd += "par(mar = c(50,6,4,1) + .1);\n"; //$NON-NLS-1$
 			
 			// FIXME: outer margin to not cut of title
-			//cmd += "par(oma = c(10,2,2,2));\n"; //$NON-NLS-1$
-
+			// cmd += "par(oma = c(10,2,2,2));\n"; //$NON-NLS-1$
+			
 			// font size
-			//cmd += "par(cex.main = 3.5);\n"; //$NON-NLS-1$
-			//cex.lab=1.5, cex.axis=1.5, cex.main=1.5, cex.sub=1.5
+			// cmd += "par(cex.main = 3.5);\n"; //$NON-NLS-1$
+			// cex.lab=1.5, cex.axis=1.5, cex.main=1.5, cex.sub=1.5
 			
-			if(result != null)	{
+			if (result != null) {
 				// draw grid
-				if(result.isGridVisible())	{
+				if (result.isGridVisible()) {
 					cmd += this.getGridPlotCmd();
 				}
 				// draw title and subtitle
-				if(result.isTitleVisible())	{
-					if(title != null)	{
+				if (result.isTitleVisible()) {
+					if (title != null) {
 						cmd += this.getTitlePlotCmd(title);
 					}
-					if(subtitle != null)	{
+					if (subtitle != null) {
 						cmd += this.getSubtitlePlotCmd(subtitle);
 					}
 				}
 			}
 			file = RWorkspaceRenderer.getInstance().plot(file, cmd, this.rDevice);
 		}
-		catch(Exception e) {
+		catch (Exception e) {
 			e.printStackTrace();
 			return null;
 		}
@@ -133,114 +138,132 @@
 		return file;
 	}
 	
+	/**
+	 * Plots the specified expression using R workspace instance and current charts engine output format.
+	 * 
+	 * @param file
+	 * @param cmd
+	 * @param result
+	 * @param title
+	 * @return
+	 */
+	public File plot(File file, String cmd, ChartResult result, String title) {
+		return this.plot(file, cmd, result, title, null);
+	}
 	
+	
 	/**
 	 * Returns a string that represents the R command to draw a title.
+	 * 
 	 * @param title
 	 * @return
 	 */
-	public String getTitlePlotCmd(String title)	{
-
+	public String getTitlePlotCmd(String title) {
+		
 		// FIXME: Tests
-//		title(main = "Titre principal", sub = "Sous-titre",
-//			      xlab = "Axe des x", ylab = "Axe des y",
-//			      cex.main = 2,   font.main= 4, col.main= "red",
-//			      cex.sub = 0.75, font.sub = 3, col.sub = "green",
-//			      col.lab ="darkblue"
-//			      )
+		// title(main = "Titre principal", sub = "Sous-titre",
+		// xlab = "Axe des x", ylab = "Axe des y",
+		// cex.main = 2, font.main= 4, col.main= "red",
+		// cex.sub = 0.75, font.sub = 3, col.sub = "green",
+		// col.lab ="darkblue"
+		// )
 		
-		//return String.format("title(main = \"%s\");\n", title); //$NON-NLS-1$
+		// return String.format("title(main = \"%s\");\n", title); //$NON-NLS-1$
 		
-		// FIXME: tests for adaptive not truncated title 
+		// FIXME: tests for adaptive not truncated title
 		return String.format("title(main = paste(strwrap(\"%s\", width = 50), collapse = \"\n\"));\n", title); //$NON-NLS-1$
 		
 		
 	}
-
+	
 	/**
 	 * Returns a string that represents the R command to draw a subtitle.
+	 * 
 	 * @param subtitle
 	 * @return
 	 */
-	public String getSubtitlePlotCmd(String subtitle)	{
+	public String getSubtitlePlotCmd(String subtitle) {
 		// NOTE: SJ: sub title always drawn the string at bottom of the plot
-		//return String.format("title(sub = \"%s\");\n", subtitle); //$NON-NLS-1$
+		// return String.format("title(sub = \"%s\");\n", subtitle); //$NON-NLS-1$
 		return String.format("title(main = \"\n\n\n%s\");\n", subtitle); //$NON-NLS-1$
 	}
-
 	
+	
 	/**
 	 * Returns a string that represents the R command to draw a grid.
+	 * 
 	 * @return
 	 */
-	public String getGridPlotCmd()	{
+	public String getGridPlotCmd() {
 		return "grid (NULL,NULL, lty = \"dotted\", col = \"lightgray\");\n"; //$NON-NLS-1$
 	}
 	
 	/**
 	 * Replaces or creates the vector named "colors" in the R workspace from the current charts engine theme palette according to specified rendering mode and items count.
+	 * 
 	 * @param renderingColorMode
 	 * @param itemsCount
 	 */
-	public void setColors(int renderingColorMode, int itemsCount)	{
+	public void setColors(int renderingColorMode, int itemsCount) {
 		this.setColors(this.theme.getPaletteAsHexFor(renderingColorMode, itemsCount));
 	}
 	
 	/**
 	 * Replaces or creates the vector named "colors" in the R workspace filled with the specified hexadecimal colors palette.
+	 * 
 	 * @param hexPalette
 	 */
-	public void setColors(String[] hexPalette)	{
+	public void setColors(String[] hexPalette) {
 		try {
 			RWorkspace rw = RWorkspace.getRWorkspaceInstance();
 			rw.eval("rm(colors)"); //$NON-NLS-1$
 			rw.addVectorToWorkspace("colors", hexPalette);  //$NON-NLS-1$
 		}
-		catch(RWorkspaceException e) {
+		catch (RWorkspaceException e) {
 			e.printStackTrace();
 		}
 	}
 	
-
+	
 	@Override
-	public void setOutputFormat(String outputFormat)	{
+	public void setOutputFormat(String outputFormat) {
 		this.outputFormat = outputFormat;
-
+		
 		// FIXME : SJ: voir comment gérer cela autrement + supprimer certaines méthodes du RDevice devenues inutiles depuis qu'on stocke outputFormat ?
-		if(outputFormat.equals(ChartsEngine.OUTPUT_FORMAT_JPEG))	{
+		if (outputFormat.equals(ChartsEngine.OUTPUT_FORMAT_JPEG)) {
 			this.rDevice = RDevice.JPEG;
 		}
-		else if(outputFormat.equals(ChartsEngine.OUTPUT_FORMAT_PDF))	{
+		else if (outputFormat.equals(ChartsEngine.OUTPUT_FORMAT_PDF)) {
 			this.rDevice = RDevice.PDF;
 		}
-		else if(outputFormat.equals(ChartsEngine.OUTPUT_FORMAT_PNG))	{
+		else if (outputFormat.equals(ChartsEngine.OUTPUT_FORMAT_PNG)) {
 			this.rDevice = RDevice.PNG;
 		}
-		else if(outputFormat.equals(ChartsEngine.OUTPUT_FORMAT_PS))	{
+		else if (outputFormat.equals(ChartsEngine.OUTPUT_FORMAT_PS)) {
 			this.rDevice = RDevice.PS;
 		}
-		else if(outputFormat.equals(ChartsEngine.OUTPUT_FORMAT_SVG))	{
+		else if (outputFormat.equals(ChartsEngine.OUTPUT_FORMAT_SVG)) {
 			this.rDevice = RDevice.SVG;
 		}
 	}
-
-
 	
-
+	
+	
+	
 	@Override
 	public ArrayList<String> getSupportedOutputDisplayFormats() {
-		ArrayList<String> formats = new ArrayList<String>(1);
-
+		ArrayList<String> formats = new ArrayList<>(1);
+		
 		// FIXME: UI display output format, only SVG
-		//formats.add(outputFormatDefinitions.get(JFCChartsEngine.OUTPUT_FORMAT_SVG));
+		// formats.add(outputFormatDefinitions.get(JFCChartsEngine.OUTPUT_FORMAT_SVG));
 		
 		return formats;
 	}
-
 	
+	
 	@Override
 	public ArrayList<String> getSupportedOutputFileFormats() {
-	ArrayList<String> formats = new ArrayList<String>(5);
+		ArrayList<String> formats = new ArrayList<>(5);
 		
 		formats.add(OUTPUT_FORMAT_SVG);
 		formats.add(OUTPUT_FORMAT_PNG);
@@ -251,40 +274,40 @@
 		return formats;
 	}
 	
-
-
-
-
+	
+	
+	
+	
 	@Override
 	public File exportChart(Object chart, File file, String outputFormat, int imageWidth, int imageHeight, int drawingAreaX, int drawingAreaY, int drawingAreaWidth, int drawingAreaHeight) {
 		// FIXME: Not yet implemented
 		Log.severe(this.getClass() + ".exportChart(): Not yet implemented.");
 		return null;
 	}
-
+	
 	@Override
 	public boolean isRunning() {
 		// TODO Auto-generated method stub
 		return false;
 	}
-
-
+	
+	
 	@Override
 	public boolean start(IProgressMonitor monitor) throws Exception {
 		// TODO Auto-generated method stub
 		return false;
 	}
-
+	
 	@Override
 	public boolean stop() throws Exception {
 		// TODO Auto-generated method stub
 		return false;
 	}
-
+	
 	@Override
 	public String getName() {
 		return RChartsEngine.NAME;
 	}
-
 	
+	
 }
