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

  • SEARCH
  • Home
  • 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 6777551
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T16:09:41+00:00 2026-05-26T16:09:41+00:00

i use coreplot library 0.9 in my iPad application. Here, i use a scatter

  • 0

i use coreplot library 0.9 in my iPad application.
Here, i use a scatter plot with a fixed y-range (no scrolling in y direction), i.e. plot space range = global range (see source code below).
When new data is available (MOC observation) i add data to plot’s data array (scatter plot), determine the new y-range required (min/max value in data array) and reload the whole plot.
If the value of the new data is greater than the other values, the plot displays it out of bounds although the plot space has been adapted to the new range.

But:
If the MOC change is not due to inserting new data (bigger than the old ones) but instead due to deleting data (which had the biggest value in plot data array), the result is perfect: The plot uses the full range –> range adaption (decreasing plot space range) takes place. Why does this not work in the other direction (increasing plot space range), too?

I am really stuck here and would be glad if someone could help me with that. Thanks.

-(void) mocChangeNotification:(NSNotification *)notification
{
    ...
    [self performSelectorOnMainThread:@selector(refresh) withObject:nil waitUntilDone:NO];  
}

- (void) setYAxisValueRange
{
    ...
    myOwnPlotSpace.yRange = [CPTPlotRange plotRangeWithLocation:CPTDecimalFromFloat(minDisplay)
                                                         length:CPTDecimalFromFloat(maxDisplay)];
    // disable "scrolling" in y-direction
    myOwnPlotSpace.globalYRange = myOwnPlotSpace.yRange;
}

- (void) refresh
{
    [dataForPlot removeAllObjects];
    [self preparePlotData]; // put data into plot's data array
    [self setYAxisValueRange]; // looks for min / max values in data
    [myPlot reloadData];
}

These screenshots show the situation (since i am new to Stack Overflow, i am not yet allowed to post pictures): http://gallery.me.com/timoseeberger#100038&view=grid&bgcolor=black&sel=5

1) Initial display of plot (everything is fine):
file: screenshot_graph_initial

2) I add new value (200) to plot –> display out of bounds (upper end)
file: screenshot_graph_adding200

3) I remove values 200 and 150 from plot –> plot display adapts perfectly
file: screenshot_graph_deleting150

4) I add new value (40) to plot –> display out of bounds (lower end)
file: screenshot_graph_adding40

  • 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-26T16:09:41+00:00Added an answer on May 26, 2026 at 4:09 pm

    Plot ranges have a starting location and length. Your location is ok; use maxDisplay - minDisplay for the length.

    Make sure that your plot uses the plot space that you’re updating:

    [graph addPlot:myPlot toPlotSpace:myOwnPlotSpace];
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm currently trying to use the core-plot library to graph some data I get
I have trouble with using the Core-Plot library in MonoTouch. I use this as
I want to use core-plot for drawing line graph dynamically. data won't come at
Use case: 3rd party application wants to programatically monitor a text file being generated
I need to use core plot in my iphone app. Where do I get
Use of java.net.URLConnection is asked about pretty often here, and the Oracle tutorial is
Can anyone point me to an example that uses core plot library to draw
Has anyone managed to use core-plot from wax? I have been trying recently, but
I am trying to use core-plot and I followed the instruction from the following
I am using CorePlot to draw different graphs in my application. Then, I would

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.