开发者

two x axes in the same graph?

开发者 https://www.devze.com 2023-03-03 21:36 出处:网络
How to dra开发者_如何学运维w two x axes in the same graph when drawing with core-plot? CPXYAxis *topX = [[[CPXYAxis alloc] init] autorelease];

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

精彩评论

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

关注公众号