A plot space using a two-dimensional cartesian coordinate system.The xRange and yRange determine the mapping between data coordinates and the screen coordinates in the plot area. The "end" of a range is the location plus its length. Note that the length of a plot range can be negative, so the end point can have a lesser value than the starting location.The global ranges constrain the values of the xRange and yRange . Whenever the global range is set (non-nil), the corresponding plot range will be adjusted so that it fits in the global range. When a new range is set to the plot range, it will be adjusted as needed to fit in the global range. This is useful for constraining scrolling, for instance.Example codes:
CPTXYPlotSpace *plotSpace = (CPTXYPlotSpace *) graph.defaultPlotSpace; plotSpace.xRange = [CPTPlotRange plotRangeWithLocation:CPTDecimalFromFloat(xMin) length:CPTDecimalFromFloat(xMax)]; plotSpace.yRange = [CPTPlotRange plotRangeWithLocation:CPTDecimalFromFloat(yMin) length:CPTDecimalFromFloat(yMax)];
Comments
Post a Comment