title: OBJ-C: Core-Plot XY-Axis Fixing
body: <p>I want to fix the axes so that they are always to the left hand side and bottom of my plot space. My current implementation is not enabling userInteraction so no need to worry about scrolling.</p>
  
  <pre><code>// Setup plot space
  CPXYPlotSpace *plotSpace = (CPXYPlotSpace *)graph.defaultPlotSpace;
  plotSpace.allowsUserInteraction = NO;
  
  // Axes
  CPXYAxisSet *axisSet = (CPXYAxisSet *)graph.axisSet;
  CPXYAxis *x = axisSet.xAxis;
  //x.majorIntervalLength = CPDecimalFromString(@"0.5");
  x.orthogonalCoordinateDecimal = CPDecimalFromString(@"0.5");
  x.minorTicksPerInterval = 0;
  x.labelingPolicy = CPAxisLabelingPolicyAutomatic;
  
  CPXYAxis *y = axisSet.yAxis;
  //y.majorIntervalLength = CPDecimalFromString(@"0.5");
  y.minorTicksPerInterval = 0;
  y.orthogonalCoordinateDecimal = CPDecimalFromString(@"0");
  y.labelingPolicy = CPAxisLabelingPolicyAutomatic;
  </code></pre>
  
  <p>...</p>
  
  <pre><code>//Auto scale the plot space to fit the data
  [plotSpace scaleToFitPlots:[NSArray arrayWithObject:boundLinePlot]];
  CPPlotRange *xRange = plotSpace.xRange;
  [xRange expandRangeByFactor:CPDecimalFromDouble(1.25)];
  plotSpace.xRange = xRange;
  CPPlotRange *yRange = plotSpace.yRange;
  [yRange expandRangeByFactor:CPDecimalFromDouble(1.1)];
  plotSpace.yRange = yRange;
  </code></pre>
  
  <p>Edit:
  I want to figure out how to fix my x-axis and y-axis to the bottom of the plot and left-hand side of the plot respectively. I don't have a SS but I basically want to display a graph with axes that are fixed in a predetermined position. Alternatively, is there a way to remove the x-axis altogether so I can just have a y-axis? If so, it is much easier to lock the y-axis in a fixed position.</p>