2012-01-07 18 views

答えて

1

ちょうど初期ではxrangeとyrangeの設定//オフセット:

CPTXYPlotSpace *plotSpace = (CPTXYPlotSpace *)graph.defaultPlotSpace; 

/* Range which is visible on screen */ 

plotSpace.xRange = [CPTPlotRange plotRangeWithLocation:CPTDecimalFromFloat(offset) 
               length:CPTDecimalFromFloat(X_LENGTH)]; 
plotSpace.yRange = [CPTPlotRange plotRangeWithLocation:CPTDecimalFromFloat(offset_Y) 
               length:CPTDecimalFromFloat(Y_LENGTH)]; 


/* Total Range which is visible on screen and can be scrolled up to */ 

CPTPlotRange *globalYRange = [CPTPlotRange plotRangeWithLocation:CPTDecimalFromDouble(0) length:CPTDecimalFromDouble(Y_LENGTH)]; 
plotSpace.globalYRange = globalYRange; 

CPTPlotRange *globalXRange = [CPTPlotRange plotRangeWithLocation:CPTDecimalFromDouble(0) length:CPTDecimalFromDouble(xRange)]; 
plotSpace.globalXRange = globalXRange; 

/*制約をXとY軸*/

CPTXYAxisSet *axisSet = (CPTXYAxisSet *)graph.axisSet; 
axisSet.xAxis.axisConstraints = [CPTConstraints constraintWithLowerOffset:55.0]; 
axisSet.yAxis.axisConstraints = [CPTConstraints constraintWithLowerOffset:0.0]; 
関連する問題