Neuerstellung

- Quelle: https://github.com/oxyplot/oxyplot
This commit is contained in:
2023-09-02 09:24:59 +02:00
commit 9520c1fa4a
810 changed files with 117869 additions and 0 deletions

View File

@@ -0,0 +1,33 @@
<Query Kind="Program">
<Reference Relative="..\..\..\Output\OxyPlot.dll"></Reference>
<Reference>&lt;RuntimeDirectory&gt;\System.Xaml.dll</Reference>
<Reference>&lt;RuntimeDirectory&gt;\WPF\WindowsBase.dll</Reference>
<Reference>&lt;RuntimeDirectory&gt;\WPF\PresentationCore.dll</Reference>
<Reference>&lt;RuntimeDirectory&gt;\WPF\PresentationFramework.dll</Reference>
<Reference Relative="..\..\..\Output\OxyPlot.Wpf.dll"></Reference>
<Namespace>System.Windows</Namespace>
<Namespace>System.Windows.Controls</Namespace>
<Namespace>System.Windows.Media</Namespace>
<Namespace>OxyPlot</Namespace>
<Namespace>OxyPlot.Wpf</Namespace>
</Query>
void Main()
{
var pm = new PlotModel("Sine curve");
pm.Series.Add(new FunctionSeries(Math.Sin,0,20,200));
pm.Show();
}
public static class MyExtensions
{
public static void Show(this PlotModel model, double width = 800, double height = 500) {
var w = new Window() { Title = "OxyPlot.Wpf.PlotView : " + model.Title, Width = width, Height = height };
var plot = new PlotView();
plot.Model = model;
w.Content = plot;
w.Show();
}
}
// You can also define non-static classes, enums, etc.

View File

@@ -0,0 +1,8 @@
Tested with LINQPad 4.38.07 (Beta, free edition)
1. Build OxyPlot release
Tools/build.cmd
2. Start LINQPad
3. Set the plugins/extensions and queries folders to the "OxyPlot/Source/Examples/LINQPad" folder
4. Test the "My extensions" main example
5. Test the SimpleFunction/SimpleLinePlot queries

View File

@@ -0,0 +1,14 @@
<Query Kind="Program">
<Namespace>OxyPlot</Namespace>
</Query>
void Main()
{
var pm = new PlotModel("Simple Function Plots") { PlotType = PlotType.Cartesian };
pm.Series.Add(new FunctionSeries(Math.Sin, -10, 10, 0.1, "sin(x)"));
pm.Series.Add(new FunctionSeries(Math.Cos, -10, 10, 0.1, "cos(x)"));
pm.Series.Add(new FunctionSeries(t => 5 * Math.Cos(t), t => 5 * Math.Sin(t), 0, 2 * Math.PI, 0.1, "5cos(t),5sin(t)"));
pm.Show();
}

View File

@@ -0,0 +1,18 @@
<Query Kind="Program">
<Namespace>OxyPlot</Namespace>
</Query>
void Main()
{
var pm = new PlotModel("Simple Line Plot");
var lineSeries1 = new LineSeries("LineSeries1");
lineSeries1.Points.Add( new DataPoint (1,1));
lineSeries1.Points.Add( new DataPoint (2,2));
lineSeries1.Points.Add( new DataPoint (3,1.5));
pm.Series.Add(lineSeries1);
pm.Show();
}