本文整理汇总了C#中System.Windows.Documents.List.Graph方法的典型用法代码示例。如果您正苦于以下问题:C# List.Graph方法的具体用法?C# List.Graph怎么用?C# List.Graph使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类System.Windows.Documents.List
的用法示例。
在下文中一共展示了List.Graph方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: spawn
private void spawn(int steps, int startingVal = 1)
{
Random rand = new Random();
double position = 1;
List<double> vals = new List<double>();
List<double> vals2 = new List<double>();
for (int i = 0; i < steps; i++) {
double step = rand.NextDouble();
if (rand.Next(2) == 1) {
step *= -1;
}
position += step;
double toAdd = 1.0 / position;
vals.Add(toAdd);
vals2.Add(position);
}
string t1 = "Inverse";
string t2 = "Random Walk";
var g1 = vals.LineGraph();
g1.Title = t1;
var g2 = vals2.LineGraph();
g2.Title = t2;
List<LineSeries> series = new List<LineSeries> { g1, g2 };
addChart(series.Graph(false), "Line Graph");
addChart(new Histogram(vals, t1), t1);
addChart(new Histogram(vals2, t2), t2);
}
示例2: volume
private void volume()
{
List<LineSeries> s = new List<LineSeries>();
foreach (var a in InspectionSymbols) {
var ts = this.data.Open(a, DataManager.DataType.Volume, startDate_dt, endDate_dt);
s.Add(getSeries(ts));
}
this.addChart(s.Graph(this.TimeAxis,
new DateTimeAxis() { Title = "Date" },
new LinearAxis() { Title = "Volume"}), "Volume");
}
示例3: drawDowns2
private void drawDowns2()
{
this.TimeAxis = false;
List<ScatterSeries> s = new List<ScatterSeries>();
foreach (var a in InspectionSymbols) {
var ts = this.data.Open(a, DataManager.DataType.AdjClose, startDate_dt, endDate_dt);
s.Add(getDistributionSeries(ts.DrawDown2, ts.Name));
}
this.addChart(s.Graph(false,
new LinearAxis() { Title = "Rank" },
new LinearAxis() { Title = "Draw Down"}), "DrawDowns2");
}
示例4: DailyReturnsHist_Click
private void DailyReturnsHist_Click(object sender, RoutedEventArgs e)
{
List<RectangleBarSeries> s = new List<RectangleBarSeries>();
foreach (var a in InspectionSymbols) {
var ts = this.data.Open(a, DataManager.DataType.AdjClose, startDate_dt, endDate_dt);
s.Add(new Histogram(ts.DailyReturns).GetBarSeries());
s.Graph().ShowUserControl();
}
this.addChart(s.Graph(), "DrawDowns2");
}
示例5: CandleSticks_Click
private void CandleSticks_Click(object sender, RoutedEventArgs e)
{
List<CandleStickSeries> all = new List<CandleStickSeries>();
TimeSeries open, close, high, low;
foreach (var a in InspectionSymbols) {
this.data.GetOpenCloseHighLow(a, startDate_dt, endDate_dt, out open, out close, out high, out low);
CandleStickSeries css = new CandleStickSeries() { StrokeThickness = .5,
Title = "Candle sticks" };
css.Items.Clear();
for (int i = 0; i < open.Count(); i++) {
css.Items.Add(
new HighLowItem() {
Open = open.GetRange()[i],
Close = close.GetRange()[i],
High = high.GetRange()[i],
Low = low.GetRange()[i],
X = open.GetDomain()[i]
}
);
}
all.Add(css);
}
this.addChart(all.Graph(
new DateTimeAxis() { Title = "Date" },
new LinearAxis() { Title = "Close" }), "Close");
}
示例6: Poll_Click
private void Poll_Click(object sender, RoutedEventArgs e)
{
List<double> results = new List<double>();
List<Chart> charts = new List<Chart>();
List<LineSeries> series = new List<LineSeries>();
for (int i = 0; i < urns.Count(); i++) {
//charts.Add(urns[i].FirstN.LineGraph().Graph());
series.Add(urns[i].FirstN.LineGraph());
}
//addCharts(charts, "convergence");
addChart(series.Graph(), "poll");
}