Sign in Join
Wiki copytemporary

PlotPanel/zh CN: what changed

Revision 1 to 2. Removed lines have a minus sign; added lines have a plus sign.

OldNewLine
11## Plotpanel
22
33*目前,PlotPanel不在积极开发和维护,只提供兼容性。*
44
55*请考虑使用 [[TAChart/zh CN|TAChart]] 包中的[[TAChart documentation|相应功能]]。*
66
77PlotPanel是Lazarusk中用来代替(或多或少)TChart的组件。 通过一些修改可以在Kylix、Delphi 5、6、7中使用。
88
99PlotPanel可以画线、点和条形图。也可以做动画图形。
1010
1111软件没有任何书面保证,所以使用时需要您自担风险。
1212
1313### 屏幕截图
1414
15-<figure>
16-<img src="Plotpanel2.png" title="Plotpanel2.png" />
17-<figcaption>Plotpanel2.png</figcaption>
18-</figure>
15+![](/wiki-images/2/24/Plotpanel2.png)
1916
2017## 安装
2118
2219在Lazarus中安装PlotPanel,你需要做到以下几点:
2320
2421- 下载PlotPanel包 (plotpanel.zip) 在:http://science4all.nl/?Programming:MICAM:Lazarus 或 [Lazarus CCR SourceForge 站点](http://sourceforge.net/project/showfiles.php?group_id=92177&package_id=181065)。
2522- 解压plotpanel.zip到你选择的目录中。
2623- 打开Lazarus
2724- 执行安装包时所必须的操作 (参看 [[Install Packages/zh CN|安装包]]).
2825
2926当你完成上面的操作后,palet组件会在组件工具栏“Extra(额外)”选项卡里。 现在,您可以使用Plotpanel了。
3027
3128运行PlotPanelDemo 来探索PlotPanel新功能。N.B.你可以尝试在没有安装PlotPanel 组件的情况下,运行TryPlotPanel!
3229
3330**Plotpanel在Lazarus 0.9.28.x上有个问题**
3431
3532**在我的网站上 (http://science4all.nl/?Programming::Lazarus) 你可以找到更新的版本: PlotPanel-0.97**
3633
3734## PlotPanel组件描述
3835
3936这是一个欠佳的组件描述。示例将演示如何使用组件。
4037
4138PlotPanel 组件来源于 TCustomPanel组件。
4239
4340面板绘图功能被添加。
4441
4542## 属性继承自TCustomPanel
4643
4744
4845Align, Anchors, Autosize, BevelInner / Outer / Width
4946
5047Borderspacing, BorderStyle, Borderwidth
5148
5249Color is the color of the border of the plot
5350
5451Constraints, Cursor, Dragmode, Enabled
5552
5653Font is the font of the title of the plot
5754
5855Height, HelpContext, HelpKeyword, HelpType, Hint
5956
6057Left, Name, ParenColor, Parentfont, ParentShowHint
6158
6259PopupMenu, ShowHint, TabOrder, TabStop
6360
6461Tag, Top, Visible, Width
6562
6663## 添加以下属性
6764
6865
6966**BackColor** 绘图区域的背景颜色
7067
7168**GridColor** 网格颜色,当和背景色相同时,会看不到网格
7269
7370**LayerOption** 对于容易绘制的单层可以设置为假,它是不可能被直接设置为真(参见方法)
7471
7572**Margin** 绘图区边框宽度(单位:像素)。
7673
7774**PlotMode** 三种模式: pmBar, pmLine 和 pmDot
7875
7976**PlotPen** Properties of the plotting pen. If LayerOption is False, then all sub-properties can be set. If LayerOption is True, then information about the plotting penis transferred via the LayerOptions method (methods)
8077
8178~~绘图笔属性。如果LayerOption为False,那么所有的子属性可以设置。如果LayerOption为True,则有关绘图笔信息通过LayerOptions方法转移(方法)~~
8279
8380**Title** 标题在图的顶部居中位置,并使用Font属性
8481
8582**PlotBMP** 这是一个位图的整体图(见演示使用)
8683
8784**x轴属性:**
8885
8986
9087**XLabel** X轴标签
9188
9289**XMarks** 为真时,X轴标记
9390
9491**XMarksFont** 标记字体
9592
9693**XMarksInterval** 网络线间隔(适用于线性标尺)
9794
9895**XMax** X最大可见值
9996
10097**XMin** X最小可见值
10198
10299**XScaleLog** When TRUE the scale is logarithmic (the interval is determined by the component).
103100
104101~~如果为真线性是对数(间隔由组件来确定)~~
105102
106103**y轴的相同应用。**
107104
108105## 方法
109106
110107**AddXY(X,Y:Extended)**
111108
112109使用这这个方法,你可以绘制点或线。
113110
114111示例
115112
116113``` pascal
117114for i:= -10 to 10 do
118115 PlotPanel1.AddXY(i,i*i)
119116```
120117
121118This plots a parbola .The line is plotted with the PlotPen properties.
122119
123120~~此绘制了parbola ,PlotPen 属性绘制线。注意你只能绘制单层。~~
124121
125122**AddXY(X,Y:Extended, Color:Tcolor,Layer:Integer)**
126123
127124用这种方法,可以绘制多达8条不同颜色的线,plotmodes和penwidths(见LayerOptions如何设置线宽和plotmodes)
128125
129126**LayerOptions(Layer:Integer;PlotMode:TPlotMode;PenWidth:Integer)**
130127
131128每一层可以使用不同的Plotmode和PenWidth当你调用这个方法LayerOPtion将被设置为TRUE。
132129
133130当你想再次使用单层你必须设置LayerOption为假!
134131
135132**Autoscale(Layer:Integer)**
136133
137134有了这个方法,可以自动调整图形大小。
138135
139136**ClearData**
140137
141138清除绘图数据
142139
143140**ConvertS2W(x,y: Extended; var WX,WY : Extended)**
144141
145142转换屏幕坐标X,Y为实际坐标WX,WY。当X和Y超出边界时,函数返回False,否则真。
146143
147144**Freeze(Boolean)**
148145
149146When Freeze(True) is executed all plotting is done on a invisible bitmap.
150147
151148~~当Freeze(True)时执行所有绘图上完成一个无形位图。~~
152149
153150After a Freeze(False) the whole plot is displayed. This produces flicker-free animations.
154151
155152~~当Freeze(False)时,将显示整个绘图。这将产生无闪烁的动画。~~
156153
157154**HideLayer(Layer:Integer)**
158155
159156使用这个隐藏单层绘图
160157
161158**UnHideLayer(Layer:Integer)**
162159
163160显示隐藏层 N.B. When you add points to a hidden layer, the old layer is deleted and the new points are the only points in this layer!
164161
165162~~当指向一个隐藏层,老层被删除,新点也是唯一的点在这一层!~~
166163
167164**Paint**
168165
169166重绘整图(必要时由系统自动完成)
170167
171168Marien van Westen
172169
173170---
174171*From the Free Pascal wiki, page "PlotPanel/zh CN", as it stood on 2020-02-23 after a change by Trev, out of the wiki's dump of 2024-05-26. Copyright stays with the author who wrote it, according to the old wiki's [[Licensing]] page. If you have concerns about this material, [message the admin](/wiki-contact).*
175172Category: Charting/zh CN
176173Category: Components/zh CN
177174Category: Graphics/zh CN
178175Category: zh

Back to history