合計テスト数のy軸と
時間のx軸があります
以下は、プロットに使用しているコードです。
- (NSUInteger)numberOfRecordsForPlot:(CPPlot *)plot {
NSUInteger recordplot;
if (plot.identifier == @"Plot Error")
{
recordplot = [HourErroroArray count];
recordplot--;
}
return recordplot;
}
- (NSNumber *)numberForPlot:(CPPlot *)plot field:(NSUInteger)fieldEnum recordIndex:(NSUInteger)index {
NSDecimalNumber *num = nil;
int eTemp1;
int eHour1;
int eMin1;
int eSec1;
// Number of the X axis asked
if (fieldEnum == CPScatterPlotFieldX)
{
if (plot.identifier == @"Plot Error")
{
eHour1=[[HourErroroArray objectAtIndex:index]intValue ];
eMin1=[[MinErrorArray objectAtIndex:index]intValue ];
eSec1=[[SecErrorArray objectAtIndex:index]intValue ];
eTemp1=eHour1*eMin1*eSec1;
num = (NSDecimalNumber *)[NSDecimalNumber numberWithInt:eTemp1];
}
}
// Number of the Y axis asked
else if (fieldEnum == CPScatterPlotFieldY)
{
if (plot.identifier == @"Plot Error")
{
num = (NSDecimalNumber *)[NSNumber numberWithInteger:index];
}
}
return num;
}
グラフがプロットされているのがわかりますが、x 軸に平行な直線のみです。
!->y 軸、_ ->x 軸、および . ->線は値をプロットしています
Y軸 ! ! ! ………… ! ______________ x 軸
しかし、私は次のようなものが欲しいです:
http://www.buggyprogrammer.co.uk/2010/10/03/using-core-plot-to-draw-line-graphs/
上下の線ではないかもしれませんが、少なくともある程度の角度があります。