Révision 1741
| tmp/org.txm.chartsengine.r.core/src/org/txm/chartsengine/r/core/RChartsEngine.java (revision 1741) | ||
|---|---|---|
| 76 | 76 |
|
| 77 | 77 |
/** |
| 78 | 78 |
* Plots the specified expression using R workspace instance and current charts engine output format. |
| 79 |
* |
|
| 79 | 80 |
* @param file |
| 80 | 81 |
* @param cmd |
| 81 | 82 |
*/ |
| ... | ... | |
| 85 | 86 |
|
| 86 | 87 |
/** |
| 87 | 88 |
* Plots the specified expression using R workspace instance and current charts engine output format. |
| 89 |
* |
|
| 88 | 90 |
* @param file |
| 89 | 91 |
* @param cmd |
| 90 | 92 |
* @param result |
| ... | ... | |
| 96 | 98 |
if(result.isGridVisible()) {
|
| 97 | 99 |
cmd += this.getGridPlotCmd(); |
| 98 | 100 |
} |
| 99 |
// draw title |
|
| 101 |
// draw title and subtitle
|
|
| 100 | 102 |
if(result.isTitleVisible()) {
|
| 101 |
cmd += this.getTitlePlotCmd(title); |
|
| 102 |
cmd += this.getSubtitlePlotCmd(subtitle); |
|
| 103 |
if(title != null) {
|
|
| 104 |
cmd += this.getTitlePlotCmd(title); |
|
| 105 |
} |
|
| 106 |
if(subtitle != null) {
|
|
| 107 |
cmd += this.getSubtitlePlotCmd(subtitle); |
|
| 108 |
} |
|
| 103 | 109 |
} |
| 104 | 110 |
} |
| 105 | 111 |
RWorkspaceRenderer.getInstance().plot(file, cmd, this.rDevice); |
| ... | ... | |
| 134 | 140 |
// col.lab ="darkblue" |
| 135 | 141 |
// ) |
| 136 | 142 |
|
| 137 |
return "title(main = \"" + title + "\");\n"; //$NON-NLS-1$
|
|
| 143 |
return String.format("title(main = \"%s\");\n", title); //$NON-NLS-1$
|
|
| 138 | 144 |
} |
| 139 | 145 |
|
| 140 | 146 |
/** |
| 141 | 147 |
* Returns a string that represents the R command to draw a subtitle. |
| 142 |
* @param title |
|
| 148 |
* @param subtitle
|
|
| 143 | 149 |
* @return |
| 144 | 150 |
*/ |
| 145 |
public String getSubtitlePlotCmd(String title) {
|
|
| 146 |
return "title(sub = \"" + title + "\");\n"; //$NON-NLS-1$
|
|
| 151 |
public String getSubtitlePlotCmd(String subtitle) {
|
|
| 152 |
return String.format("title(sub = \"%s\");\n", subtitle); //$NON-NLS-1$
|
|
| 147 | 153 |
} |
| 148 | 154 |
|
| 149 | 155 |
|
| tmp/org.txm.progression.core/src/org/txm/progression/core/chartsengine/r/RProgressionBaseChartCreator.java (revision 1741) | ||
|---|---|---|
| 139 | 139 |
// System.out.println("BANDE="+bande);
|
| 140 | 140 |
|
| 141 | 141 |
String cmd = "progression(positions, names, colors, styles, widths, \"" + name + "\"," + progression.getXminCorpus() + "," + progression.getXmaxCorpus() + ",\"" + cumulative + "\",structurepositions,structurenames, \"" + title + "\", " + progression.getBande() + ");\n"; //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$ //$NON-NLS-5$ //$NON-NLS-6$ //$NON-NLS-7$ |
| 142 |
|
|
| 143 |
// FIXME: the grid must be plotted behind the chart and it is not possible with the current R progression object code |
|
| 144 |
// Grid |
|
| 145 |
if(result.getBooleanParameterValue(ChartsEnginePreferences.SHOW_GRID)) {
|
|
| 146 |
cmd += this.getChartsEngine().getGridPlotCmd(); |
|
| 147 |
} |
|
| 148 | 142 |
|
| 149 | 143 |
this.getChartsEngine().plot(file, cmd); |
| 150 | 144 |
|
| tmp/org.txm.partition.core/src/org/txm/partition/core/chartsengine/r/RPartitionDimensionsPieChartCreator.java (revision 1741) | ||
|---|---|---|
| 65 | 65 |
String ylab = PartitionCoreMessages.numberOfWords; |
| 66 | 66 |
|
| 67 | 67 |
String cmd = "pie(" + ssizes + ", col=colors, labels=" + snames + //$NON-NLS-1$ //$NON-NLS-2$
|
| 68 |
", horiz=F, las=2, ylab=\"" + ylab + "\")"; //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ |
|
| 68 |
", horiz=F, las=2, ylab=\"" + ylab + "\");\n"; //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
|
|
| 69 | 69 |
|
| 70 | 70 |
// plot the chart |
| 71 | 71 |
this.getChartsEngine().plot(file, cmd, result, Utils.createPartitionDimensionsChartTitle(partitionDimensions), Utils.createPartitionDimensionsChartSubtitle(partitionDimensions, sortPartsBySize, displayPartsCountInTitle)); |
Formats disponibles : Unified diff