コアプロットを使用してグラフをプロットしています。プロット領域にグラフをプロットしようとしていますが、白い背景が含まれています。しかし私は自分自身の背景でグラフをプロットしたい。これは私のコードです。上記のコードでグラフ内のCorePlotのプロット領域をカスタマイズする方法
// setting frame of graph
CGRect frame = [self.hostingView bounds];
self.graph = [[[CPTXYGraph alloc] initWithFrame:frame] autorelease];
// Add some padding to the graph, with more at the bottom for axis labels.
self.graph.plotAreaFrame.paddingTop = 10.0f;
self.graph.plotAreaFrame.paddingRight = 10.0f;
self.graph.plotAreaFrame.paddingBottom = 25.0f;
self.graph.plotAreaFrame.paddingLeft = 30.0f;
// set background color of plot area by fill property and CPTColor
self.graph.plotAreaFrame.plotArea.fill=[(CPTFill *)[CPTFill alloc] initWithColor: [CPTColor colorWithComponentRed:0.8 green:0.8 blue:0.8 alpha:1.0]];
// add graph to hosting view by hostedGraph property of hostingView
self.hostingView.hostedGraph = self.graph;
Iは、色を変更しようとしたが、私は、Y軸上の各目盛りの水平方向の点線を描きたいです。
プロット領域の塗りつぶしについて(あなたが動作するはず持っているもの)やグリッド線についての質問ですか? –
ねえ!エリック私は、y軸上の各目盛りに水平の点線を描きたい。 –