1
我下面的生成代碼散點圖點:我需要顯示的X和Y軸的主要和次要線和散點圖顯示核心,情節
- (void)viewDidLoad
{
[super viewDidLoad];
[self generateDataSamples];
CPTGraphHostingView *hostingview=[[CPTGraphHostingView alloc] initWithFrame:self.view.bounds];
[self.view addSubview:hostingview];
graph=[[CPTXYGraph alloc] initWithFrame:self.view.bounds];
hostingview.hostedGraph =graph;
CPTScatterPlot *datasourceLinePlot =[[CPTScatterPlot alloc] init];
datasourceLinePlot.dataSource =self;
[graph addPlot:datasourceLinePlot];
[datasourceLinePlot release];
[graph release];
[hostingview release];
}
輸出如下:
但是,我需要爲x和yaxis顯示majorline和minorline ...!
像這樣y-0.5,1.0,1.5 ....!和x-0.5,1.0,1.5 ...!
我要輸出如下圖:
任何一個與我幫助....!
謝謝......!