this.plot1.Model

May 22, 2014 at 12:58 AM
Edited May 22, 2014 at 2:25 PM
I'm following the "Getting started" guide for Windows Forms, and also looking at the examples:

https://oxyplot.codeplex.com/SourceControl/latest#Source/Examples/DocumentationExamples/HelloWorld/WindowsFormsApplication1/Form1.cs

namespace WindowsFormsApplication1
{
using System;
using System.Windows.Forms;

using OxyPlot;
using OxyPlot.Series;

public partial class Form1 : Form
{
    public Form1()
    {
        this.InitializeComponent();
        var myModel = new PlotModel("Example 1");
        myModel.Series.Add(new FunctionSeries(Math.Cos, 0, 10, 0.1, "cos(x)"));
        this.plot1.Model = myModel;
    }
}
}


Can someone explain where plot1 is created? I get an error that this definition does not exist.

Thanks!
May 23, 2014 at 7:17 AM
Thanks for the notice - the 'getting started' should be improved. The plot1 should be a PlotView control added to the form.