0

标题

我正在使用 CorePlot 库来绘制散点图。当我使用自定义框架创建 CPTXYGraph 和 CPTGraphHostingView 实例时,图形显示为实际图形的镜像(即以还原方式)。谁能告诉我,我在哪里做错了。请帮忙。这是我的代码:

graph = [[CPTXYGraph alloc] initWithFrame:CGRectMake(0, 0, 320, 300)];
CPTTheme *theme = [CPTTheme themeNamed:kCPTDarkGradientTheme];
[graph applyTheme:theme];
CPTGraphHostingView *hostingView = [[CPTGraphHostingView alloc] initWithFrame:CGRectMake(0, 0, 320, 300)];

[self.view addSubview:hostingView];

hostingView.collapsesLayers = NO; 
hostingView.hostedGraph = graph;
4

1 回答 1

0

您的核心情节代码看起来不错。确保self.view没有应用任何可能会翻转图形的变换和/或子视图变换。

于 2011-12-07T03:23:25.567 回答