Properties |
Methods |
The window where field quantities versus time are plotted.
TimePlotWindow object represents a time plot view.
The TimePlotWindow object is derived from the general Window object and inherits all of its methods and properties. All the TimePlotWindow objects are members of the Window collection that is accessible by the Windows property of the Result object.
To get the TimePlotWindow you use the GetTimePlot method of Result object. If the TimePlotWindow is already opened, GetTimePlot method returns the existing TimePlotWindow.
There is a special object TimePlotPicture containing all the settings affected to the picture presented in the TimePlotWindow. To change some setting you get a TimePlotPicture associated with the TimePlotWindow, modify its properties and put it back to the TimePlotWindow.
In addition to generic Window features the TimePlotWindow object offers the following methods and properties:
Zoom method |
Allows you to magnify and diminish the plot picture.
|
PlotSettings property
|
Returns and sets the TimePlotPicture object that contains all the picture settings. |
LegendVisible property
|
Gets and sets the visibility status of the legend window for the time plot. |
GetLegendPicture method
|
Puts the picture (bitmap) of the legend window to the clipboard. |
WindowType property
|
Returns the type of this window as QfWindowType.
|
The following example creates an TimePlotWindow, adjusts the time-axis range, adds two points (5, 0) and (-3, 70) and the displays the modulus, and X-component of the heat flux density for one point and the modulus, and Y-component for another:
Dim res as QuickField.Result
...........
' Avoid non-transient problems
If Not res.Problem.IsTimeDomain Then Exit Sub
' Get the empty plot window
Dim plot As QuickField.TimePlotWindow
Set plot = res.GetTimePlot(cont)
' Control the time plot settings
Dim parms As QuickField.TimePlotPicture
Set parms = plot.PlotSettings
With parms
.GridLines = False
.Markers = False
.Group = qfGrad
' Choose the curve family for displaying
' Set the range of time axis:
.RangeX(qfMin) = 6.5
.RangeX(qfMax) = 10
' Add two points and choose desired curves for each of them
Dim p As QuickField.TimePlotPoint
Set p = .Points.Add(QF.PointXY(5, 0))
p.curve(qfGrad) = True
p.curve(qfGradX) = True
Set p = .Points.Add(QF.PointXY(-3, 70))
p.curve(qfPotential) = True
p.curve(qfGrad) = True
p.curve(qfGradY) = True
End With
plot.PlotSettings = parms ' Apply the settings to the time plot