📄 surface & contour.frm
字号:
VERSION 5.00
Object = "{8996B0A4-D7BE-101B-8650-00AA003A5593}#4.0#0"; "CFX4032.OCX"
Begin VB.Form Form1
Caption = "Chart FX. Surface and Contour plots"
ClientHeight = 6330
ClientLeft = 2415
ClientTop = 1635
ClientWidth = 7470
LinkTopic = "Form1"
ScaleHeight = 6330
ScaleWidth = 7470
Begin VB.CommandButton Command2
Caption = "Contour plot"
Height = 375
Left = 2160
TabIndex = 2
Top = 5880
Width = 1815
End
Begin VB.CommandButton Command1
Caption = "Surface plot"
Height = 375
Left = 120
TabIndex = 1
Top = 5880
Width = 1815
End
Begin ChartfxLibCtl.ChartFX ChartFX1
Height = 5655
Left = 0
TabIndex = 0
Top = 0
Width = 7455
_cx = 13150
_cy = 9975
_Version = 262144
TypeMask = 109707539
LeftGap = 30
RightGap = 0
TopGap = 14
BottomGap = 21
View3D = 1
AngleX = 5
AngleY = 11
View3DDepth = 70
Perspective = 40
AxesStyle = 2
nColors = 16
Pallete = "Surface & contour.frx":0000
Colors = "Surface & contour.frx":00E4
nSer = 5
NumSer = 5
BorderS = 0
End
End
Attribute VB_Name = "Form1"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Option Explicit
Private Sub Command1_Click()
' Surface plot
With ChartFX1
.LeftGap = 30
.RightGap = 10
.TopGap = 10
.BottomGap = 20
.Gallery = SURFACE
.SetContourLabels 20 ' 20 is my "layer size"
.SerLegBoxObj.Docked = TGFP_BOTTOM
.Axis(AXIS_Y).Style = .Axis(AXIS_Y).Style Or AS_BREAKZERO
End With
End Sub
Private Sub Command2_Click()
' Contour plot
With ChartFX1
.LeftGap = 0
.RightGap = 20
.TopGap = 0
.BottomGap = 20
.Gallery = CONTOUR
.SetContourLabels 20 ' 20 is my "layer size"
.SerLegBoxObj.Docked = TGFP_RIGHT
.Axis(AXIS_Y).Style = .Axis(AXIS_Y).Style And Not AS_BREAKZERO
End With
End Sub
Private Sub Form_Load()
Dim i As Integer
Dim j As Integer
' Initialize data
With ChartFX1
.Axis(AXIS_Y).ResetScale
' Set smooth data
.OpenDataEx COD_VALUES, 20, 20
For i = 0 To 19
If i Mod 2 = 0 Then
ChartFX1.KeySer(i) = Str(i) 'X-Axis labels
End If
For j = 0 To 19
ChartFX1.ValueEx(i, j) = (Sin((i * 2 * 3.1416) / 19) * Cos(((j + 5) * 2 * 3.1416) / 19)) * 100
Next j
Next i
.CloseData COD_VALUES
.Axis(AXIS_Y).Decimals = 0
' 3D Settings
.View3DDepth = 60
.AngleX = 30
.AngleY = 45
' Constrains
.ShowTips = False
.AllowDrag = False
.SerLegBoxObj.BorderStyle = BBS_NONE
End With
End Sub
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -