Index: /MGET/Branches/Jason/PythonPackage/src/GeoEco/__init__.py
===================================================================
--- /MGET/Branches/Jason/PythonPackage/src/GeoEco/__init__.py (revision 938)
+++ /MGET/Branches/Jason/PythonPackage/src/GeoEco/__init__.py (revision 947)
@@ -1,1 +1,1 @@
-__version__ = u'0.8a37'
+__version__ = u'0.8a38'
Index: /MGET/Branches/Jason/PythonPackage/src/GeoEco/Statistics/Exploratory.py
===================================================================
--- /MGET/Branches/Jason/PythonPackage/src/GeoEco/Statistics/Exploratory.py (revision 844)
+++ /MGET/Branches/Jason/PythonPackage/src/GeoEco/Statistics/Exploratory.py (revision 947)
@@ -45,4 +45,12 @@
             Logger.RaiseException(ValueError(_(u'The output file %(f)s has an invalid extension. It must have the extension .png or .emf.') % {u'f': outputFile}))
 
+        # If the caller requested emf format for the plot file,
+        # convert the width and height from thousands of an inch to
+        # inches.
+
+        if outputFile is not None and outputFile.lower().endswith(u'.emf'):
+            width = width / 1000
+            height = height / 1000
+
         # Load the data frame into a temporary data frame.
         
@@ -73,5 +81,5 @@
             else:
                 tempDir = TemporaryDirectory()
-                tempOutputFile = os.path.join(tempDir.Path, u'plot.png')
+                tempOutputFile = os.path.join(tempDir.Path, u'plot' + os.path.splitext(outputFile)[1])
                 Logger.Info(_(u'Writing plot to %(file)s...') % {u'file': outputFile})
                 r('ScatterplotMatrixToFile("%s", %s, transforms=%s, .diag="%s", lower="%s", upper="%s", res=%f, width=%f, height=%f, pointsize=%f, bg="%s")' % (tempOutputFile.replace(u'\\', u'/'), dataFrameName, transformsName, str(diagonal), str(lower), str(upper), res, width, height, pointSize, bg))
@@ -93,4 +101,12 @@
         if outputFile is not None and not outputFile.lower().endswith('.png') and not outputFile.lower().endswith('.emf'):
             Logger.RaiseException(ValueError(_(u'The output file %(f)s has an invalid extension. It must have the extension .png or .emf.') % {u'f': outputFile}))
+
+        # If the caller requested emf format for the plot file,
+        # convert the width and height from thousands of an inch to
+        # inches.
+
+        if outputFile is not None and outputFile.lower().endswith(u'.emf'):
+            width = width / 1000
+            height = height / 1000
 
         # Load the data frame into a temporary variable.
@@ -133,5 +149,5 @@
             else:
                 tempDir = TemporaryDirectory()
-                tempOutputFile = os.path.join(tempDir.Path, u'plot.png')
+                tempOutputFile = os.path.join(tempDir.Path, u'plot' + os.path.splitext(outputFile)[1])
                 Logger.Info(_(u'Writing density plot to %(file)s...') % {u'file': outputFile})
                 r('DensityHistogramToFile("%s", %s, densityField="%s", transform=%s, categoryField=%s, .legend=%s, res=%f, width=%f, height=%f, pointsize=%f, bg="%s")' % (tempOutputFile.replace(u'\\', u'/'), dataFrameName, densityField, transform, categoryField, legend, res, width, height, pointSize, bg))
@@ -152,4 +168,12 @@
         if outputFile is not None and not outputFile.lower().endswith('.png') and not outputFile.lower().endswith('.emf'):
             Logger.RaiseException(ValueError(_(u'The output file %(f)s has an invalid extension. It must have the extension .png or .emf.') % {u'f': outputFile}))
+
+        # If the caller requested emf format for the plot file,
+        # convert the width and height from thousands of an inch to
+        # inches.
+
+        if outputFile is not None and outputFile.lower().endswith(u'.emf'):
+            width = width / 1000
+            height = height / 1000
 
         # Load the data frame into a temporary variable.
@@ -215,5 +239,5 @@
             else:
                 tempDir = TemporaryDirectory()
-                tempOutputFile = os.path.join(tempDir.Path, u'plot.png')
+                tempOutputFile = os.path.join(tempDir.Path, u'plot' + os.path.splitext(outputFile)[1])
                 Logger.Info(_(u'Writing density plot to %(file)s...') % {u'file': outputFile})
                 r('DensityHistogramToFile("%s", %s, densityField="%s", transform=%s, categoryField=%s, .legend=%s, res=%f, width=%f, height=%f, pointsize=%f, bg="%s")' % (tempOutputFile.replace(u'\\', u'/'), dataFrameName, coordinateName, transform, categoryField, legend, res, width, height, pointSize, bg))
@@ -230,4 +254,12 @@
                                     outputFile=None, res=1000., width=3000., height=3000., pointSize=10.0, bg=u'white', overwriteExisting=False):
         cls.__doc__.Obj.ValidateMethodInvocation()
+
+        # If the caller requested emf format for the plot file,
+        # convert the width and height from thousands of an inch to
+        # inches.
+
+        if outputFile is not None and outputFile.lower().endswith(u'.emf'):
+            width = width / 1000
+            height = height / 1000
 
         # Load the data frame into a temporary data frame.
@@ -510,6 +542,6 @@
     typeMetadata=FloatTypeMetadata(mustBeGreaterThan=0.),
     description=_(
-u"""Width of the output plot file in inches (for EMF format) or pixels
-(for PNG format)."""),
+u"""Plot file width in thousandths of inches (for EMF format; e.g. the
+value 3000 is 3 inches) or pixels (for PNG format)."""),
     arcGISDisplayName=_(u'Plot width'),
     arcGISCategory=_(u'Output file options'))
@@ -518,6 +550,6 @@
     typeMetadata=FloatTypeMetadata(mustBeGreaterThan=0.),
     description=_(
-u"""Height of the output plot file in inches (for EMF format) or
-pixels (for PNG format)."""),
+u"""Plot file height in thousandths of inches (for EMF format; e.g. the
+value 3000 is 3 inches) or pixels (for PNG format)."""),
     arcGISDisplayName=_(u'Plot height'),
     arcGISCategory=_(u'Output file options'))
Index: /MGET/Branches/Jason/PythonPackage/src/GeoEco/Statistics/Modeling.py
===================================================================
--- /MGET/Branches/Jason/PythonPackage/src/GeoEco/Statistics/Modeling.py (revision 830)
+++ /MGET/Branches/Jason/PythonPackage/src/GeoEco/Statistics/Modeling.py (revision 947)
@@ -49,4 +49,12 @@
         cls.__doc__.Obj.ValidateMethodInvocation()
 
+        # If the caller requested emf format for the plot files,
+        # convert the width and height from thousands of an inch to
+        # inches.
+
+        if plotFileFormat == u'emf':
+            width = width / 1000
+            height = height / 1000
+
         # Load the table into a temporary data frame.
 
@@ -92,15 +100,15 @@
                 File.MoveSilent(os.path.join(tempDir.Path, u'output_summary.txt'), outputFilePrefix + u'_summary.txt', overwriteExisting=overwriteExisting)
 
-            if writeDiagnosticPlots and os.path.isfile(os.path.join(tempDir.Path, u'output_resid_fit.png')):
-                File.MoveSilent(os.path.join(tempDir.Path, u'output_resid_fit.png'), outputFilePrefix + u'_resid_fit.png', overwriteExisting=overwriteExisting)
-                File.MoveSilent(os.path.join(tempDir.Path, u'output_qq.png'), outputFilePrefix + u'_qq.png', overwriteExisting=overwriteExisting)
-                File.MoveSilent(os.path.join(tempDir.Path, u'output_scale_loc.png'), outputFilePrefix + u'_scale_loc.png', overwriteExisting=overwriteExisting)
-                File.MoveSilent(os.path.join(tempDir.Path, u'output_cooks.png'), outputFilePrefix + u'_cooks.png', overwriteExisting=overwriteExisting)
-                File.MoveSilent(os.path.join(tempDir.Path, u'output_resid_lev.png'), outputFilePrefix + u'_resid_lev.png', overwriteExisting=overwriteExisting)
-                File.MoveSilent(os.path.join(tempDir.Path, u'output_cooks_lev.png'), outputFilePrefix + u'_cooks_lev.png', overwriteExisting=overwriteExisting)
+            if writeDiagnosticPlots and os.path.isfile(os.path.join(tempDir.Path, u'output_resid_fit.%s' % plotFileFormat)):
+                File.MoveSilent(os.path.join(tempDir.Path, u'output_resid_fit.%s' % plotFileFormat), outputFilePrefix + u'_resid_fit.%s' % plotFileFormat, overwriteExisting=overwriteExisting)
+                File.MoveSilent(os.path.join(tempDir.Path, u'output_qq.%s' % plotFileFormat), outputFilePrefix + u'_qq.%s' % plotFileFormat, overwriteExisting=overwriteExisting)
+                File.MoveSilent(os.path.join(tempDir.Path, u'output_scale_loc.%s' % plotFileFormat), outputFilePrefix + u'_scale_loc.%s' % plotFileFormat, overwriteExisting=overwriteExisting)
+                File.MoveSilent(os.path.join(tempDir.Path, u'output_cooks.%s' % plotFileFormat), outputFilePrefix + u'_cooks.%s' % plotFileFormat, overwriteExisting=overwriteExisting)
+                File.MoveSilent(os.path.join(tempDir.Path, u'output_resid_lev.%s' % plotFileFormat), outputFilePrefix + u'_resid_lev.%s' % plotFileFormat, overwriteExisting=overwriteExisting)
+                File.MoveSilent(os.path.join(tempDir.Path, u'output_cooks_lev.%s' % plotFileFormat), outputFilePrefix + u'_cooks_lev.%s' % plotFileFormat, overwriteExisting=overwriteExisting)
 
             if writeTermPlots and numTermPlots > 0:
                 for i in range(int(numTermPlots)):
-                    File.MoveSilent(os.path.join(tempDir.Path, u'output_term%02i.png' % (i+1)), outputFilePrefix + (u'_term%02i.png' % (i+1)), overwriteExisting=overwriteExisting)
+                    File.MoveSilent(os.path.join(tempDir.Path, u'output_term%02i.%s' % (i+1, plotFileFormat)), outputFilePrefix + (u'_term%02i.%s' % (i+1, plotFileFormat)), overwriteExisting=overwriteExisting)
 
         # Delete the data frame.
@@ -139,4 +147,12 @@
                 Logger.RaiseException(ValueError(_(u'The "negbin" (negative binomial) model family was specifed but the theta parameter was omitted. You must specify a value for the theta parameter when using the negbin model family.')))
 
+        # If the caller requested emf format for the plot files,
+        # convert the width and height from thousands of an inch to
+        # inches.
+
+        if plotFileFormat == u'emf':
+            width = width / 1000
+            height = height / 1000
+
         # Load the R package.
 
@@ -199,10 +215,10 @@
                 File.MoveSilent(os.path.join(tempDir.Path, u'output_summary.txt'), outputFilePrefix + u'_summary.txt', overwriteExisting=overwriteExisting)
 
-            if writeDiagnosticPlots and os.path.isfile(os.path.join(tempDir.Path, u'output_diag.png')):
-                File.MoveSilent(os.path.join(tempDir.Path, u'output_diag.png'), outputFilePrefix + u'_diag.png', overwriteExisting=overwriteExisting)
+            if writeDiagnosticPlots and os.path.isfile(os.path.join(tempDir.Path, u'output_diag.%s' % plotFileFormat)):
+                File.MoveSilent(os.path.join(tempDir.Path, u'output_diag.%s' % plotFileFormat), outputFilePrefix + u'_diag.%s' % plotFileFormat, overwriteExisting=overwriteExisting)
 
             if writeTermPlots and numTermPlots > 0:
                 for i in range(int(numTermPlots)):
-                    File.MoveSilent(os.path.join(tempDir.Path, u'output_term%02i.png' % (i+1)), outputFilePrefix + (u'_term%02i.png' % (i+1)), overwriteExisting=overwriteExisting)
+                    File.MoveSilent(os.path.join(tempDir.Path, u'output_term%02i.%s' % (i+1, plotFileFormat)), outputFilePrefix + (u'_term%02i.%s' % (i+1, plotFileFormat)), overwriteExisting=overwriteExisting)
 
         # Delete the data frame.
@@ -334,4 +350,12 @@
             Logger.RaiseException(ValueError(_(u'The Pruning Method is \'User specified\' but no Complexity Parameter for Pruning was provided. Please provide a complexity parameter for pruning or select a different Pruning Method.')))
 
+        # If the caller requested emf format for the plot files,
+        # convert the width and height from thousands of an inch to
+        # inches.
+
+        if plotFileFormat == u'emf':
+            width = width / 1000
+            height = height / 1000
+
         # Load the table into a temporary data frame.
 
@@ -429,4 +453,12 @@
         if correlationStructure is not None and range_ is None and nugget is not None:
             Logger.RaiseException(ValueError(_('If the Nugget parameter is specified, the Range parameter must also be specified.')))
+
+        # If the caller requested emf format for the plot files,
+        # convert the width and height from thousands of an inch to
+        # inches.
+
+        if plotFileFormat == u'emf':
+            width = width / 1000
+            height = height / 1000
 
         # Load the table into a temporary data frame.
@@ -522,4 +554,12 @@
         cls.__doc__.Obj.ValidateMethodInvocation()
 
+        # If the caller requested emf format for the plot file,
+        # convert the width and height from thousands of an inch to
+        # inches.
+
+        if outputPlotFile is not None and outputPlotFile.lower().endswith(u'.emf'):
+            width = width / 1000
+            height = height / 1000
+
         # Load the fitted model.
 
@@ -583,5 +623,5 @@
             else:
                 tempDir = TemporaryDirectory()
-                tempOutputFile = os.path.join(tempDir.Path, u'plot.png')
+                tempOutputFile = os.path.join(tempDir.Path, u'plot' + os.path.splitext(outputPlotFile)[1])
                 Logger.Info(_(u'Writing plot to %(file)s...') % {u'file': outputPlotFile})
                 summaryStatValues = r('PerfPlotForBinaryModelToFile("%s", predictedValues=%s, actualValues=%s, measure1="%s", measure2="%s", summaryStats=summaryStats, .title=%s, res=%f, width=%f, height=%f, pointsize=%f, bg="%s")' % (tempOutputFile.replace('\\', '\\\\'), predictedValues, actualValues, measure1, measure2, title, res, width, height, pointSize, bg))
@@ -623,4 +663,12 @@
             Logger.RaiseException(ValueError(_(u'When you provide the value "Specified" for the Cutoff parameter, you must also provide a value for the Cutoff Value parameter.')))
 
+        # If the caller requested emf format for the plot file,
+        # convert the width and height from thousands of an inch to
+        # inches.
+
+        if outputPlotFile is not None and outputPlotFile.lower().endswith(u'.emf'):
+            width = width / 1000
+            height = height / 1000
+
         # Load the fitted model.
 
@@ -687,5 +735,5 @@
             else:
                 tempDir = TemporaryDirectory()
-                tempOutputFile = os.path.join(tempDir.Path, u'plot.png')
+                tempOutputFile = os.path.join(tempDir.Path, u'plot' + os.path.splitext(outputPlotFile)[1])
                 Logger.Info(_(u'Writing plot to %(file)s...') % {u'file': outputPlotFile})
                 outputCutoff, tp, fp, fn, tn, auc, mxe, prbe, rmse = r('ROCPlotForBinaryModelToFile("%s", predictedValues=%s, actualValues=%s, cutoff="%s", cutoffValue=%f, colorize=%s, .title=%s, summaryFile=%s, res=%f, width=%f, height=%f, pointsize=%f, bg="%s")' % (tempOutputFile.replace('\\', '\\\\'), predictedValues, actualValues, cutoff, cutoffValue, str(colorize).upper(), title, outputSummaryFile, res, width, height, pointSize, bg))
@@ -2070,6 +2118,6 @@
     typeMetadata=FloatTypeMetadata(mustBeGreaterThan=0.),
     description=_(
-u"""Plot file width in inches (for EMF format) or pixels (for PNG
-format)."""),
+u"""Plot file width in thousandths of inches (for EMF format; e.g. the
+value 3000 is 3 inches) or pixels (for PNG format)."""),
     arcGISDisplayName=_(u'Plot width'),
     arcGISCategory=_(u'Additional output options'))
@@ -2078,6 +2126,6 @@
     typeMetadata=FloatTypeMetadata(mustBeGreaterThan=0.),
     description=_(
-u"""Plot file width in inches (for EMF format) or pixels (for PNG
-format)."""),
+u"""Plot file height in thousandths of inches (for EMF format; e.g. the
+value 3000 is 3 inches) or pixels (for PNG format)."""),
     arcGISDisplayName=_(u'Plot height'),
     arcGISCategory=_(u'Additional output options'))
@@ -4080,6 +4128,6 @@
     typeMetadata=FloatTypeMetadata(mustBeGreaterThan=0.),
     description=_(
-u"""Plot file width in inches (for EMF format) or pixels (for PNG
-format)."""),
+u"""Plot file width in thousandths of inches (for EMF format; e.g. the
+value 3000 is 3 inches) or pixels (for PNG format)."""),
     arcGISDisplayName=_(u'Plot width'),
     arcGISCategory=_(u'Output file options'))
@@ -4088,6 +4136,6 @@
     typeMetadata=FloatTypeMetadata(mustBeGreaterThan=0.),
     description=_(
-u"""Plot file width in inches (for EMF format) or pixels (for PNG
-format)."""),
+u"""Plot file height in thousandths of inches (for EMF format; e.g. the
+value 3000 is 3 inches) or pixels (for PNG format)."""),
     arcGISDisplayName=_(u'Plot height'),
     arcGISCategory=_(u'Output file options'))
Index: /MGET/Branches/Jason/PythonPackage/src/GeoEco/Statistics/FitGLMForDataframe.r
===================================================================
--- /MGET/Branches/Jason/PythonPackage/src/GeoEco/Statistics/FitGLMForDataframe.r (revision 841)
+++ /MGET/Branches/Jason/PythonPackage/src/GeoEco/Statistics/FitGLMForDataframe.r (revision 947)
@@ -91,5 +91,5 @@
         if (writeDiagnosticPlots && hasTerms)
         {
-            fileSuffixes <- c("_resid_fit.png", "_qq.png", "_scale_loc.png", "_cooks.png", "_resid_lev.png", "_cooks_lev.png")
+            fileSuffixes <- c("_resid_fit", "_qq", "_scale_loc", "_cooks", "_resid_lev", "_cooks_lev")
             for (i in 1:6)
             {
