Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6111765
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T14:40:05+00:00 2026-05-23T14:40:05+00:00

I am working in a graph using the great framework core-plot (in desktop OSX).

  • 0

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.

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:

// 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];

Thanks for your help

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-23T14:40:06+00:00Added an answer on May 23, 2026 at 2:40 pm

    Well, I would say that you need to change the location of the annotation every time the graph is resized. I don’t think Core-Plot can do that for you.
    Retrieve the annotation, and modify its content layer’s frame:

    CPAnnotation *annot = [self.graph.annotations objectAtIndex:0];
    annot.contentLayer.frame = CGRectMake(newXCoord, newYCoord, logoWidth, logoHeight);
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am working on creating a contour plot using Matplotlib. I have all of
I tried to grab my Facebook ID using open graph API. It is working
I'm working on a personal project using WPF with Entity Framework and Self Tracking
HI all, I'm working on line graph. I'm able to draw line graph perfectly.
I am working on finishing up a graph generated using ggplot2 like so... ggplot(timeSeries,
I am working with Azure Table storage using the .NET API (TableServiceContext, WCF Data
i currently have highcharts realtime graph working on a browser (e.g. http://www.highcharts.com/demo/dynamic-update ), but
Picture posting NOT working with Facebook Graph API The message is posted but the
I have a working flot graph, showing dynamically from sql using ajax. My problem
I am working on a graph in WPF, in each section there are thousands

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.