Plot2D()
Creates an x-y plot from a set of curves.
Usage
fileName = Plot2D( curves, title = "",
legend = True, legendPos = "auto",
xLabel = "X", xLog = False,
xRange = "auto", yLabel = "Y",
yLog = False, yRange = "auto",
width = 600, height = 400,
fileName = None, fileType = "png",
dirName = None )
Parameters
- curves (list)
- List of lists, each child list is a curve.
- title (string)
- Plot title.
- legend (boolean)
- If True, creates a legend for the lines in the plot.
- legendPos (string)
- Legend position in the plot. Valid values are auto, best(0), upper right (1), upper left(2), lower left(3), lower right(4), right(5), center left(6), center right(7), lower center(8), upper center(9), center (10).
- xLabel (string)
- The X-axis label.
- xLog (boolean)
- The X-axis scale Linear/Log. If True, the scale will be Log.
- xRange ((string) or (list))
- The X value range. Valid values are auto, [min,max] where min/max are float numbers.
- yLabel (string)
- The Y-axis label.
- yLog (boolean)
- The Y-axis Linear/Log. If True, the scale will be Log.
- yRange (string or list)
- The Y value range. Valid values are auto, [min,max] where min/max are float numbers.
- width (integer)
- Plot width.
- height (integer)
- Plot height.
- fileName (string)
- The name of file to be saved.
- fileType (string)
- Type of the image file to be saved.
- dirName (string)
- Directory of output file.
Return Value
- fileName (string)
- Name of the saved file.
Description
fname = Plot2D( mpCurve, width=600, height=400,
xLabel = "Pressure Drop (Pa)",
yLabel = "Mass Flux (kg/sec)" )
Where mpCurve is returned from the Curve function you had as an example in the Curve section.