* @param parent
* The parent component of the file dialog.
*/
private void savePlotToFile(Component parent) {
try {
ChartPanel chartPanel = analysisTypeMap.get(analysisType)
.getObsAndMeanChartPane().getChartPanel();
if (imageSaveDialog.showDialog(parent)) {
File path = imageSaveDialog.getSelectedFile();
JFreeChart chart = chartPanel.getChart();
int width = chartPanel.getWidth();
int height = chartPanel.getHeight();
ChartUtilities.saveChartAsPNG(path, chart, width, height);
}
} catch (IOException ex) {
MessageBox.showErrorDialog(parent,