I have added two bar graphs with a barOffset so that both bar graphs show side-by-side.
I also want to add two scatter plots using the same data with each scatter graph touching the tip of the each bar graphs respectively.
Here is how i added the two scatter graphs.
//Add line graph 1
CPTScatterPlot *dataSourceLinePlot = [[[CPTScatterPlot alloc] init] autorelease];
dataSourceLinePlot.identifier = @"Scatter-Plot-1";
CPTMutableLineStyle *lineStyle = [[dataSourceLinePlot.dataLineStyle mutableCopy] autorelease];
lineStyle.miterLimit = 1.0f;
lineStyle.lineWidth = 3.0f;
lineStyle.lineColor = [CPTColor orangeColor];
dataSourceLinePlot.dataLineStyle = lineStyle;
dataSourceLinePlot.dataSource = self;
[graph addPlot:dataSourceLinePlot toPlotSpace:barPlotSpace];
//Add line graph 2
CPTScatterPlot *dataSourceLinePlot2 = [[[CPTScatterPlot alloc] init] autorelease];
dataSourceLinePlot2.identifier = @"Scatter-Plot-2";
CPTMutableLineStyle *lineStyle2 = [[dataSourceLinePlot.dataLineStyle mutableCopy] autorelease];
lineStyle2.miterLimit = 1.0f;
lineStyle2.lineWidth = 3.0f;
lineStyle2.lineColor = [CPTColor greenColor];
dataSourceLinePlot2.dataLineStyle = lineStyle2;
dataSourceLinePlot2.dataSource = self;
[graph addPlot:dataSourceLinePlot2 toPlotSpace:barPlotSpace];
But now both scatter graphs start from first bargraph tip itself when datavalue is same
I want each of them touching only bargraph tip.
How can i do that? Is there something barOffset kind of thing for scatter to move it?
I implemented the delegates correctly and data shows up correctly too