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 589217
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 13, 20262026-05-13T15:24:02+00:00 2026-05-13T15:24:02+00:00

I’m using core plot to create a small plot in one of my view

  • 0

I’m using core plot to create a small plot in one of my view controllers. I have been pulling my hair out trying to track down this error. I install on the simulator and it works fine but as soon as I put it on my device I get the following error:

2010-02-04 22:15:37.394 Achieve[127:207] *** -[NSCFString drawAtPoint:withTextStyle:inContext:]: unrecognized selector sent to instance 0x108530
2010-02-04 22:15:37.411 Achieve[127:207] *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '*** -[NSCFString drawAtPoint:withTextStyle:inContext:]: unrecognized selector sent to instance 0x108530'
2010-02-04 22:15:37.427 Achieve[127:207] Stack: (
    843263261,
    825818644,
    843267069,
    842763033,
    842725440,
    253481,
    208187,
    823956912,
    823956516,
    823956336,
    823953488,
    823952500,
    823985628,
    842717233,
    843010887,
    843009055,
    860901832,
    843738160,
    843731504,
    8797,
    8692
)
terminate called after throwing an instance of 'NSException'
Program received signal:  “SIGABRT”.

Debugger Output (as requested):

#0  0x33b3db2c in __kill
#1  0x33b3db20 in kill
#2  0x33b3db14 in raise
#3  0x33b54e3a in abort
#4  0x33c5c398 in __gnu_cxx::__verbose_terminate_handler
#5  0x313918a0 in _objc_terminate
#6  0x33c59a8c in __cxxabiv1::__terminate
#7  0x33c59b04 in std::terminate
#8  0x33c59c2c in __cxa_throw
#9  0x3138fe5c in objc_exception_throw
#10 0x32433bfc in -[NSObject doesNotRecognizeSelector:]
#11 0x323b8b18 in ___forwarding___
#12 0x323af840 in __forwarding_prep_0___
#13 0x0003de28 in -[CPTextLayer renderAsVectorInContext:] at
CPTextLayer.m:117
#14 0x00032d3a in -[CPLayer drawInContext:] at CPLayer.m:146
#15 0x311c95b0 in -[CALayer _display]
#16 0x311c9424 in -[CALayer display]
#17 0x311c9370 in CALayerDisplayIfNeeded
#18 0x311c8850 in CA::Context::commit_transaction
#19 0x311c8474 in CA::Transaction::commit
#20 0x311d05dc in CA::Transaction::observer_callback
#21 0x323ad830 in __CFRunLoopDoObservers
#22 0x323f5346 in CFRunLoopRunSpecific
#23 0x323f4c1e in CFRunLoopRunInMode
#24 0x335051c8 in GSEventRunModal
#25 0x324a6c30 in -[UIApplication _run]
#26 0x324a5230 in UIApplicationMain
#27 0x0000225c in main at main.m:14

Here is my viewDidLoad method:

- (void)viewDidLoad 
{
    [super viewDidLoad];
    self.view.backgroundColor = [[UIColor alloc] initWithPatternImage:[UIImage imageNamed:@"bg.png"]];
    [self loadData];

    self.graph = [[CPXYGraph alloc] initWithFrame: self.plotView.frame];

    CPLayerHostingView *hostingView = self.plotView;
    hostingView.hostedLayer = graph;
    graph.paddingLeft = 50;
    graph.paddingTop = 10;
    graph.paddingRight = 10;
    graph.paddingBottom = 10;

    percentFormatter = [[NSNumberFormatter alloc] init];
    [percentFormatter setPercentSymbol:@"%"];
    [percentFormatter setNumberStyle:NSNumberFormatterPercentStyle];
    [percentFormatter setLocale: [NSLocale currentLocale]];
    [percentFormatter setMultiplier:[NSNumber numberWithInt:1]];
    [percentFormatter setMaximumFractionDigits:0];

    CPXYPlotSpace *plotSpace = (CPXYPlotSpace *)graph.defaultPlotSpace;

    plotSpace.xRange = [CPPlotRange plotRangeWithLocation:CPDecimalFromFloat(0)
                                                   length:CPDecimalFromFloat(maxX)];
    plotSpace.yRange = [CPPlotRange plotRangeWithLocation:CPDecimalFromFloat(minY) 
                                                   length:CPDecimalFromFloat(maxY-minY)];

    CPLineStyle *lineStyle = [[CPLineStyle lineStyle]retain];
    lineStyle.lineColor = [CPColor grayColor];
    lineStyle.lineWidth = 1.0f;

    CPTextStyle *whiteText = [CPTextStyle textStyle];
    whiteText.color = [CPColor whiteColor];    

    CPXYAxisSet *axisSet = (CPXYAxisSet *)graph.axisSet;

    //  axisSet.xAxis.majorIntervalLength = [[NSDecimalNumber decimalNumberWithString:@"0"]decimalValue];
    axisSet.xAxis.minorTicksPerInterval = 0;
    axisSet.xAxis.majorTickLineStyle = nil;
    axisSet.xAxis.minorTickLineStyle = nil;
    axisSet.xAxis.axisLineStyle = lineStyle;
    axisSet.xAxis.minorTickLength = 0;
    axisSet.xAxis.majorTickLength = 0;
    axisSet.xAxis.labelFormatter = nil;
    axisSet.xAxis.labelTextStyle = nil;

    axisSet.yAxis.majorIntervalLength = [[NSDecimalNumber decimalNumberWithString:intY]decimalValue];
    axisSet.yAxis.minorTicksPerInterval = 5;
    axisSet.yAxis.majorTickLineStyle = lineStyle;
    axisSet.yAxis.minorTickLineStyle = lineStyle;
    axisSet.yAxis.axisLineStyle = lineStyle;
    axisSet.yAxis.minorTickLength = 2.0f;
    axisSet.yAxis.majorTickLength = 4.0f;
    axisSet.yAxis.labelFormatter = percentFormatter;
    axisSet.yAxis.labelTextStyle = whiteText;

    CPScatterPlot *xSquaredPlot = [[[CPScatterPlot alloc]initWithFrame:graph.defaultPlotSpace.graph.bounds] autorelease];
    xSquaredPlot.identifier = @"Plot";
    xSquaredPlot.dataLineStyle.lineWidth = 4.0f;
    xSquaredPlot.dataLineStyle.lineColor = [CPColor yellowColor];
    xSquaredPlot.dataSource = self;
    [graph addPlot:xSquaredPlot];

}

Any help would be appreciated!

  • 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-13T15:24:02+00:00Added an answer on May 13, 2026 at 3:24 pm

    Add to you project the framework/ iPhoneOnly directory from the CorePlot source tree.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Ask A Question

Stats

  • Questions 365k
  • Answers 365k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • Editorial Team
    Editorial Team added an answer You can use the data in the /proc filesystem to… May 14, 2026 at 3:57 pm
  • Editorial Team
    Editorial Team added an answer Do you still get the error when you use a… May 14, 2026 at 3:57 pm
  • Editorial Team
    Editorial Team added an answer You can use array_chunk to create a single array comprised… May 14, 2026 at 3:57 pm

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

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.