Index: tmp/org.txm.specificities.core/src/org/txm/specificities/core/chartsengine/r/RSpecificitiesBarChartCreator.java
===================================================================
--- tmp/org.txm.specificities.core/src/org/txm/specificities/core/chartsengine/r/RSpecificitiesBarChartCreator.java	(revision 2743)
+++ tmp/org.txm.specificities.core/src/org/txm/specificities/core/chartsengine/r/RSpecificitiesBarChartCreator.java	(revision 2744)
@@ -24,11 +24,12 @@
 	
 	
 	@Override
-	public File createChart(SpecificitiesSelection result, File file) {
+	public void updateChart(SpecificitiesSelection result) {
 		
 		try {
 			
 			SpecificitiesSelection specificitiesSelection = result;
+			File chart = (File) result.getChart();
 			
 			// parameters
 			boolean transpose = specificitiesSelection.isGroupingByLines();
@@ -160,15 +161,13 @@
 			}
 			
 			// Plot all
-			this.getChartsEngine().plot(file, cmd);
+			this.getChartsEngine().plot(chart, cmd);
 			
 			
 		}
 		catch (Exception e) {
 			Log.severe(SpecificitiesCoreMessages.bind(SpecificitiesCoreMessages.cantCreateSpecificitiesChartFileChartsEngineColonP0, this.getChartsEngine().getName()) + e);
 		}
-		
-		return file;
 	}
 	
 	
Index: tmp/org.txm.progression.core/src/org/txm/progression/core/chartsengine/r/RProgressionBaseChartCreator.java
===================================================================
--- tmp/org.txm.progression.core/src/org/txm/progression/core/chartsengine/r/RProgressionBaseChartCreator.java	(revision 2743)
+++ tmp/org.txm.progression.core/src/org/txm/progression/core/chartsengine/r/RProgressionBaseChartCreator.java	(revision 2744)
@@ -37,11 +37,12 @@
 	 * @param cumulative
 	 * @return
 	 */
-	public File createChart(Progression result, File file, boolean cumulative) {
+	public void updateChart(Progression result, boolean cumulative) {
 		
 		try {
 			
 			Progression progression = result;
+			File chart = (File) result.getChart();
 			
 			// boolean cumulative = result.getBooleanParameterValue(ProgressionPreferences.CHART_CUMULATIVE);
 			
@@ -134,7 +135,7 @@
 			String cmd = "progression(positions, names, colors, styles, widths, \"" + name + "\"," + progression.getXminCorpus() + "," + progression.getXmaxCorpus() + ",\"" + cumulative //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
 					+ "\",structurepositions,structurenames, \"\", " + progression.getBande() + ");\n";  //$NON-NLS-1$ //$NON-NLS-2$
 			
-			this.getChartsEngine().plot(file, cmd, result, StringEscapeUtils.escapeJava(Utils.createProgressionChartTitle(progression, cumulative)), null);
+			this.getChartsEngine().plot(chart, cmd, result, StringEscapeUtils.escapeJava(Utils.createProgressionChartTitle(progression, cumulative)), null);
 			
 			RWorkspace.getRWorkspaceInstance().eval(Progression.prefixR + Progression.norep + " <- list(positions=positions, names=names, xmin=" + progression.getXminCorpus() + ",xmax=" + progression //$NON-NLS-1$ //$NON-NLS-2$
 					.getXmaxCorpus() + ", structpositions=structurepositions, structnames=structurenames)");  //$NON-NLS-1$
@@ -144,8 +145,6 @@
 			// TODO Auto-generated catch block
 			org.txm.utils.logger.Log.printStackTrace(e);
 		}
-		
-		return file;
 	}
 	
 	
Index: tmp/org.txm.progression.core/src/org/txm/progression/core/chartsengine/r/RProgressionCumulativeChartCreator.java
===================================================================
--- tmp/org.txm.progression.core/src/org/txm/progression/core/chartsengine/r/RProgressionCumulativeChartCreator.java	(revision 2743)
+++ tmp/org.txm.progression.core/src/org/txm/progression/core/chartsengine/r/RProgressionCumulativeChartCreator.java	(revision 2744)
@@ -1,8 +1,5 @@
 package org.txm.progression.core.chartsengine.r;
 
-import java.io.File;
-
-import org.txm.chartsengine.core.results.ChartResult;
 import org.txm.progression.core.functions.Progression;
 
 // FIXME: SJ: this chart creator has been disabled in extension definition to force JFC mode for Cumulative chart and R mode for Density chart since the Density chart is not yet implemented in JFC charts engine  
@@ -16,8 +13,8 @@
 	
 	
 	@Override
-	public File createChart(Progression result, File file) {
-		return super.createChart(result, file, true);
+	public void updateChart(Progression result) {
+		super.updateChart(result, true);
 	}
 	
 }
Index: tmp/org.txm.progression.core/src/org/txm/progression/core/chartsengine/r/RProgressionDensityChartCreator.java
===================================================================
--- tmp/org.txm.progression.core/src/org/txm/progression/core/chartsengine/r/RProgressionDensityChartCreator.java	(revision 2743)
+++ tmp/org.txm.progression.core/src/org/txm/progression/core/chartsengine/r/RProgressionDensityChartCreator.java	(revision 2744)
@@ -1,7 +1,5 @@
 package org.txm.progression.core.chartsengine.r;
 
-import java.io.File;
-
 import org.txm.progression.core.functions.Progression;
 
 /**
@@ -14,8 +12,8 @@
 	
 	
 	@Override
-	public File createChart(Progression result, File file) {
-		return super.createChart(result, file, false);
+	public void updateChart(Progression result) {
+		super.updateChart(result, false);
 	}
 	
 	
Index: tmp/org.txm.chartsengine.core/src/org/txm/chartsengine/core/ChartsEnginesManager.java
===================================================================
--- tmp/org.txm.chartsengine.core/src/org/txm/chartsengine/core/ChartsEnginesManager.java	(revision 2743)
+++ tmp/org.txm.chartsengine.core/src/org/txm/chartsengine/core/ChartsEnginesManager.java	(revision 2744)
@@ -126,7 +126,7 @@
 	public void setCurrentEngine(ChartsEngine engine) {
 		super.setCurrentEngine(engine);
 		
-		this.sortEngines();
+		// this.sortEngines();
 		// ChartsEngine.chartsEngines.
 		
 		// String[] enginesNames = this.getEnginesOrder();
Index: tmp/org.txm.chartsengine.core/src/org/txm/chartsengine/core/ChartsEngine.java
===================================================================
--- tmp/org.txm.chartsengine.core/src/org/txm/chartsengine/core/ChartsEngine.java	(revision 2743)
+++ tmp/org.txm.chartsengine.core/src/org/txm/chartsengine/core/ChartsEngine.java	(revision 2744)
@@ -312,7 +312,7 @@
 				if (chartsEngineClass.equals(chartCreator.getChartsEngineClass())) {
 					chartCreator.setFileNamePrefix(contributions[i].getAttribute("fileNamePrefix")); //$NON-NLS-1$
 					chartCreator.setChartType(contributions[i].getAttribute("chartType")); //$NON-NLS-1$
-					this.addChartCreator(chartCreator.getResultDataClass(), chartCreator); // $NON-NLS-1$
+					this.addChartCreator(chartCreator.getResultDataClass(), chartCreator);
 				}
 			}
 			catch (CoreException e) {
@@ -330,7 +330,7 @@
 	}
 	
 	/**
-	 * Creates a font from the specified encoded String in JFace format (eg.: "1|Lucida Sans Unicode|12.0|0|WINDOWS|1|-16|0|0|0|400|0|0|0|0|3|2|1|34|Lucida Sans Unicode;")
+	 * Creates a font from the specified encoded String in JFace format (e.g.: "1|Lucida Sans Unicode|12.0|0|WINDOWS|1|-16|0|0|0|400|0|0|0|0|3|2|1|34|Lucida Sans Unicode;")
 	 * 
 	 * @param encodedStr
 	 * @return the decoded font
@@ -499,7 +499,7 @@
 	 * @return
 	 */
 	public File exportChart(ChartResult result, int imageWidth, int imageHeight, String outputFormat) {
-		return exportChart(result, createTmpFile("export"), imageWidth, imageHeight, outputFormat);
+		return exportChart(result, createTmpFile("export"), imageWidth, imageHeight, outputFormat); // $NON-NLS-1$
 	}
 	
 	/**
Index: tmp/org.txm.chartsengine.core/src/org/txm/chartsengine/core/ChartCreator.java
===================================================================
--- tmp/org.txm.chartsengine.core/src/org/txm/chartsengine/core/ChartCreator.java	(revision 2743)
+++ tmp/org.txm.chartsengine.core/src/org/txm/chartsengine/core/ChartCreator.java	(revision 2744)
@@ -61,7 +61,57 @@
 	 */
 	public abstract Object createChart(R result);
 	
+	
 	/**
+	 * Creates a chart file using the current ChartCreator prefix for the file name.
+	 *
+	 * @param result
+	 * @param fileNamePrefix
+	 * @return
+	 */
+	public File createChartFile(R result, File file, int imageWidth, int imageHeight) {
+		// this.createChartFile(result, this.chartsEngine.createTmpFile(fileNamePrefix));
+		if (file == null) {
+			file = this.chartsEngine.createTmpFile(this.fileNamePrefix);
+		}
+		// this.createChart(result);
+		// this.updateChart(result);
+		this.chartsEngine.exportChart(result.getChart(), file, this.chartsEngine.getOutputFormat(), imageWidth, imageHeight);
+		// result.setChart(file);
+		
+		return file;
+	}
+	
+	// /**
+	// * Creates a chart file according to the specified result data and parameters.
+	// * @param result
+	// * @param file
+	// * @return
+	// */
+	// public File createChartFile(ChartResult result, File file) {
+	// Object chart = this.createChart(result);
+	// // FIXME: SJ: became useless?
+	// // Synchronizes the chart with the shared preferences as show title, show legend, rendering colors mode, etc.
+	// //this.updateChart(result);
+	// return this.chartsEngine.createChartFile(chart, file);
+	// }
+	//
+	// /**
+	// * Creates a chart file according to the specified result data using the specified prefix for the file name.
+	// * @param result
+	// * @param fileNamePrefix
+	// * @return
+	// */
+	// public File createChartFile(ChartResult result, String fileNamePrefix) {
+	// return this.createChartFile(result, this.chartsEngine.createTmpFile(fileNamePrefix));
+	// }
+	//
+	
+	
+	
+	
+	
+	/**
 	 * Updates an existing chart.
 	 * By default this method does nothing.
 	 * Subclasses should override this method to update a chart without recreating one.
@@ -70,6 +120,7 @@
 	 * 
 	 * @param result
 	 * @param preferencesNode
+	 * @return
 	 */
 	public void updateChart(R result) {
 		Log.severe("ChartCreator.updateChart(): not implemented. This method is intended to be overridden in subclasses."); //$NON-NLS-1$
@@ -129,4 +180,44 @@
 	public void setChartType(String chartType) {
 		this.chartType = chartType;
 	}
+	
+	
+	
+	// /**
+	// * Creates a chart file according to the specified result data and parameters.
+	// *
+	// * @param result
+	// * @param file
+	// * @return
+	// */
+	// public File createChartFile(ChartResult result, File file) {
+	// Object chart = this.createChart(result);
+	// // FIXME: SJ: became useless?
+	// // Synchronizes the chart with the shared preferences as show title, show legend, rendering colors mode, etc.
+	// this.updateChart(result);
+	// return this.chartsEngine.createChartFile(chart, file);
+	// }
+	//
+	// /**
+	// * Creates a chart file according to the specified result data using the specified prefix for the file name.
+	// *
+	// * @param result
+	// * @param fileNamePrefix
+	// * @return
+	// */
+	// public File createChartFile(ChartResult result, String fileNamePrefix) {
+	// return this.createChartFile(result, this.chartsEngine.createTmpFile(fileNamePrefix));
+	// }
+	//
+	//
+	// /**
+	// * Creates a chart file according to the specified result data.
+	// *
+	// * @param result
+	// * @return
+	// */
+	// public File createChartFile(ChartResult result) {
+	// return this.createChartFile(result, this.fileNamePrefix);
+	// }
+	//
 }
Index: tmp/org.txm.chartsengine.core/src/org/txm/chartsengine/core/results/ChartResult.java
===================================================================
--- tmp/org.txm.chartsengine.core/src/org/txm/chartsengine/core/results/ChartResult.java	(revision 2743)
+++ tmp/org.txm.chartsengine.core/src/org/txm/chartsengine/core/results/ChartResult.java	(revision 2744)
@@ -6,6 +6,7 @@
 import java.util.ArrayList;
 import java.util.HashMap;
 
+import org.eclipse.osgi.util.NLS;
 import org.txm.chartsengine.core.ChartCreator;
 import org.txm.chartsengine.core.ChartsEngine;
 import org.txm.chartsengine.core.ChartsEnginesManager;
@@ -313,7 +314,7 @@
 			// )
 			
 			) {
-				Log.finest("+++ ChartResult.renderChart(): creating chart (output format = " + this.chartsEngine.getOutputFormat() + ")..."); //$NON-NLS-1$
+				Log.finest("+++ ChartResult.renderChart(): creating chart (charts engine = " + this.chartsEngine + ", output format = " + this.chartsEngine.getOutputFormat() + ")..."); //$NON-NLS-1$
 				
 				this.chart = chartCreator.createChart(this);
 			}
@@ -347,7 +348,7 @@
 			this.chartDirty = false;
 			
 			// Debug
-			Log.finest("ChartResult.renderChart(): chart rendering done."); //$NON-NLS-1$
+			Log.finest(NLS.bind("ChartResult.renderChart(): chart rendering done ({0}).", this.chart)); //$NON-NLS-1$
 			
 			return true;
 			
Index: tmp/org.txm.partition.core/src/org/txm/partition/core/chartsengine/r/RPartitionDimensionsBarChartCreator.java
===================================================================
--- tmp/org.txm.partition.core/src/org/txm/partition/core/chartsengine/r/RPartitionDimensionsBarChartCreator.java	(revision 2743)
+++ tmp/org.txm.partition.core/src/org/txm/partition/core/chartsengine/r/RPartitionDimensionsBarChartCreator.java	(revision 2744)
@@ -21,12 +21,14 @@
 
 	
 	@Override
-	public File createChart(PartitionDimensions result, File file) {
+	public void updateChart(PartitionDimensions result) {
 
 		try {
 			
 			PartitionDimensions partitionDimensions = (PartitionDimensions) result;
+			File chart = (File) result.getChart();
 			
+			
 			// parameters
 			boolean sortPartsBySize = partitionDimensions.isSortingBySize();
 			boolean displayPartsCountInTitle = partitionDimensions.isDisplayingPartCountInTitle();
@@ -36,7 +38,7 @@
 			// Create parts names command string
 			String snames = "c("; //$NON-NLS-1$
 			for(int i = 0; i < parts.size(); i++) {
-				String name = parts.get(i).getName();
+				String name = parts.get(i).getSimpleName();
 				if(name.trim().length() == 0)
 					name = "N/A"; //$NON-NLS-1$
 				snames += "\"" + name + "\""; //$NON-NLS-1$ //$NON-NLS-2$
@@ -69,7 +71,7 @@
 			String cmd = String.format("barplot(%s, col=colors, names.arg=%s, horiz=F, las=2, ylab=\"%s\", xlab=\"%s\");\n", ssizes, snames, PartitionCoreMessages.numberOfWords, PartitionCoreMessages.part); //$NON-NLS-1$
 			
 			// plot the chart
-			this.getChartsEngine().plot(file, cmd, result, Utils.createPartitionDimensionsChartTitle(partitionDimensions), Utils.createPartitionDimensionsChartSubtitle(partitionDimensions, sortPartsBySize, displayPartsCountInTitle));
+			this.getChartsEngine().plot(chart, cmd, result, Utils.createPartitionDimensionsChartTitle(partitionDimensions), Utils.createPartitionDimensionsChartSubtitle(partitionDimensions, sortPartsBySize, displayPartsCountInTitle));
 			
 		}
 		catch(Exception e) {
@@ -77,7 +79,6 @@
 			Log.printStackTrace(e);
 		}
 
-		return file;
 	}
 
 	
Index: tmp/org.txm.partition.core/src/org/txm/partition/core/chartsengine/r/RPartitionDimensionsPieChartCreator.java
===================================================================
--- tmp/org.txm.partition.core/src/org/txm/partition/core/chartsengine/r/RPartitionDimensionsPieChartCreator.java	(revision 2743)
+++ tmp/org.txm.partition.core/src/org/txm/partition/core/chartsengine/r/RPartitionDimensionsPieChartCreator.java	(revision 2744)
@@ -21,12 +21,14 @@
 	
 	
 	@Override
-	public File createChart(PartitionDimensions result, File file) {
+	public void updateChart(PartitionDimensions result) {
 		
 		try {
 			
 			PartitionDimensions partitionDimensions = result;
+			File chart = (File) result.getChart();
 			
+			
 			// parameters
 			boolean sortPartsBySize = partitionDimensions.isSortingBySize();
 			boolean displayPartsCountInTitle = partitionDimensions.isDisplayingPartCountInTitle();
@@ -36,7 +38,7 @@
 			// Create parts names command string
 			String snames = "c("; //$NON-NLS-1$
 			for (int i = 0; i < parts.size(); i++) {
-				String name = parts.get(i).getName();
+				String name = parts.get(i).getSimpleName();
 				if (name.trim().length() == 0)
 					name = "N/A"; //$NON-NLS-1$
 				snames += "\"" + name + "\""; //$NON-NLS-1$ //$NON-NLS-2$
@@ -68,15 +70,13 @@
 			String cmd = String.format("pie(%s, col=colors, labels=%s, horiz=F, las=2, ylab=\"%s\");\n", ssizes, snames, ylab); //$NON-NLS-1$
 			
 			// plot the chart
-			this.getChartsEngine().plot(file, cmd, result, Utils.createPartitionDimensionsChartTitle(partitionDimensions), Utils.createPartitionDimensionsChartSubtitle(partitionDimensions,
+			this.getChartsEngine().plot(chart, cmd, result, Utils.createPartitionDimensionsChartTitle(partitionDimensions), Utils.createPartitionDimensionsChartSubtitle(partitionDimensions,
 					sortPartsBySize, displayPartsCountInTitle));
 			
 		}
 		catch (Exception e) {
 			Log.severe(PartitionCoreMessages.bind(PartitionCoreMessages.cantCreateDimensionsPartitionChartFileChartsEngineColonP0, RChartsEngine.DESCRIPTION) + e);
 		}
-		
-		return file;
 	}
 	
 	
Index: tmp/org.txm.partition.core/src/org/txm/partition/core/chartsengine/jfreechart/JFCPartitionDimensionsBarChartCreator.java
===================================================================
--- tmp/org.txm.partition.core/src/org/txm/partition/core/chartsengine/jfreechart/JFCPartitionDimensionsBarChartCreator.java	(revision 2743)
+++ tmp/org.txm.partition.core/src/org/txm/partition/core/chartsengine/jfreechart/JFCPartitionDimensionsBarChartCreator.java	(revision 2744)
@@ -81,7 +81,7 @@
 					series.add(i, parts.get(i).getSize());
 					
 					// Add X axis symbol
-					xAxisSymbols[i] = parts.get(i).getName();
+					xAxisSymbols[i] = parts.get(i).getSimpleName();
 				}
 			}
 			catch (CqiClientException e) {
Index: tmp/org.txm.partition.core/src/org/txm/partition/core/chartsengine/jfreechart/JFCPartitionDimensionsPieChartCreator.java
===================================================================
--- tmp/org.txm.partition.core/src/org/txm/partition/core/chartsengine/jfreechart/JFCPartitionDimensionsPieChartCreator.java	(revision 2743)
+++ tmp/org.txm.partition.core/src/org/txm/partition/core/chartsengine/jfreechart/JFCPartitionDimensionsPieChartCreator.java	(revision 2744)
@@ -68,7 +68,7 @@
 				List<Part> parts = partitionDimensions.getParts(sortPartsBySize);
 				
 				for (int i = 0; i < parts.size(); i++) {
-					dataset.setValue(parts.get(i).getName(), parts.get(i).getSize());
+					dataset.setValue(parts.get(i).getSimpleName(), parts.get(i).getSize());
 				}
 				
 				if (sortPartsBySize) {
Index: tmp/org.txm.wordcloud.core/src/org/txm/wordcloud/core/chartsengine/r/RWordCloudChartCreator.java
===================================================================
--- tmp/org.txm.wordcloud.core/src/org/txm/wordcloud/core/chartsengine/r/RWordCloudChartCreator.java	(revision 2743)
+++ tmp/org.txm.wordcloud.core/src/org/txm/wordcloud/core/chartsengine/r/RWordCloudChartCreator.java	(revision 2744)
@@ -12,10 +12,11 @@
 	
 	
 	@Override
-	public File createChart(WordCloud result, File file) {
+	public void updateChart(WordCloud result) {
 		
 		try {
 			WordCloud wordCloud = result;
+			File chart = (File) result.getChart();
 			
 			
 			// parameters
@@ -66,7 +67,7 @@
 			// System.out.println("ploting...");
 			// rw.plot(svgFile, cmd, device);
 			
-			this.chartsEngine.plot(file, cmd);
+			this.chartsEngine.plot(chart, cmd);
 			
 			
 			// System.out.println("cleaning");
@@ -81,8 +82,6 @@
 			// TODO Auto-generated catch block
 			e.printStackTrace();
 		}
-		
-		return file;
 	}
 	
 	@Override
Index: tmp/org.txm.chartsengine.rcp/src/org/txm/chartsengine/rcp/swt/ChartComposite.java
===================================================================
--- tmp/org.txm.chartsengine.rcp/src/org/txm/chartsengine/rcp/swt/ChartComposite.java	(revision 2743)
+++ tmp/org.txm.chartsengine.rcp/src/org/txm/chartsengine/rcp/swt/ChartComposite.java	(revision 2744)
@@ -82,7 +82,6 @@
 	
 	/**
 	 * Loads or reloads the chart from the chart object stored in the linked editor input.
-	 * This method is especially used for file based implementations of charts engine for reloading a file that has been externally modified.
 	 */
 	public abstract void loadChart();
 	
Index: tmp/org.txm.chartsengine.rcp/src/org/txm/chartsengine/rcp/swt/SwingChartComposite.java
===================================================================
--- tmp/org.txm.chartsengine.rcp/src/org/txm/chartsengine/rcp/swt/SwingChartComposite.java	(revision 2743)
+++ tmp/org.txm.chartsengine.rcp/src/org/txm/chartsengine/rcp/swt/SwingChartComposite.java	(revision 2744)
@@ -539,7 +539,7 @@
 			// creates components if they not exist
 			if (this.chartComponent == null) {
 				
-				// recreates the chart if not of right type
+				// recreates the chart if needed
 				if (this.chartEditor.getResult().isChartDirty()) {
 					try {
 						// this.chartEditor.getResult().clearLastRenderingParameters(); // FIXME: SJ: seems to became useless
Index: tmp/org.txm.chartsengine.rcp/src/org/txm/chartsengine/rcp/swt/AdvancedChartEditorToolBar.java
===================================================================
--- tmp/org.txm.chartsengine.rcp/src/org/txm/chartsengine/rcp/swt/AdvancedChartEditorToolBar.java	(revision 2743)
+++ tmp/org.txm.chartsengine.rcp/src/org/txm/chartsengine/rcp/swt/AdvancedChartEditorToolBar.java	(revision 2744)
@@ -243,6 +243,7 @@
 					String[] data = StringUtils.split(chartTypeCombo.getItem(chartTypeCombo.getSelectionIndex()), '/');
 					data[0] = StringUtils.trim(data[0]);
 					data[1] = StringUtils.trim(data[1]);
+					getEditorPart().getResult().setChart(null);
 					getEditorPart().getResult().setChartType(data[1]);
 					getEditorPart().getResult().setChartsEngine((ChartsEngine) Toolbox.getEngineManager(EngineType.CHARTS).getEngine(data[0]));
 					update = false;
Index: tmp/org.txm.chartsengine.rcp/src/org/txm/chartsengine/rcp/editors/ChartEditor.java
===================================================================
--- tmp/org.txm.chartsengine.rcp/src/org/txm/chartsengine/rcp/editors/ChartEditor.java	(revision 2743)
+++ tmp/org.txm.chartsengine.rcp/src/org/txm/chartsengine/rcp/editors/ChartEditor.java	(revision 2744)
@@ -17,6 +17,7 @@
 import org.eclipse.ui.contexts.IContextService;
 import org.eclipse.ui.part.MultiPageEditorPart;
 import org.txm.chartsengine.core.ChartsEngine;
+import org.txm.chartsengine.core.ChartsEnginesManager;
 import org.txm.chartsengine.core.results.ChartResult;
 import org.txm.chartsengine.rcp.SWTChartsComponentsProvider;
 import org.txm.chartsengine.rcp.messages.ChartsUIMessages;
@@ -285,8 +286,9 @@
 	public final void updateEditorFromResult(boolean update) {
 		
 		// check that the charts engine used for the result matches the SWT components provider otherwise find a suitable components provider
-		// and recreate new ChartCoomposite and ChartComponent
+		// and recreate new ChartComposite and ChartComponent
 		if (this.getResult().getChartsEngine() != this.swtChartsComponentsProvider.getChartsEngine()) {
+			// if (this.getResult().getChartsEngine() != ChartsEnginesManager.getInstance().getCurrentEngine()) {
 			
 			Log.finest("ChartEditor.updateEditorFromResult(): result charts engine  = " + this.getResult().getChartsEngine().getName() + " / Editor charts engine = " + this.swtChartsComponentsProvider //$NON-NLS-1$ //$NON-NLS-2$
 					.getChartsEngine().getName() + ".");  //$NON-NLS-1$
Index: tmp/org.txm.progression.rcp/src/org/txm/progression/rcp/editors/ProgressionEditor.java
===================================================================
--- tmp/org.txm.progression.rcp/src/org/txm/progression/rcp/editors/ProgressionEditor.java	(revision 2743)
+++ tmp/org.txm.progression.rcp/src/org/txm/progression/rcp/editors/ProgressionEditor.java	(revision 2744)
@@ -275,6 +275,10 @@
 				@Override
 				public void widgetSelected(SelectionEvent e) {
 					bandeField.setEnabled(densityButton.getSelection());
+					// to force the recreation of the chart as file
+					if (!(getResult().getChart() instanceof File)) {
+						getResult().setChart(null);
+					}
 					getResult().setChartType(Progression.DENSITY_CHART_TYPE);
 					super.widgetSelected(e);
 				}
Index: tmp/org.txm.ca.core/src/org/txm/ca/core/chartsengine/r/REigenvaluesChartCreator.java
===================================================================
--- tmp/org.txm.ca.core/src/org/txm/ca/core/chartsengine/r/REigenvaluesChartCreator.java	(revision 2743)
+++ tmp/org.txm.ca.core/src/org/txm/ca/core/chartsengine/r/REigenvaluesChartCreator.java	(revision 2744)
@@ -22,17 +22,19 @@
 public class REigenvaluesChartCreator extends RChartCreator<Eigenvalues> {
 	
 	@Override
-	public File createChart(Eigenvalues result, File file) {
+	public void updateChart(Eigenvalues result) {
 		
 		CA ca = result.getCA();
+		File chart = (File) result.getChart();
 		
+		
 		// FactoMineR R package
 		if (ca.useFactoMineR()) {
-			return this.createSingularValuesBarPlot((FactoMineRCA) ca.getCA(), file);
+			this.createSingularValuesBarPlot((FactoMineRCA) ca.getCA(), chart);
 		}
 		// CA R package
 		else {
-			return this.createSingularValuesBarPlot((org.txm.ca.core.statsengine.r.functions.CA) ca.getCA(), file);
+			this.createSingularValuesBarPlot((org.txm.ca.core.statsengine.r.functions.CA) ca.getCA(), chart);
 		}
 	}
 	
Index: tmp/org.txm.ca.core/src/org/txm/ca/core/chartsengine/r/RCAChartCreator.java
===================================================================
--- tmp/org.txm.ca.core/src/org/txm/ca/core/chartsengine/r/RCAChartCreator.java	(revision 2743)
+++ tmp/org.txm.ca.core/src/org/txm/ca/core/chartsengine/r/RCAChartCreator.java	(revision 2744)
@@ -122,16 +122,18 @@
 	
 	
 	@Override
-	public File createChart(CA ca, File file) {
+	public void updateChart(CA ca) {
 		
+		File chart = (File) ca.getChart();
+		
 		// FactoMineR R package
 		if (ca.useFactoMineR()) {
-			return this.createFactorialMapChart((FactoMineRCA) ca.getCA(), file, ca.isShowIndividuals(), ca.isShowVariables(), ca.getFirstDimension(), ca.getSecondDimension(), Utils
+			this.createFactorialMapChart((FactoMineRCA) ca.getCA(), chart, ca.isShowIndividuals(), ca.isShowVariables(), ca.getFirstDimension(), ca.getSecondDimension(), Utils
 					.createCAFactorialMapChartTitle(ca));
 		}
 		// CA R package
 		else {
-			return this.createFactorialMapChart((org.txm.ca.core.statsengine.r.functions.CA) ca.getCA(), file, ca.isShowIndividuals(), ca.isShowVariables(), ca.getFirstDimension(), ca
+			this.createFactorialMapChart((org.txm.ca.core.statsengine.r.functions.CA) ca.getCA(), chart, ca.isShowIndividuals(), ca.isShowVariables(), ca.getFirstDimension(), ca
 					.getSecondDimension());
 		}
 	}
Index: tmp/org.txm.chartsengine.jfreechart.core/src/org/txm/chartsengine/jfreechart/core/JFCChartCreator.java
===================================================================
--- tmp/org.txm.chartsengine.jfreechart.core/src/org/txm/chartsengine/jfreechart/core/JFCChartCreator.java	(revision 2743)
+++ tmp/org.txm.chartsengine.jfreechart.core/src/org/txm/chartsengine/jfreechart/core/JFCChartCreator.java	(revision 2744)
@@ -25,15 +25,6 @@
  */
 public abstract class JFCChartCreator<R extends ChartResult> extends ChartCreator<JFCChartsEngine, R> {
 	
-	// @Override
-	// public final Object createChart(ChartResult result) {
-	// if ("java".equals(this.getChartsEngine().getOutputFormat())) {
-	// return _createJFreeChart(result);
-	// }
-	// else {
-	// return createChartFile(result);
-	// }
-	// }
 	
 	@Override
 	public abstract JFreeChart createChart(R result);
Index: tmp/org.txm.ahc.core/src/org/txm/ahc/core/chartsengine/r/RAHCChartCreator.java
===================================================================
--- tmp/org.txm.ahc.core/src/org/txm/ahc/core/chartsengine/r/RAHCChartCreator.java	(revision 2743)
+++ tmp/org.txm.ahc.core/src/org/txm/ahc/core/chartsengine/r/RAHCChartCreator.java	(revision 2744)
@@ -15,9 +15,10 @@
 public class RAHCChartCreator extends RChartCreator<AHC> {
 	
 	@Override
-	public File createChart(AHC result, File file) {
+	public void updateChart(AHC result) {
 		
 		AHC ahc = result;
+		File chart = (File) result.getChart();
 		
 		String cmd = null;
 		// 2D
@@ -36,7 +37,7 @@
 			cmd = "plot.HCPC(" + ahc.getRSymbol() + ", new.plot=FALSE)";
 		}
 		
-		return this.getChartsEngine().plot(file, cmd);
+		this.getChartsEngine().plot(chart, cmd);
 	}
 	
 	
Index: tmp/org.txm.chartsengine.raster.rcp/src/org/txm/chartsengine/raster/rcp/swt/RasterComposite.java
===================================================================
--- tmp/org.txm.chartsengine.raster.rcp/src/org/txm/chartsengine/raster/rcp/swt/RasterComposite.java	(revision 2743)
+++ tmp/org.txm.chartsengine.raster.rcp/src/org/txm/chartsengine/raster/rcp/swt/RasterComposite.java	(revision 2744)
@@ -1,5 +1,6 @@
 package org.txm.chartsengine.raster.rcp.swt;
 
+import java.awt.Component;
 import java.io.File;
 import java.util.ArrayList;
 
@@ -12,6 +13,7 @@
 import org.eclipse.swt.widgets.Display;
 import org.eclipse.swt.widgets.Label;
 import org.txm.chartsengine.core.ChartsEngine;
+import org.txm.chartsengine.core.results.ChartResult;
 import org.txm.chartsengine.rcp.IChartComponent;
 import org.txm.chartsengine.rcp.editors.ChartEditor;
 import org.txm.chartsengine.rcp.editors.ChartEditorInput;
@@ -48,7 +50,7 @@
 	public RasterComposite(ChartEditor chartEditor, Composite parent, int style) {
 		super(chartEditor, parent, style);
 		
-		this.setLayout(new GridLayout(1, false));
+		// this.setLayout(new GridLayout(1, false));
 		
 		this.file = null;
 		
@@ -60,10 +62,15 @@
 		//
 		
 		this.imageLabel = new Label(this, SWT.NONE);
-		this.imageLabel.setLayoutData(new GridData(GridData.FILL, GridData.FILL, true, true));
-		this.imageLabel.setText("Nothing loaded yet.");
+		
+		// FIXME: SJ: for debugging purpose
+		this.imageLabel.setBackground(Display.getDefault().getSystemColor(SWT.COLOR_BLUE));
+		
+		// this.imageLabel = new Label(this, SWT.NONE);
+		// this.imageLabel.setLayoutData(new GridData(GridData.FILL, GridData.FILL, true, true));
+		// this.imageLabel.setText("Nothing loaded yet.");
 		// // imgLabel.setImage( image );
-		// this.imageLabel.setSize( this.imageLabel.computeSize( SWT.DEFAULT, SWT.DEFAULT ));
+		// this.imageLabel.setSize(this.imageLabel.computeSize(SWT.DEFAULT, SWT.DEFAULT));
 		// sc.setContent( this.imageLabel );
 		
 		// Label l = new Label( shell, SWT.NONE );
@@ -87,6 +94,8 @@
 		// rootPanel.add(this.getPanel());
 		// frame.add(rootPanel);
 		// frame.pack();
+		
+		parent.layout();
 	}
 	
 	
@@ -95,12 +104,7 @@
 		
 		Object chart = this.chartEditor.getChart();
 		
-		if (chart != null) {
-			// chartEditorInput.setChartComponent(chart);
-			
-			// sets and updates the local preferences node qualifier from the result data
-			// chartEditorInput.syncLocalPreferencesNode();
-			
+		if (chart == null) {
 			// FIXME: temporary solution
 			try {
 				this.chartEditor.getResult().compute();
@@ -110,16 +114,76 @@
 				e.printStackTrace();
 			}
 			
-			
 			return (IChartComponent) chart;
 		}
 		
-		
 		return null;
 	}
 	
 	
 	
+	@Override
+	public void loadChart(Object chart) {
+		
+		// need to be async (the composite needs to be realized before using its size in export)
+		Display.getDefault().asyncExec(new Runnable() {
+			
+			@Override
+			public void run() {
+				// create the chart file if not of the right type
+				if (!(chart instanceof File)) {
+					ChartResult result = chartEditor.getResult();
+					// result.setChart(null);
+					file = chartEditor.getSWTChartsComponentsProvider().getChartsEngine().getChartCreator(result).createChartFile(result, file, getParent().getSize().x, getParent().getSize().y);
+					// result.setChart(this.file);
+				}
+				else {
+					file = (File) chart;
+				}
+				
+				loadRasterFile(file);
+				
+			}
+		});
+		
+	}
+	
+	
+	
+	@Override
+	public void loadChart() {
+		
+		this.loadChart(this.chartEditor.getChart());
+		
+		// // loads the chart from the result
+		// Object chart = this.chartEditor.getChart();
+		//
+		// if (chart != null) {
+		//
+		// // creates components if they not exist
+		// if (this.chartComponent == null) {
+		//
+		// // recreates the chart if needed
+		// if (this.chartEditor.getResult().isChartDirty()) {
+		// try {
+		// // this.chartEditor.getResult().clearLastRenderingParameters(); // FIXME: SJ: seems to became useless
+		// this.chartEditor.getResult().compute();
+		// }
+		// catch (Exception e) {
+		// e.printStackTrace();
+		// }
+		// }
+		//
+		// this.createChartComponent();
+		//
+		// this.loadChart(this.chartEditor.getChart());
+		// }
+		// }
+		
+	}
+	
+	
+	
 	/**
 	 * Loads a raster image from the specified file.
 	 * 
@@ -127,7 +191,7 @@
 	 */
 	public void loadRasterFile(File file) {
 		
-		Log.info(TXMCoreMessages.bind("Loading Raster image from file: {0}...", file));
+		Log.info(TXMCoreMessages.bind("Loading raster image from file: {0}...", file));
 		
 		this.file = file;
 		if (this.image != null) {
@@ -137,44 +201,16 @@
 		ImageData imgData = new ImageData(file.getAbsolutePath());
 		this.image = new Image(Display.getCurrent(), imgData);
 		this.imageLabel.setImage(this.image);
-		// this.imageLabel.setSize(this.imageLabel.computeSize(SWT.DEFAULT, SWT.DEFAULT));
+		this.imageLabel.setSize(this.imageLabel.computeSize(SWT.DEFAULT, SWT.DEFAULT));
+		// this.imageLabel.setSize(this.imageLabel.computeSize(this.getSize().x, this.getSize().y));
 		
-		imageLabel.getParent().layout();
+		// this.imageLabel.getParent().layout();
 	}
 	
 	
 	
 	
-	
-	// @Override
-	// public void requestFocusInChartComponent() {
-	// // FIXME: to check
-	//// EventQueue.invokeLater(new Runnable () {
-	//// public void run () {
-	//// getPanel().requestFocusInWindow();
-	//// }
-	//// });
-	// }
-	
-	
 	@Override
-	public void loadChart() {
-		// this.file = (File) this.chartComponent;
-		
-		this.file = this.getChartsEngine().exportChart(this.getChartResult(), 600, 400, this.getChartsEngine().getOutputFormat());
-		
-		this.loadRasterFile(this.file);
-	}
-	
-	
-	@Override
-	public void loadChart(Object data) {
-		this.loadRasterFile((File) data);
-	}
-	
-	
-	
-	@Override
 	public void copyChartViewToClipboard() {
 		// TODO Auto-generated method stub
 		System.err.println("RasterComposite.copyChartViewToClipboard(): not implemented.");
@@ -224,5 +260,4 @@
 		
 	}
 	
-	
 }
Index: tmp/org.txm.chartsengine.r.core/src/org/txm/chartsengine/r/core/RChartCreator.java
===================================================================
--- tmp/org.txm.chartsengine.r.core/src/org/txm/chartsengine/r/core/RChartCreator.java	(revision 2743)
+++ tmp/org.txm.chartsengine.r.core/src/org/txm/chartsengine/r/core/RChartCreator.java	(revision 2744)
@@ -13,45 +13,26 @@
 /**
  * R base chart creator.
  * 
- * Currently the R chart creator can't update a chart. It is always recreated in the updateChart method
- * 
- * An empty file is created in the createChart method
- * 
  * @author sjacquot
  *
  */
 public abstract class RChartCreator<R extends ChartResult> extends ChartCreator<RChartsEngine, R> {
 	
-	/**
-	 * creates an empty file. the chart will be written after in the updateChart method
-	 */
+	
 	@Override
 	public Object createChart(R result) {
-		return this.getChartsEngine().createTmpFile(this.getFileNamePrefix()); 
-	}
-	
-	/**
-	 * Effectively writes the R chart in the given file
-	 * 
-	 * @param result
-	 * @param file the file to write. not null
-	 * @return
-	 */
-	public abstract File createChart(R result, File file);
-	
-	@Override
-	public void updateChart(R result) {
-		
-		Object chart = result.getChart();
-		
-		if (chart instanceof File) { // The RChartCreators can't update a chart -> the chart is always recreated
-			createChart(result, (File) chart);
+		// creates a new chart file if not exist
+		if (result.getChart() == null) {
+			File chart = this.getChartsEngine().createTmpFile(this.getFileNamePrefix());
+			result.setChart(chart);
+			return chart;
 		}
 		else {
-			Log.warning("Error: R chart was null in: " + result);
+			return result.getChart();
 		}
 	}
 	
+	
 	@Override
 	public ArrayList<Color> getSeriesShapesColors(Object chart) {
 		Log.severe(this.getClass() + ".getSeriesShapesColors(): Not yet implemented."); //$NON-NLS-1$
@@ -62,4 +43,32 @@
 	public Class<RChartsEngine> getChartsEngineClass() {
 		return RChartsEngine.class;
 	}
+	
+	
+	
+	
+	// @Override
+	// public Object createChart(ChartResult result) {
+	// //return this.createChartFile(result);
+	// // FIXME: SJ: tests. No need to return the chart now? it will be done in updateChart()
+	// return null;
+	// }
+	//
+	//
+	// @Override
+	// public void updateChart(ChartResult result) {
+	//
+	// Object chart = result.getChart();
+	//
+	// // creates a new chart but using the same file
+	// // FIXME: SJ to MD: this case should never happen, if it happens then a bug must fixed at another location
+	// // TODO: find the bug then just keep: this.createChartFile(result, (File)chart);
+	// if (chart instanceof File) {
+	// this.createChartFile(result, (File)chart);
+	// }
+	// // creates a new chart using a new file
+	// else {
+	// result.setChart(this.createChartFile(result));
+	// }
+	// }
 }
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 2743)
+++ tmp/org.txm.chartsengine.r.core/src/org/txm/chartsengine/r/core/RChartsEngine.java	(revision 2744)
@@ -5,7 +5,6 @@
 import java.util.ArrayList;
 
 import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.osgi.util.NLS;
 import org.txm.chartsengine.core.ChartsEngine;
 import org.txm.chartsengine.core.results.ChartResult;
 import org.txm.chartsengine.r.core.preferences.RChartsEnginePreferences;
@@ -72,37 +71,32 @@
 	
 	@Override
 	public File exportChart(ChartResult result, File file, int imageWidth, int imageHeight, String outputFormat) {
-		Object chart = result.getChart();
-		if (chart == null) {
-			Log.warning("Error: null chart");
-			return null;
-		}
-		if (!(chart instanceof File)) {
-			Log.warning("Error: RChartEngine only manage File charts: " + chart);
-			return null;
-		}
+		return this.exportChart(result.getChart(), file, outputFormat, imageWidth, imageHeight, -1, -1, -1, -1);
+	}
+	
+	
+	@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.finest(this.getClass() + ".exportChart(): Not fully implemented. Output format, Image dimensions and cropping are not implemented.");
 		
-		if (this.getOutputFormat().equals(outputFormat)) {//
-			if (file == null || file.equals(chart)) {
-				return (File) chart; // no need to redraw the chart
+		if (file.equals(chart)) {
+			return (File) chart; // no need to redraw the chart
+		}
+		else {
+			try {
+				FileCopy.copy((File) chart, file);
+				return file;
 			}
-			else {
-				try {
-					FileCopy.copy((File) chart, file);
-					return file;
-				}
-				catch (IOException e) {
-					// TODO Auto-generated catch block
-					e.printStackTrace();
-				}
+			catch (IOException e) {
+				// TODO Auto-generated catch block
+				e.printStackTrace();
 			}
+			return null;
 		}
-		else {
-			Log.warning(NLS.bind("Error: RChartEngine export format ({0}) cannot differ from the current display format ({1})", outputFormat, this.getOutputFormat()));
-		}
-		return null;
 	}
 	
+	
 	/**
 	 * Plots the specified expression using R workspace instance and current charts engine output format.
 	 * 
@@ -306,16 +300,7 @@
 	
 	
 	
-	
-	
 	@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;
Index: tmp/org.txm.chartsengine.r.core/src/org/txm/stat/engine/r/RWorkspaceRenderer.java
===================================================================
--- tmp/org.txm.chartsengine.r.core/src/org/txm/stat/engine/r/RWorkspaceRenderer.java	(revision 2743)
+++ tmp/org.txm.chartsengine.r.core/src/org/txm/stat/engine/r/RWorkspaceRenderer.java	(revision 2744)
@@ -1,6 +1,8 @@
 package org.txm.stat.engine.r;
 // Copyright © 2010-2013 ENS de Lyon.
+
 // Copyright © 2007-2010 ENS de Lyon, CNRS, INRP, University of
+
 // Lyon 2, University of Franche-Comté, University of Nice
 // Sophia Antipolis, University of Paris 3.
 // 
@@ -46,23 +48,23 @@
 
 // TODO: Auto-generated Javadoc
 /**
- * Wrap R plot methods 
+ * Wrap R plot methods
  * 
  * @author mdecorde
  */
 
 public final class RWorkspaceRenderer {
-
+	
 	/** The workspace. */
 	private static RWorkspace workspace = null;
-
-
+	
+	
 	private static RWorkspaceRenderer instance;
-
-
+	
+	
 	/** The default device. */
 	private RDevice defaultDevice = RDevice.SVG;
-
+	
 	/**
 	 * protected on purpose. See {@link #getInstance()}.
 	 *
@@ -75,8 +77,8 @@
 			throws RWorkspaceException {
 		this.workspace = workspace;
 	}
-
-
+	
+	
 	/**
 	 * Plot.
 	 *
@@ -86,9 +88,9 @@
 	 * @throws StatException the stat exception
 	 */
 	public File plot(File file, String expr) {
-		return plot(file, expr, defaultDevice );
+		return plot(file, expr, defaultDevice);
 	}
-
+	
 	/**
 	 * Plot.
 	 *
@@ -110,7 +112,7 @@
 			Log.severe(TXMCoreMessages.bind("** Error: can not write in file {0}.", file));
 		}
 		String devicename = device.getName();
-
+		
 		String name;
 		Log.info(RCoreMessages.bind(RCoreMessages.info_savingChartToFile, file.getAbsolutePath()));
 		if (OSDetector.isFamilyWindows()) {
@@ -125,30 +127,33 @@
 		else {
 			name = file.getAbsolutePath();
 		}
-
+		
 		try {
-			if (devicename.equals("devSVG"))	{
+			if (devicename.equals("devSVG")) {
 				workspace.voidEval("library(RSvgDevice);");
 			}
-
-
-
+			
+			
+			
 			// FIXME : test for window dimensions so the large plots can be entirely displayed. Need to pass width and height to RWorkspace.plot() so
 			// RChartsEngine will be able to dynamically compute the width from the number of bars in a barplot for example.
-			//REXP xp = workspace.eval("try("+devicename+"(\"" + name + "\", width=20, height=10))"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
-
+			// REXP xp = workspace.eval("try("+devicename+"(\"" + name + "\", width=20, height=10))"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
 			
-			//workspace.voidEval("par(family = \"mono\")");
-					
-			//REXP xp = workspace.eval("try("+devicename+"(\"" + name + "\"))"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
-
+			
+			// workspace.voidEval("par(family = \"mono\")");
+			
+			// REXP xp = workspace.eval("try("+devicename+"(\"" + name + "\"))"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+			
 			// FIXME: tests: Unicode and charts engine font preference
-			//REXP xp = workspace.eval("try("+devicename+"(\"" + name + "\", family = \"Lucida Sans Unicode\"))"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+			// REXP xp = workspace.eval("try("+devicename+"(\"" + name + "\", family = \"Lucida Sans Unicode\"))"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
 			Font font = ChartsEngine.createFont();
-			REXP xp = workspace.safeEval(devicename+"(\"" + name + "\", family = \"" + font.getFontName() + "\")"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
-			//REXP xp = workspace.safeEval(devicename+"(\"" + name + "\", family = \"" + font.getFamily() + "\")"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+			REXP xp = workspace.safeEval(devicename + "(\"" + name + "\", family = \"" + font.getFontName() + "\")"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+			// REXP xp = workspace.safeEval(devicename+"(\"" + name + "\", family = \"" + font.getFamily() + "\")"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+			// FIXME: SJ: later, add the width and height to use when exporting
+			// REXP xp = workspace.safeEval(devicename + "(\"" + name + "\", family = \"" + font.getFontName() + "\", width = 1024, height = 1024)"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
 			
 			
+			
 			if (xp.isString() && xp.asString() != null) { // if there's a string
 				// then we have a
 				// problem, R sent an
@@ -160,16 +165,16 @@
 				// if (w.asString()!=null) System.out.println(w.asString());
 				Log.severe(w.asString());
 			}
-
+			
 			// ok, so the device should be fine - let's plot
 			boolean state = workspace.voidEval(expr);
 			workspace.voidEval("dev.off()"); //$NON-NLS-1$
 			
-			if(!state)	{
+			if (!state) {
 				file.delete();
 				return null;
 			}
-			else	{
+			else {
 				return file;
 			}
 		}
@@ -178,7 +183,7 @@
 			return null;
 		}
 	}
-
+	
 	/**
 	 * Sets the default graphic device.
 	 *
@@ -187,7 +192,7 @@
 	public void setDefaultGraphicDevice(RDevice device) {
 		this.defaultDevice = device;
 	}
-
+	
 	/**
 	 * Sets the default graphic device.
 	 *
@@ -198,10 +203,10 @@
 		if (device != null)
 			this.defaultDevice = device;
 	}
-
-
+	
+	
 	public static RWorkspaceRenderer getInstance() throws RWorkspaceException {
-		if (instance == null) 
+		if (instance == null)
 			instance = new RWorkspaceRenderer(RWorkspace.getRWorkspaceInstance());
 		return instance;
 	}
Index: tmp/org.txm.chartsengine.svgbatik.rcp/src/org/txm/chartsengine/svgbatik/rcp/swt/SVGChartComposite.java
===================================================================
--- tmp/org.txm.chartsengine.svgbatik.rcp/src/org/txm/chartsengine/svgbatik/rcp/swt/SVGChartComposite.java	(revision 2743)
+++ tmp/org.txm.chartsengine.svgbatik.rcp/src/org/txm/chartsengine/svgbatik/rcp/swt/SVGChartComposite.java	(revision 2744)
@@ -19,6 +19,7 @@
 import org.apache.batik.transcoder.svg2svg.SVGTranscoder;
 import org.eclipse.swt.SWT;
 import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Display;
 import org.txm.chartsengine.core.ChartsEngine;
 import org.txm.chartsengine.core.results.ChartResult;
 import org.txm.chartsengine.rcp.IChartComponent;
@@ -46,7 +47,7 @@
 	
 	
 	/**
-	 * The displayed chart SVG file. Null while loadChart(chart) is not called
+	 * The displayed chart SVG file. Null while loadChart(chart) is not called.
 	 */
 	protected File file;
 	
@@ -66,28 +67,43 @@
 	@Override
 	public void loadChart(Object chart) {
 		
-		// recreates the chart if not of right type
-//		if (!(chart instanceof File)) {
-//			this.file = this.chartEditor.getSWTChartsComponentsProvider().getChartsEngine().getChartCreator(this.chartEditor.getResult()).createChartFile(this.chartEditor.getResult());
-//		}
-//		else {
-//			this.file = (File) chart;
-//		}
-//		
-//		
-//		this.loadSVGDocument(this.file);
+		// need to be async (the composite needs to be realized before using its size in export)
+		Display.getDefault().asyncExec(new Runnable() {
+			
+			@Override
+			public void run() {
+				
+				// create the chart file if not of the right type
+				if (!(chart instanceof File)) {
+					ChartResult result = chartEditor.getResult();
+					// result.setChart(null);
+					file = chartEditor.getSWTChartsComponentsProvider().getChartsEngine().getChartCreator(result).createChartFile(result, file, getSize().x, getSize().y);
+					// System.out.println("SVGChartComposite.loadChart() get size: " + chartEditor.getResultArea().getSize());
+					// result.setChart(this.file);
+				}
+				else {
+					file = (File) chart;
+				}
+				
+				
+				loadSVGDocument(file);
+				
+				// ChartsEngine engine = chartEditor.getChartsEngine();
+				// ChartResult result = chartEditor.getResult();
+				// int w = this.getSize().x;
+				// int h = this.getSize().y;
+				// if (w == 0 || h == 0) { // if the composite is not drawn (editor is opening), the chart file size is set to 600*400 by default, TODO resetView() should show-zoom the chart
+				// w = 600;
+				// h = 400;
+				// }
+				// File file = engine.exportChart(result, w, h, ChartsEngine.OUTPUT_FORMAT_SVG);
+				//
+				// this.loadSVGDocument(file);
+				
+				
+			}
+		});
 		
-		ChartsEngine engine = chartEditor.getChartsEngine();
-		ChartResult result = chartEditor.getResult();
-		int w = this.getSize().x;
-		int h = this.getSize().y;
-		if (w == 0 | h == 0) { // if the composite is not drawn (editor is opening), the chart file size is set to 600*400 by default, TODO resetView() should show-zoom the chart
-			w = 600;
-			h = 400;
-		}
-		File file = engine.exportChart(result, w, h, ChartsEngine.OUTPUT_FORMAT_SVG);
-		
-		this.loadSVGDocument(file);
 	}
 	
 	
@@ -118,12 +134,10 @@
 				
 				try {
 					Log.fine(TXMCoreMessages.bind("Loading SVG document from file: {0}...", file.getAbsolutePath()));
+					Log.finest("SVGChartComposite.loadSVGDocument(...).new Runnable() {...}.run() SVGCanvas size = " + getSVGCanvas().getSize());
 					
 					getSVGCanvas().loadSVGDocument(file.toURL().toExternalForm());
 					
-					// FIXME: SJ: temporary fix for a bug where sometimes the SVG doesn't appear in the component (e.g. create or reopen AHC multiple times to reproduce the bug)
-					// resetView();
-					
 					Log.fine(TXMCoreMessages.bind("File {0} loaded.", file.getAbsolutePath()));
 					
 				}
Index: tmp/org.txm.textsbalance.core/src/org/txm/textsbalance/core/chartsengine/r/RBalanceSpiderChartCreator.java
===================================================================
--- tmp/org.txm.textsbalance.core/src/org/txm/textsbalance/core/chartsengine/r/RBalanceSpiderChartCreator.java	(revision 2743)
+++ tmp/org.txm.textsbalance.core/src/org/txm/textsbalance/core/chartsengine/r/RBalanceSpiderChartCreator.java	(revision 2744)
@@ -14,8 +14,11 @@
 	
 	
 	@Override
-	public File createChart(TextsBalance result, File file) {
+	public void updateChart(TextsBalance result) {
 		
+		
+		File chart = (File) result.getChart();
+		
 		// try {
 		
 		
@@ -46,7 +49,7 @@
 		
 		
 		// rw.plot(file, cmd, ((RChartsEngine) this.chartsEngine).getRDevice());
-		this.chartsEngine.plot(file, cmd);
+		this.chartsEngine.plot(chart, cmd);
 		
 		// System.out.println("cleaning");
 		// rw.eval("rm(tmplabels)"); //$NON-NLS-1$
@@ -64,8 +67,6 @@
 		// // TODO Auto-generated catch block
 		// e.printStackTrace();
 		// }
-		
-		return file;
 	}
 	
 	@Override
