0

我一直在尝试使用 VB.Net 库OxyPlothttps://oxyplot.codeplex.com ==>移至 GitHub ==> https://github.com/oxyplot)。

我一直在努力从示例列表中复制几个绘图示例。虽然一切顺利,但我的问题是:

1. 一个表格怎么可能显示不止一个情节(比如 3 个)?
2. 如何在表格上放置每幅图?
.


下面是用于在表单中显示等高线图的代码:

Private Sub Form1_Load(sender As System.Object, e As System.EventArgs) Handles MyBase.Load

    InitializeComponent()

    Dim Plot As OxyPlot.WindowsForms.Plot = New OxyPlot.WindowsForms.Plot()
    Plot.Dock = DockStyle.Fill
    Plot.Model = New PlotModel("Peaks")

    Dim cs As ContourSeries = New ContourSeries()
    cs.ColumnCoordinates = ArrayHelper.CreateVector(-3, 3, 0.05)
    cs.RowCoordinates = ArrayHelper.CreateVector(-3.1, 3.1, 0.05)
    cs.ContourColors = {OxyColors.SeaGreen, OxyColors.RoyalBlue, OxyColors.IndianRed}
    cs.Data = peaks(cs.ColumnCoordinates, cs.RowCoordinates)
    Plot.Model.Series.Add(cs)

    Me.Controls.Add(Plot)

End Sub

先感谢您!

4

1 回答 1

2

对于要显示的每个“绘图”或数据集,您需要一个单独的系列。如果需要,您可以将它们全部重叠在一个轴上。否则,您可以为每个系列创建单独的轴,并使用Axis.StartPosition/EndPosition属性作为整个绘图区域的百分比来分隔它们。检查示例浏览器,在轴示例下,特别是多个窗格。使用 Ctrl-Alt-C 将代码复制到剪贴板。

于 2013-07-30T19:53:36.707 回答