Curve()

Creates a curve with the styles provided.

Usage

curve = Curve( x, y,
                        name = None, lineType = "solid",
                        lineWidth = 1, symbol = None,
                        symbolSize= 1, color = "blue" )

Parameters

x (array)
The value of the X data of the curve.
y (array)
The value of the Y data of the curve.
name (string)
The curve's name.
lineType (string)
The curve's line types. Valid values are solid(-), dashed(--), dash-dot(-.) and dotted(:).
lineWidth (integer)
The curve's line width.
symbol (string)
The curve's symbol. Valid values are points(.), pixels(,), circle(o), triangleUp(^), triangleDown(v), triangleLeft(<), triangleRight(>), square(s), plus(+), cross(x), diamond(D), thinDiamond(d), tripodDown(1), tripodUp(2), tripodLeft(3), tripodRight(4), hexagon(h), rotatedHexagon(H), pentagon(p), verticalLine( | ) and horizontalLine( _ ).
symbolSize (integer)
The curve's symbol size.
color (string)
The curve's color string. Valid values are blue(b), green(g), red(r), cyan(c), magenta(m), yellow(y), black(k) and white(w).

Return Value

curve (dictionary)
The created curve information.

Description

This routine creates a curve with the styles provided. The curve x and y data are given by x and y. The curve name, line type, line width, symbol, symbol size and color are given by name, lineType, lineWidth, symbol, symbolSize and color, respectively. For example,
nOsiVars = adb.get( "nOsiVars" )
presId = -1
massId = -1
for i in range( nOsiVars ):
   name = adb.get( "osiVarName", i )
   if name == "pressure": presId = i
   if name == "mass_flux": massId = i
nOsfs = adb.get( "nOsfs" )
inletId = -1
for i in range(nOsfs):
   name = adb.get( "osfName", i )
   if name == "inflow": inletId = i
pres = adb.get( "osiValues", inletId, presId )
mass = adb.get( "osiValues", inletId, massId )
mpCurve = Curve ( pres, mass, name = "Mass Flux",
                  color = "Red" )