如何使用核心图绘制同一图表中的两个x轴?
答案 0 :(得分:0)
CPXYAxis *topX = [[[CPXYAxis alloc] init] autorelease];
CPXYAxis *bottomX = [[[CPXYAxis alloc] init] autorelease];
CPXYAxis *y = [[[CPXYAxis alloc] init] autorelease];
topX.coordinate = CPCoordinateX;
bottomX.coordinate = CPCoordinateX;
y.coordinate = CPCoordinateY;
CPAxisSet *axisSet = [[[CPAxisSet alloc] init] autorelease];
axisSet.axes = [NSArray arrayWithObjects:topX,bottomX,y,nil];
graph.axisSet = axisSet;
您可能需要多个绘图空间,每个都在x轴上。CPTestApp示例创建多个y轴,这将帮助您..希望这有助于..