How to dra开发者_如何学运维w two x axes in the same graph when drawing with core-plot?
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;
You might need multiple plot spaces, each of on x axis..CPTestApp example creates multiple y axis, which will help you..Hope this helps..
精彩评论