本文整理汇总了C#中ZedGraph.LineItem类的典型用法代码示例。如果您正苦于以下问题:C# LineItem类的具体用法?C# LineItem怎么用?C# LineItem使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
LineItem类属于ZedGraph命名空间,在下文中一共展示了LineItem类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C#代码示例。
示例1: createGraph
public void createGraph()
{
//zgc.GraphPane = new GraphPane();
GraphPane myPane = zgc.GraphPane;
// Set the titles and axis labels
myPane.Title.Text = this.getMethod() + " results";
myPane.XAxis.Title.Text = "distance";
myPane.YAxis.Title.Text = "relative count";
myCurveG = myPane.AddCurve("Genuines", new PointPairList(), Color.Green, SymbolType.Circle);
myCurveI = myPane.AddCurve("Impostors", new PointPairList(), Color.Red, SymbolType.Circle);
myCurveG.Line.Width = 1;
myCurveI.Line.Width = 1;
myCurveG.Line.Fill = new Fill(Color.FromArgb(60, 0, 255, 0));
myCurveI.Line.Fill = new Fill(Color.FromArgb(60, 255, 0, 0));
myCurveG.Symbol.Size = 2;
myCurveI.Symbol.Size = 2;
myCurveG.Symbol.Fill = new Fill(Color.Green);
myCurveI.Symbol.Fill = new Fill(Color.Red);
LineItem myCurveThresh = myPane.AddCurve("Thresh", threshPoints, Color.Black, SymbolType.None);
myCurveThresh.Line.Width = 1;
myCurveThresh.Line.Style = System.Drawing.Drawing2D.DashStyle.Dot;
this.updatePanes();
zgc.AxisChange();
}
开发者ID:harpener,项目名称:BIO,代码行数:33,代码来源:BiometricAlgorithmGenuineImpostorResultGraph.cs
示例2: SetCollectProperty
public SetCollectProperty(LineItem lineItem,string CollectId)
{
InitializeComponent();
this.lineItem = lineItem;
this.CollectId = CollectId;
this.label_CollectId.Text = CollectId.ToString();
this.comboBox_LineStyle.SelectedIndex = 0;
this.comboBox_SymbolType.DataSource = Enum.GetNames(typeof(SymbolType));
}
开发者ID:amedinarcr,项目名称:fop,代码行数:9,代码来源:SetCollectProperty.cs
示例3: Barier
public Barier(Interval interval)
{
points = new PointPairList();
this.interval = interval;
curve = new LineItem("", points, Color.SteelBlue, SymbolType.Diamond);
curve.Line.IsVisible = false;
curve.Symbol.Fill.Color = Color.SteelBlue;
curve.Symbol.Fill.Type = FillType.Solid;
interval.graphPane.CurveList.Add(curve);
barierType = "Равнины, луга, соланчаки";
}
开发者ID:Leoleshucov008,项目名称:CalculationRRL,代码行数:11,代码来源:Interval.cs
示例4: KresliGraf
public static ZedGraphControl KresliGraf(string nazovGrafu,List<Spread> myCustomObjects, ZedGraphControl zg1)
{
zg1.GraphPane.CurveList.Clear();
zg1.GraphPane.GraphObjList.Clear();
GraphPane myPane = zg1.GraphPane;
// Set the titles and axis labels
myPane.Title.Text = nazovGrafu;
myPane.XAxis.Title.Text = "Date";
myPane.YAxis.Title.Text = "$";
myPane.XAxis.Type = AxisType.Date;
PointPairList list = new PointPairList();
int rok = myCustomObjects.First().Date.Year;
DateTime predchadzDatum = myCustomObjects.First().Date;
foreach (var item in myCustomObjects)
{
var x = (double)new XDate(DateTime.Parse(item.Date.ToShortDateString()));
var y = item.Value;
//Console.WriteLine(x + " " + y);
list.Add(x, y);
//Console.WriteLine(rok + " > " + item.Date.Year.ToString() + " " + (item.Date + " > " + new DateTime(item.Date.Year, 1, 1)).ToString() + " " + (predchadzDatum + " < " + new DateTime(item.Date.Year, 1, 1)).ToString());
//Console.WriteLine((rok > item.Date.Year).ToString() + " " + (item.Date > new DateTime(item.Date.Year, 1, 1)).ToString() + " " + (predchadzDatum < new DateTime(item.Date.Year, 1, 1)).ToString());
if (item.Date.Year != predchadzDatum.Year)
{
LineItem line = new LineItem(String.Empty, new[] { x, x }, new[] { myPane.YAxis.Scale.Min, myPane.YAxis.Scale.Max }, Color.Black, SymbolType.None);
line.Line.Style = System.Drawing.Drawing2D.DashStyle.Dash;
line.Line.Width = 1f;
myPane.CurveList.Add(line);
Console.WriteLine("Datum " + item.Date);
}
predchadzDatum = item.Date;
}
myPane.CurveList.Add(new LineItem("My Curve", list, Color.Blue, SymbolType.None));
zg1.Refresh();
// LineItem myCurve = myPane.AddCurve("My Curve", list, Color.Blue, SymbolType.None);
zg1.AxisChange();
return zg1;
}
开发者ID:Carpkiller,项目名称:SpreadCalculator,代码行数:43,代码来源:PracasGrafmi.cs
示例5: createGraph
public void createGraph()
{
GraphPane myPane = zgc.GraphPane;
// Set the titles and axis labels
myPane.Title.Text = this.getMethod() + " results";
myPane.XAxis.Title.Text = "template #";
myPane.YAxis.Title.Text = "distance";
myCurveG = myPane.AddCurve("Genuine", new PointPairList(), Color.Black, SymbolType.Diamond);
myCurveG.Line.IsVisible = false;
myCurveG.Symbol.Border.IsVisible = false;
myCurveG.Symbol.Fill = new Fill(Color.Green);
myCurveG.Symbol.Size = 6;
myCurveI = myPane.AddCurve("Impostor", new PointPairList(), Color.Black, SymbolType.Diamond);
myCurveI.Line.IsVisible = false;
myCurveI.Symbol.Border.IsVisible = false;
myCurveI.Symbol.Fill = new Fill(Color.Red);
myCurveI.Symbol.Size = 5;
this.updatePanes();
threshPoints.Clear();
threshPoints.Add(new PointPair(-1, this.getStatistics().Thresh));
int max = 0;
if (myCurveG.Points.Count > 0) {
max = (int)myCurveG.Points[myCurveG.Points.Count - 1].X;
}
if (myCurveI.Points.Count > 0 && myCurveI.Points[myCurveI.Points.Count - 1].X > max) {
max = (int)myCurveI.Points[myCurveI.Points.Count - 1].X;
}
threshPoints.Add(new PointPair(max + 1, this.getStatistics().Thresh));
LineItem myCurveThresh = myPane.AddCurve("Thresh", threshPoints, Color.Black, SymbolType.None);
myCurveThresh.Line.Style = System.Drawing.Drawing2D.DashStyle.Dot;
// Calculate the Axis Scale Ranges
zgc.AxisChange();
}
开发者ID:harpener,项目名称:BIO,代码行数:40,代码来源:BiometricAlgorithmDetailResultGraph.cs
示例6: LineItem
/// <summary>
/// The Copy Constructor
/// </summary>
/// <param name="rhs">The <see cref="LineItem"/> object from which to copy</param>
public LineItem( LineItem rhs )
: base(rhs)
{
symbol = new Symbol( rhs.Symbol );
line = new Line( rhs.Line );
}
开发者ID:InsungChoi,项目名称:dddd,代码行数:10,代码来源:LineItem.cs
示例7: BUT_log2_Click
//.........这里部分代码省略.........
alldata[sensorno].lasttime = time;
alldata[sensorno].datax.Add(double.Parse(item.items[offsetAX]));
alldata[sensorno].datay.Add(double.Parse(item.items[offsetAY]));
alldata[sensorno].dataz.Add(double.Parse(item.items[offsetAZ]));
}
else if (item.msgtype.StartsWith("GYR"))
{
int sensorno = int.Parse(item.msgtype.Substring(3)) - 1;
alldata[sensorno].type = item.msgtype;
int offsetGX = dflog.FindMessageOffset(item.msgtype, "GyrX");
int offsetGY = dflog.FindMessageOffset(item.msgtype, "GyrY");
int offsetGZ = dflog.FindMessageOffset(item.msgtype, "GyrZ");
int offsetTime = dflog.FindMessageOffset(item.msgtype, "TimeUS");
double time = double.Parse(item.items[offsetTime]) / 1000.0;
if (time != alldata[sensorno].lasttime)
alldata[sensorno].timedelta = alldata[sensorno].timedelta * 0.99 + (time - alldata[sensorno].lasttime) * 0.01;
alldata[sensorno].lasttime = time;
alldata[sensorno].datax.Add(double.Parse(item.items[offsetGX]));
alldata[sensorno].datay.Add(double.Parse(item.items[offsetGY]));
alldata[sensorno].dataz.Add(double.Parse(item.items[offsetGZ]));
}
}
int controlindex = 0;
foreach (var sensordata in alldata)
{
if (sensordata.datax.Count <= N)
continue;
double samplerate = 0;
samplerate = Math.Round(1000 / sensordata.timedelta, 1);
double[] freqt = fft.FreqTable(N, (int)samplerate);
double[] avgx = new double[N / 2];
double[] avgy = new double[N / 2];
double[] avgz = new double[N / 2];
int totalsamples = sensordata.datax.Count;
int count = totalsamples / N;
int done = 0;
while (count > 1) // skip last part
{
var fftanswerx = fft.rin(sensordata.datax.Skip(N * done).Take(N).ToArray(), (uint)bins);
var fftanswery = fft.rin(sensordata.datay.Skip(N * done).Take(N).ToArray(), (uint)bins);
var fftanswerz = fft.rin(sensordata.dataz.Skip(N * done).Take(N).ToArray(), (uint)bins);
for (int b = 0; b < N / 2; b++)
{
if (freqt[b] < (double)NUM_startfreq.Value)
continue;
avgx[b] += fftanswerx[b] / (N / 2);
avgy[b] += fftanswery[b] / (N / 2);
avgz[b] += fftanswerz[b] / (N / 2);
}
count--;
done++;
}
ZedGraph.PointPairList pplx = new ZedGraph.PointPairList(freqt, avgx);
ZedGraph.PointPairList pply = new ZedGraph.PointPairList(freqt, avgy);
ZedGraph.PointPairList pplz = new ZedGraph.PointPairList(freqt, avgz);
var curvex = new LineItem(sensordata.type + " x", pplx, color[0], SymbolType.None);
var curvey = new LineItem(sensordata.type + " y", pply, color[1], SymbolType.None);
var curvez = new LineItem(sensordata.type + " z", pplz, color[2], SymbolType.None);
ctls[controlindex].GraphPane.Legend.IsVisible = true;
ctls[controlindex].GraphPane.XAxis.Title.Text = "Freq Hz";
ctls[controlindex].GraphPane.YAxis.Title.Text = "Amplitude";
ctls[controlindex].GraphPane.Title.Text = "FFT " + sensordata.type + " - " + Path.GetFileName(ofd.FileName) + " - " + samplerate + "hz input";
ctls[controlindex].GraphPane.CurveList.Clear();
ctls[controlindex].GraphPane.CurveList.Add(curvex);
ctls[controlindex].GraphPane.CurveList.Add(curvey);
ctls[controlindex].GraphPane.CurveList.Add(curvez);
ctls[controlindex].Invalidate();
ctls[controlindex].AxisChange();
ctls[controlindex].GraphPane.XAxis.Scale.Max = samplerate / 2;
ctls[controlindex].Refresh();
controlindex++;
}
}
}
开发者ID:marcoarruda,项目名称:MissionPlanner,代码行数:101,代码来源:fftui.cs
示例8: BUT_run_Click
private void BUT_run_Click(object sender, EventArgs e)
{
Utilities.FFT2 fft = new FFT2();
using (OpenFileDialog ofd = new OpenFileDialog())
{
ofd.Filter = "*.wav|*.wav";
ofd.ShowDialog();
if (!File.Exists(ofd.FileName))
return;
var st = File.OpenRead(ofd.FileName);
int bins = 10;
double[] buffer = new double[1 << bins];
int a = 0;
while (st.Position < st.Length)
{
byte[] temp = new byte[2];
var read = st.Read(temp, 0, temp.Length);
var val = (double)BitConverter.ToInt16(temp, 0);
buffer[a] = val;
a++;
if (a == (1 << bins))
{
var fftanswer = fft.rin(buffer, (uint)bins);
var freqt = fft.FreqTable(buffer.Length, 1000);
ZedGraph.PointPairList ppl = new ZedGraph.PointPairList();
for (int b = 0; b < fftanswer.Length; b++)
{
ppl.Add(freqt[b], fftanswer[b]);
}
double xMin, xMax, yMin, yMax;
var curve = new LineItem("FFT", ppl, Color.Red, SymbolType.Diamond);
curve.GetRange(out xMin, out xMax, out yMin, out yMax, true, false, zedGraphControl1.GraphPane);
zedGraphControl1.GraphPane.XAxis.Title.Text = "Freq Hz";
zedGraphControl1.GraphPane.YAxis.Title.Text = "Amplitude";
zedGraphControl1.GraphPane.Title.Text = "FFT";
zedGraphControl1.GraphPane.CurveList.Clear();
zedGraphControl1.GraphPane.CurveList.Add(curve);
zedGraphControl1.Invalidate();
zedGraphControl1.AxisChange();
zedGraphControl1.Refresh();
int width = Console.WindowWidth - 1;
int height = Console.WindowHeight - 1;
int r = 1;
foreach (var ff in fftanswer)
{
int col = (int)((r / (double)fftanswer.Length) * width);
int row = (int)((ff * 0.2) + 0.5);
//Console.SetCursorPosition(col, height - row);
Console.Write("*");
r++;
}
// 50% overlap
st.Seek(-(1 << bins) / 2, SeekOrigin.Current);
a = 0;
buffer = new double[buffer.Length];
//Console.Clear();
}
}
}
}
开发者ID:marcoarruda,项目名称:MissionPlanner,代码行数:86,代码来源:fftui.cs
示例9: myButton1_Click
//.........这里部分代码省略.........
datainAX[samplecounta] = double.Parse(item.items[offsetAX]);
datainAY[samplecounta] = double.Parse(item.items[offsetAY]);
datainAZ[samplecounta] = double.Parse(item.items[offsetAZ]);
samplecounta++;
lasttime = time;
}
else if (item.msgtype == "GYR1")
{
int offsetGX = dflog.FindMessageOffset("GYR1", "GyrX");
int offsetGY = dflog.FindMessageOffset("GYR1", "GyrY");
int offsetGZ = dflog.FindMessageOffset("GYR1", "GyrZ");
int offsetTime = dflog.FindMessageOffset("ACC1", "TimeUS");
double time = double.Parse(item.items[offsetTime]) / 1000.0;
// we missed accel data
if (samplecountg >= N)
continue;
datainGX[samplecountg] = double.Parse(item.items[offsetGX]);
datainGY[samplecountg] = double.Parse(item.items[offsetGY]);
datainGZ[samplecountg] = double.Parse(item.items[offsetGZ]);
samplecountg++;
}
if (samplecounta >= N && samplecountg >= N)
{
int inputdataindex = 0;
foreach (var itemlist in datas)
{
var fftanswer = fft.rin((double[])itemlist, (uint)bins);
for (int b = 0; b < N / 2; b++)
{
avg[inputdataindex][b] += fftanswer[b] * (1.0 / (N / 2.0));
}
samplecounta = 0;
samplecountg = 0;
inputdataindex++;
}
}
}
if (freqt == null)
{
samplerate = Math.Round(1000 / timedelta, 1);
freqt = fft.FreqTable(N, (int)samplerate);
}
// 0 out all data befor cutoff
for (int inputdataindex = 0; inputdataindex < 6; inputdataindex++)
{
for (int b = 0; b < N/2; b++)
{
if (freqt[b] < (double) NUM_startfreq.Value)
{
avg[inputdataindex][b] = 0;
continue;
}
break;
}
}
int controlindex = 0;
foreach (var item in avg)
{
ZedGraph.PointPairList ppl = new ZedGraph.PointPairList(freqt, item);
//double xMin, xMax, yMin, yMax;
var curve = new LineItem(datashead[controlindex], ppl, color[controlindex], SymbolType.None);
//curve.GetRange(out xMin, out xMax, out yMin, out yMax, true, false, ctls[c].GraphPane);
ctls[controlindex].GraphPane.Legend.IsVisible = false;
ctls[controlindex].GraphPane.XAxis.Title.Text = "Freq Hz";
ctls[controlindex].GraphPane.YAxis.Title.Text = "Amplitude";
ctls[controlindex].GraphPane.Title.Text = "FFT " + datashead[controlindex] + " - " + Path.GetFileName(ofd.FileName) + " - " + samplerate + "hz input";
ctls[controlindex].GraphPane.CurveList.Clear();
ctls[controlindex].GraphPane.CurveList.Add(curve);
ctls[controlindex].Invalidate();
ctls[controlindex].AxisChange();
ctls[controlindex].Refresh();
controlindex++;
}
}
}
开发者ID:marcoarruda,项目名称:MissionPlanner,代码行数:101,代码来源:fftui.cs
示例10: UpdateGraph
/// <summary>
/// Forces a update of the scatter plot.
/// </summary>
///
public void UpdateGraph()
{
zedGraphControl.GraphPane.Title.Text = scatterplot.Title;
zedGraphControl.GraphPane.XAxis.Title.Text = Scatterplot.XAxisTitle;
zedGraphControl.GraphPane.YAxis.Title.Text = Scatterplot.YAxisTitle;
classes.Clear();
if (scatterplot.Classes != null)
{
if (scatterplot.Classes.Count == 0)
{
zedGraphControl.GraphPane.Legend.IsVisible = false;
// Create space for unlabelled data
PointPairList list = new PointPairList(scatterplot.XAxis, scatterplot.YAxis);
LineItem item = new LineItem(String.Empty, list, Color.Black, SymbolType.Default);
item.Line.IsVisible = LinesVisible;
item.Symbol.Border.IsVisible = false;
item.Symbol.Fill = new Fill(Color.Black);
if (SymbolSize == 0)
item.Symbol.IsVisible = false;
else item.Symbol.Size = SymbolSize;
classes.Add(item);
}
else
{
zedGraphControl.GraphPane.Legend.IsVisible = true;
var colors = new ColorSequenceCollection(scatterplot.Classes.Count);
// Create a curve item for each of the labels
for (int i = 0; i < scatterplot.Classes.Count; i++)
{
// retrieve the x,y pairs for the label
double[] x = scatterplot.Classes[i].XAxis;
double[] y = scatterplot.Classes[i].YAxis;
PointPairList list = new PointPairList(x, y);
LineItem item = new LineItem(scatterplot.Classes[i].Text,
list, colors[i], SymbolType.Default);
item.Line.IsVisible = LinesVisible;
item.Symbol.Border.IsVisible = false;
item.Symbol.Fill = new Fill(colors[i]);
if (SymbolSize == 0)
item.Symbol.IsVisible = false;
else item.Symbol.Size = SymbolSize;
classes.Add(item);
}
}
zedGraphControl.AxisChange();
zedGraphControl.Invalidate();
if (!ScaleTight)
zedGraphControl.ZoomPane(zedGraphControl.GraphPane, 1.1, PointF.Empty, false);
else zedGraphControl.RestoreScale(zedGraphControl.GraphPane);
}
}
开发者ID:KommuSoft,项目名称:accord_framework,代码行数:71,代码来源:ScatterplotView.cs
示例11: AddCurve
/// <summary>
/// Add a curve (<see cref="CurveItem"/> object) to the plot with
/// the given data points (<see cref="IPointList"/>) and properties.
/// This is simplified way to add curves without knowledge of the
/// <see cref="CurveList"/> class. An alternative is to use
/// the <see cref="ZedGraph.CurveList" /> Add() method.
/// </summary>
/// <param name="label">The text label (string) for the curve that will be
/// used as a <see cref="Legend"/> entry.</param>
/// <param name="points">A <see cref="IPointList"/> of double precision value pairs that define
/// the X and Y values for this curve</param>
/// <param name="color">The color to used for the curve line,
/// symbols, etc.</param>
/// <param name="symbolType">A symbol type (<see cref="SymbolType"/>)
/// that will be used for this curve.</param>
/// <returns>A <see cref="CurveItem"/> class for the newly created curve.
/// This can then be used to access all of the curve properties that
/// are not defined as arguments to the
/// <see cref="AddCurve(string,IPointList,Color,SymbolType)"/> method.</returns>
public LineItem AddCurve( string label, IPointList points,
Color color, SymbolType symbolType )
{
LineItem curve = new LineItem( label, points, color, symbolType );
_curveList.Add( curve );
return curve;
}
开发者ID:cliffton2008,项目名称:JNMAutoTrader_Capital,代码行数:27,代码来源:GraphPane.cs
示例12: _cpuGraphInit
private void _cpuGraphInit()
{
Color[] cColor = { Color.AliceBlue, Color.Cyan, Color.LightBlue, Color.Aquamarine, Color.Orange, Color.Coral, Color.LightGoldenrodYellow, Color.Gold };
RollingPointPairList[] rpList = new RollingPointPairList[iCores];
LineItem[] lCurve = new LineItem[iCores];
GraphPane myPane = cpuGraphControl.GraphPane;
myPane.CurveList.Clear();
myPane.Chart.Fill.Type = FillType.None;
myPane.Margin.All = 0;
myPane.Margin.Top = 2f;
myPane.Title.Text = "";
myPane.Border.IsVisible = false;
myPane.Legend.IsVisible = false;
myPane.XAxis.Title.Text = "";
myPane.XAxis.Scale.Max = Properties.Settings.Default.f2TimspanCPU;
myPane.XAxis.Scale.Min = 0;
myPane.XAxis.Scale.IsVisible = false;
myPane.XAxis.IsVisible = false;
myPane.YAxis.Scale.IsVisible = false;
myPane.YAxis.Title.Text = "";
myPane.YAxis.IsVisible = false;
myPane.YAxis.Scale.Max = 105;
myPane.YAxis.Scale.Min = 0;
TextureBrush texBrush = new TextureBrush(Properties.Resources.cpuback);
myPane.Fill = new Fill(texBrush, true);
int tSpan = Properties.Settings.Default.f2TimspanCPU, timer = Properties.Settings.Default.f2TimerCPU, iPL = 1000 / timer * tSpan;
cpuGraphControl.Size = new Size(110, 35);//.Dock = DockStyle.Fill;
for (int i = 0; i < iCores; i++)
{
rpList[i] = new RollingPointPairList(iPL);
lCurve[i] = myPane.AddCurve("core" + i.ToString(), rpList[i], cColor[i], SymbolType.None);
// lCurve[i].Line.IsSmooth = true;
// lCurve[i].Line.SmoothTension = 0.2F;
lCurve[i].Line.Width = 0.01F;
lCurve[i].Line.IsAntiAlias = true;
lCurve[i].IsVisible = false;
}
cpuGraphControl.AxisChange();
cpuGraphControl.Visible = false;
}
开发者ID:priceLiu,项目名称:ServerController,代码行数:42,代码来源:CPUWorkload.cs
示例13: GraphFromFile
void GraphFromFile(string[] _filePath, double xc = 0.0, double yc = 1.0)
{
double[][] x = new double[_filePath.Length][];
double[][] y = new double[_filePath.Length][];
int[] iMax = new int[_filePath.Length];
if (this.radioButton_Setting_BrightField.Checked)
{
this.zgc_Profile.GraphPane.YAxis.Title.Text = "Differential";
this.zgc_Profile.GraphPane.Y2Axis.Title.Text = "Intensity";
this.zgc_Profile.GraphPane.Y2Axis.IsVisible = true;
}
else
{
this.zgc_Profile.GraphPane.YAxis.Title.Text = "Intensity";
this.zgc_Profile.GraphPane.Y2Axis.IsVisible = false;
}
LineItem[] lineItem = new LineItem[_filePath.Length];
//Color設定
int seed=Environment.TickCount;
for (int n = 0; n < _filePath.Length; n++)
{
//ファイル読み込み
double[][] dbleData;
if (ClsNk.FileIO.IsFileLocked(_filePath[n]))
{
MessageBox.Show(Path.GetFileNameWithoutExtension(_filePath[n]) + "\r\nはロックされています.");
continue;
}
ClsNk.FileIO.readFile(_filePath[n], out dbleData);
x[n] = new double[dbleData.GetLength(0) - 1];
y[n] = new double[dbleData.GetLength(0) - 1];
double max = 0.0;
Regex r = new Regex(@"(\w+)(\d{4})(F1|F2)([XZ])([bd])");
Match m = r.Match(Path.GetFileNameWithoutExtension(_filePath[n]));
for (int i = 0; i < dbleData.GetLength(0) - 1; i++)
{
x[n][i] = dbleData[i + 1][0];
y[n][i] = Convert.ToString(m.Groups[5]) == "b" ? dbleData[i + 1][6] : dbleData[i + 1][5];
if (max < y[n][i])
{
max = y[n][i];
iMax[n] = i;
}
}
if (this.checkBox_GraphPeakX.Checked)
{
double xMax = x[n][iMax[n]];
for (int i = 0; i < dbleData.GetLength(0) - 1; i++)
{
x[n][i] -= xMax + xc;
}
}
if (this.checkBox_GraphPeakY.Checked)
{
double yMax = y[n][iMax[n]];
for (int i = 0; i < dbleData.GetLength(0) - 1; i++)
{
y[n][i] /= yMax * yc;
}
}
//Color設定
Random rdm = new Random(seed++);
int R = rdm.Next(256);
int G = rdm.Next(256);
int B = rdm.Next(256);
lineItem[n] = this.zgc_Profile.GraphPane.AddCurve(System.IO.Path.GetFileNameWithoutExtension(_filePath[n]) + ":" + this.zgc_Profile.GraphPane.YAxis.Title.Text,
x[n], y[n], Color.FromArgb(R,G,B), SymbolType.None);
}
}
开发者ID:hirokinnp,项目名称:Scanner,代码行数:83,代码来源:Form_Main.cs
示例14: GcsMainPanel
public GcsMainPanel()
{
InitializeComponent();
_btn_ge_server.Enabled = false;
_btn_goto_ge.Enabled = false;
artificialHorizon.BackColor = toolStripContainer1.ContentPanel.BackColor;
_heightLine = _zgc_height.GraphPane.AddCurve("Height", new PointPairList(), Color.Blue, SymbolType.None);
_zgc_height.GraphPane.Title.IsVisible = false;
_zgc_height.GraphPane.YAxis.MajorGrid.IsVisible = true;
_zgc_height.GraphPane.XAxis.Title.IsVisible = false;
_zgc_height.AxisChange();
_zgc_height.GraphPane.Legend.IsVisible = false;
_zgc_height.GraphPane.IsFontsScaled = false;
_zgc_height.GraphPane.YAxis.Title.Text = "Height [m]";
_zgc_height.GraphPane.XAxis.IsVisible = false;
_speedLine = _zgc_speed.GraphPane.AddCurve("Speed", new PointPairList(), Color.Blue, SymbolType.None);
_zgc_speed.GraphPane.Title.IsVisible = false;
_zgc_speed.GraphPane.YAxis.MajorGrid.IsVisible = true;
_zgc_speed.GraphPane.XAxis.Title.IsVisible = false;
_zgc_speed.AxisChange();
_zgc_speed.GraphPane.Legend.IsVisible = false;
_zgc_speed.GraphPane.IsFontsScaled = false;
_zgc_speed.GraphPane.YAxis.Title.Text = "Speed [km/h]";
_zgc_speed.GraphPane.XAxis.IsVisible = false;
_beginDateTime = DateTime.Now;
}
开发者ID:TaehoJang,项目名称:gluonpilot,代码行数:28,代码来源:GcsMainPanel.cs
示例15: Form1
public Form1()
{
InitializeComponent();
myPane = myPlot.GraphPane;
int status = myDevice.connect();
if (status == 0)
{
MessageBox.Show("Device couldn't be found!");
Environment.Exit(0);
}
myPane.XAxis.Scale.Min = 0;
myPane.XAxis.Scale.Max = plotWidth;
myPane.YAxis.Scale.Min = 0;
myPane.YAxis.Scale.Max = 5;
myDevice.pinMode(2, 1);
myLine = myPane.AddCurve("Analog Voltage", myPoints, Color.Blue, SymbolType.None);
myDevice.initPwm();
myLine.Line.Width = 1;
myPlot.Invalidate();
myPlot.AxisChange();
myTimer.Start();
}
开发者ID:halitalptekin,项目名称:Little-Wire,代码行数:29,代码来源:Form1.cs
示例16: CreateGraph
public void CreateGraph()
{
// get a reference to the GraphPane
GraphPane myPane = this.zedGraphControlBode.GraphPane;
a = this.myBodeFunction.bode(10, 20, 10, 10);
zedGraphControlBode.Invalidate();
zedGraphControlBode.AxisChange();
// Generate a red curve with diamond
// symbols, and "Porsche" in the legend
// Generate a blue curve with circle
// symbols, and "Piper" in the legend
BodeCurve = myPane.AddCurve("Command", this.a, Color.Blue, SymbolType.None);
this.BodeCurve.Line.Width = 3.0F;
// Tell ZedGraph to refigure the`
// axes since the data have changed
myPane.XAxis.Type = AxisType.Linear;
// myPane.XAxis.Scale.Format = "mm:ss"; // 24 hour clock for HH
myPane.XAxis.MajorGrid.IsVisible = true;
zedGraphControlBode.AxisChange();
}
开发者ID:jnzim,项目名称:dev-repo,代码行数:27,代码来源:frmBodePlot.cs
示例17: GraphController
public GraphController(Model model, ZedGraphControl graphControl)
{
this.model = model;
this.graphControl = graphControl;
this.graphPane = graphControl.GraphPane;
// Initialize lines
this.lineItemA = this.graphPane.AddCurve("Person A", new PointPairList(), Color.Red, SymbolType.Diamond);
this.lineItemB = this.graphPane.AddCurve("Person B", new PointPairList(), Color.Blue, SymbolType.Circle);
this.lineItemAgent = this.graphPane.AddCurve("Agent", new PointPairList(), Color.Green, SymbolType.Star);
this.lineItemAgent.IsY2Axis = true;
// Set the Titles
this.graphPane.Title.Text = "Graph of persons' data and the agent's state";
this.graphPane.XAxis.Title.Text = "Time";
this.graphPane.XAxis.Type = AxisType.Date;
this.graphPane.Y2Axis.Title.Text = "Agent's state";
this.graphPane.YAxis.Scale.Min = -4;
this.graphPane.YAxis.Scale.Max = 4;
this.graphPane.Y2Axis.Scale.Min = -4;
this.graphPane.Y2Axis.Scale.Max = 4;
this.graphPane.Y2Axis.IsVisible = true;
// Update threshold lines
UpdateThresholdLines();
}
开发者ID:navyon,项目名称:AffectiveAgent,代码行数:26,代码来源:GraphController.cs
示例18: AddCurve
public void AddCurve(GraphPane pane, string name, string measure, Color color, SymbolType sType, int capacity)
{
_dataPointList = new RollingPointPairList(capacity);
// Добавим кривую пока еще без каких-либо точек
_myCurve = pane.AddCurve(string.Format("{0} ({1})",name,measure), _dataPointList, color, sType);
}
开发者ID:Kelvin312,项目名称:KantVino,代码行数:7,代码来源:SingleGraph.cs
示例19: Form1_Load
private void Form1_Load(object sender, EventArgs e)
{
// set your pane
myPane = zedGraphControl1.GraphPane;
// set a title
myPane.Title.Text = "This is an example!";
// set X and Y axis titles
myPane.XAxis.Title.Text = "X Axis";
myPane.YAxis.Title.Text = "Y Axis";
// ---- CURVE ONE ----
// draw a sin curve
for (int i = 0; i < 100; i++)
{
listPointsOne.Add(i, Math.Sin(i));
}
// set lineitem to list of points
myCurveOne = myPane.AddCurve(null, listPointsOne, Color.Black, SymbolType.Circle);
// ---------------------
// ---- CURVE TWO ----
listPointsTwo.Add(10, 50);
listPointsTwo.Add(50, 50);
// set lineitem to list of points
myCurveTwo = myPane.AddCurve(null, listPointsTwo, Color.Blue, SymbolType.None);
myCurveTwo.Line.Width = 5;
// ---------------------
// delegate to draw
zedGraphControl1.AxisChange();
}
开发者ID:fpgentil,项目名称:ZedGraphApp,代码行数:35,代码来源:Form1.cs
示例20: IXAccelHome
public IXAccelHome()
{
InitializeComponent();
graphXIndex = 0;
accelData = new List<Int16>();
zedGraphDataList = new NoDupePointList();
/*for (double i = 0; i < 36; i++)
{
double x = i * 10.0 + 50.0;
double y = Math.Sin(i * Math.PI / 15.0) * 16.0;
zedGraphDataList.Add(x, y);
}*/
zedGraphCurve = ZedGraphFrontPage.GraphPane.AddCurve("AccelData", zedGraphDataList, Color.Red);
zedGraphCurve.Line.Width = 1.5F;
zedGraphCurve.Symbol.Fill = new Fill(Color.White);
zedGraphCurve.Symbol.Size = 5;
zedGraphCurve.Label.IsVisible = false;
ZedGraphFrontPage.GraphPane.YAxis.Scale.Min = -4096;
ZedGraphFrontPage.GraphPane.YAxis.Scale.Max = 4096;
ZedGraphFrontPage.GraphPane.XAxis.Scale.Min = 0;
ZedGraphFrontPage.GraphPane.XAxis.Scale.Max = 500000;
ZedGraphFrontPage.AxisChange();
Refresh();
}
开发者ID:Zordonia,项目名称:AdvisIXAccel,代码行数:27,代码来源:IXAccelHome.cs
注:本文中的ZedGraph.LineItem类示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献 |
请发表评论