开发者

two x axes in the same graph?

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..

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜