I have a graph and I wan't that the x
and the 2 y
to start at 1 not 0.
![enter image description here][1]
This is how i setup the plotspaces:
//plotspace 1
var plotSpace: CPTXYPlotSpace = graph.defaultPlotSpace as CPTXYPlotSpace
var xRange = plotSpace.xRange.mutableCopy() as CPTMutablePlotRange
var yRange = plotSpace.yRange.mutableCopy() as CPTMutablePlotRange
xRange.length = self.maxX
yRange.length = maxPoids
plotSpace.xRange = xRange
plotSpace.yRange = yRange
//plotspace2 (second y)
var plotSpace2: CPTXYPlotSpace = CPTXYPlotSpace()
var xRange2 = plotSpace2.xRange.mutableCopy() as CPTMutablePlotRange
var yRange2 = plotSpace2.yRange.mutableCopy() as CPTMutablePlotRange
xRange2.length = self.maxX
yRange2.length = maxEau
plotSpace2.xRange = xRange2
plotSpace2.yRange = yRange2
graph.addPlotSpace(plotSpace2)
How can I do that?