0

I have been experimenting with the VB.Net library, OxyPlot (https://oxyplot.codeplex.com ==> moved to GitHub ==> https://github.com/oxyplot).

I'm have been working on reproducing the few plots examples from the example list. While this has been going fine, my questions are:

1. How could one show more than one plot (say 3) per form?
2. How would one position each plot on the form?
.


Below is the code used to show a contour plot in a form:
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

Thank you in advance!

Flak DiNenno
  • 2,193
  • 4
  • 30
  • 57
goicox
  • 31
  • 1
  • 9

1 Answers1

2

You need a separate series for each "plot" or set of data you want displayed. You can overlap them all on one axis if you want. Otherwise, you can create separate axes for each series and use the Axis.StartPosition/EndPosition properties as percentages of the overall plot area to separate them. Check the examples browser, under Axis examples, Multiple panes specifically. use Ctrl-Alt-C to copy the code to clipboard.

Ioan
  • 2,382
  • 18
  • 32