title: Core-Plot: Annotation Position
body: <p>I am working in a graph using the great framework core-plot (in desktop OSX).
  Up to know, i've managed to draw the table properly, but i am having a problem with an annotation.</p>
  
  <p>I need to add an image annotation in the top-center position of the graph (not the plotting area). I've managed to position the annotation there at startup, but whenever i resize the window, the graph resizes, but the annotation keeps the initial position and don't move any more to the top-center position of the graph.
  I am doing something like this:</p>
  
  <pre><code>// This layer will be the annotation Content
        CPBorderedLayer * logoLayer = [[(CPBorderedLayer *)[CPBorderedLayer alloc] 
                          initWithFrame:   CGRectMake(xMiddle, yTop, logoWidth,
       logoHeight)      ] autorelease];
  
              CPFill *fillImage = [CPFill fillWithImage:imgLogo];
              logoLayer.fill = fillImage;
  
  // Create a new annotation
              CPAnnotation *annot = [[CPAnnotation alloc]init];
              annot.contentLayer = logoLayer;
              annot.displacement = CGPointMake(50,50);
  
     // graph is my CPXYGraph instance
     // Add annotation to the graph     
  [graph addAnnotation:annot];
  </code></pre>
  
  <p>Thanks for your help</p>