Skip to content

Instantly share code, notes, and snippets.

@prabakarviji
Created May 1, 2020 19:18
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save prabakarviji/7f50ba879189037780e8a81f318e415c to your computer and use it in GitHub Desktop.
Save prabakarviji/7f50ba879189037780e8a81f318e415c to your computer and use it in GitHub Desktop.
// Set plot space
let xMin = 0.0
let xMax = 100.0
let yMin = 65.0
let yMax = 95.0
guard let plotSpace = graph.defaultPlotSpace as? CPTXYPlotSpace else { return }
plotSpace.xRange = CPTPlotRange(locationDecimal: CPTDecimalFromDouble(xMin), lengthDecimal: CPTDecimalFromDouble(xMax - xMin))
plotSpace.yRange = CPTPlotRange(locationDecimal: CPTDecimalFromDouble(yMin), lengthDecimal: CPTDecimalFromDouble(yMax - yMin))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment