My favorites | Sign in
Project Home Downloads Wiki Issues Source
Search
for
UsingCorePlotInApplications  
Instructions for using Core Plot in your OS X or iPhone/iPod Touch application
Phase-Implementation
Updated Nov 1, 2011 by waupacalarson@gmail.com

Using Core Plot Within an Application

Core Plot works on both Mac and iPhone / iPod touch. The framework must be integrated into a project in different ways for each platform.

Mac Application

Core Plot on the Mac is a standard framework. After pulling down the latest source code for the framework, there are only a few steps required to insert it into one of your projects.

First, you will want to make sure that Core Plot is compiled alongside your application, so drag the CorePlot.xcodeproj bundle into your application's Xcode project (without copying the file). Then go to the Targets tab in Xcode, select your application's target, and bring up the inspector. Go to the General settings page and add the CorePlot framework from CorePlot.xcodeproj as a direct dependency.

The framework will need to be copied into your app bundle, so add a new build phase to your application's target by Ctrl-clicking on it and selecting Add | New Build Phase | New Copy Files Build Phase. Within the inspector that appears, change the destination to Frameworks. Drag CorePlot.framework from within the CorePlot.xcodeproj group into this build phase.

To link Core Plot to your target application, drag CorePlot.framework from inside the CorePlot.xcodeproj group into the Link Binary with Libraries build phase in your app's target.

Because Core Plot is based on Core Animation, you need to add the QuartzCore framework to your application project as well.

To import all of the Core Plot classes and data types, add the following to the appropriate source files within your project:

#import <CorePlot/CorePlot.h>

iPhone, iPod Touch, and/or iPad Application

Dependent Project Install

Because frameworks cannot be used in Cocoa Touch applications in the same way as on the Mac, the means of including Core Plot within an iPhone application are slightly different.

First, drag the CorePlot-CocoaTouch.xcodeproj file into your iPhone application's Xcode project. Show the project navigator in the left-hand list and click on your project.

Select your application target from under the "Targets" source list that appears. Click on the "Build Phases" tab and expand the "Target Dependencies" group. Click on the plus button, select the CorePlot-CocoaTouch library, and click Add. This should ensure that the Core Plot library will be built with your application.

Core Plot is built as a static library for iPhone, so you'll need to drag the libCorePlot-CocoaTouch.a static library from under the CorePlot-CocoaTouch.xcodeproj group to the "Link Binaries With Libraries" group within the application target's "Build Phases" group you were just in.

You'll also need to point to the right header location. Under your Build settings, set the Header Search Paths to the relative path from your application to the framework/ subdirectory within the Core Plot source tree. Make sure to make this header search path recursive. You need to add -ObjC to Other Linker Flags as well (as of Xcode 4.2, -all_load does not seem to be needed, but it may be required for older Xcode versions).

Core Plot is based on Core Animation, so if you haven't already, add the QuartzCore framework to your application project.

Finally, you should be able to import all of the Core Plot classes and data types by inserting the following line in the appropriate source files within your project:

#import "CorePlot-CocoaTouch.h"

You can see some examples of plot types and features we might want to have in Core Plot at PlotExamples.

Static Library Install

You can also just copy the Core Plot library directly into your project in binary form.

1. Copy the CorePlotHeaders directory to your Xcode project

2. Copy the Core Plot library to your Xcode project.

3. Open your apps Target Build Settings, and for Other Linker Flags include this:

-ObjC

(-all_load used to be required as a linker flag, but this is no longer needed in Xcode 4.2)

4. Add the QuartzCore framework to the project.

5. Change your C/C++ Compiler in the project build settings to LLVM GCC 4.2 or LLVM 1.6.

Comment by ybellava...@gmail.com, Jul 5, 2009

I did all of that but I still got some problems. I had an existing project(I used cocoa user interface tutorial on ADC) and I did all these steps but after the program launches nothing appears and the program is in debug mode. Then after typing Continue in debugger I get exc bad access

Comment by ybellava...@gmail.com, Jul 5, 2009

this is the comment i posted on a website that offered a tutorial: 07/05/2009 - 20:09

Theres a problem with the build. coreplot.h uses wrong folder directory for its includes (the folder is source and it writes CorePlot?) Also, when I build and go the app stops in debug mode and I get EXC_BAD_ACCESS. It may be due to the app I put it in. I had a project already started it is a cocoa app I made with the apple tutorial and it had a main already would that generate the error?. It would be nice to show what kind of project to start it in if its better to start with a new project and maybe to specify what to do with the main.

reply
ybellavance@gmail.com 07/05/2009 - 20:23

I also had to transfer some files from the iphoneOnly folder to the Source folder

Comment by nik.bu...@gmail.com, Jul 8, 2009

File /Users/me/core-plot-read-only/framework/build/Debug-iphonesimulator/libCorePlot-CocoaTouch?.a depends on itself. This target might include its own product. ??? any help appreciated

I can't figure this one out

Comment by morris.c...@gmail.com, Jul 16, 2009

Having a problem running an application on an actual device. Core Plot works great in the simulator. Anyone else having this problem?

Comment by lip...@gmail.com, Jul 17, 2009

Having problem running on actual device as well. Getting the exception related to "isGreaterThanOrEqualTo:?: unrecognised selector". Managed to fix it in the CorePlot?-CocoaTouch? but it gives the next error "NSCFNumber decimalNumber:]: unrecognised selector... and then sizeWithStyle:?... it seems somehow the selectors created in the lib were not recognised when in device mode.

Comment by lars.lae...@gmail.com, Jul 31, 2009

Having the same problem with latest Code:

<Error>: Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: ' -isGreaterThanOrEqualTo:?: unrecognized selector sent to instance 0x101640'

Comment by lars.lae...@gmail.com, Jul 31, 2009

Sorry, Problem solved. I forgot the Linker Flag -all_load

In the Tutorial i used, this flag was not given: http://www.switchonthecode.com/tutorials/using-core-plot-in-an-iphone-application

But above in the docu, everything is written ok and it works!

Comment by ErikCJor...@gmail.com, Aug 19, 2009

When performing the step "Within the Build settings, add the path to the Core Plot frameworks to the Framework Search Paths," above, be sure to set it up recursively in order to get the compiler to find the header files properly. For example, it should look something like:

/Users/me/Documents/workspace/core-plot/framework//**
Comment by pasquale...@gmail.com, Nov 6, 2009

When I try to compile the eexample project Xcode eturn the error: ld: library not found for -lcrt1.10.6.o Any idea ?

Comment by superpa...@gmail.com, Dec 31, 2009

Does it just work for iPhone SDK 2.2.1? I can't compile this in SDK 3.0.

Comment by project member drewmcco...@mac.com, Dec 31, 2009

It should work for 3.0. We test in 3.0 everyday. What is the issue?

Comment by jervilla...@gmail.com, Jan 11, 2010

Have you guys encountered an error like this one error:redefinition of typeDef 'CPNativeImage'

the caller lies from CPAxis.h>CPLayer

Have checked all the settings and seems to be ok but still with no luck.

${DEVELOPER_DIR}/Library/core-plot/framework/ with Recursive enabled

also included the -all_load and -ObjC flags both in Project & Target Settings

Thanks

Comment by jervilla...@gmail.com, Jan 11, 2010

This is what i get from the build transcript


In file included from /Users/Er/Developer/Library/core-plot/framework/Source/CPLayer.h:4,
                 from /Users/Er/Developer/Library/core-plot/framework/Source/CPAxis.h:3,
                 from /Users/Er/Developer/Library/core-plot/framework/CorePlot-CocoaTouch.h:2,
                 from /Users/Er/Petra/iPhone Projects/Bankers Almanac/VERSION1.1/Classes/CorePlotViewController.h:10,
                 from /Users/Er/Petra/iPhone Projects/Bankers Almanac/VERSION1.1/Classes/CorePlotViewController.m:9:
/Users/Er/Developer/Library/core-plot/framework/build/Debug-iphonesimulator/usr/local/include/CPPlatformSpecificDefines.h:5: error: redefinition of typedef 'CPNativeImage'
/Users/Er/Developer/Library/core-plot/framework/iPhoneOnly/CPPlatformSpecificDefines.h:5: error: previous declaration of 'CPNativeImage' was here
Comment by project member drewmcco...@mac.com, Jan 12, 2010

I haven't seen this one. It looks like you have two sets of Core Plot header files. What are the ones in the /usr/local/include directory? Did you install them yourself? Seems that that shouldn't be there: /Users/Er/Developer/Library/core-plot/framework/build/Debug-iphonesimulator/usr/local/include/CPPlatformSpecificDefines.h

Comment by craigwar...@gmail.com, Jan 15, 2010

Guys,

Are there any examples of using the animation features of core-plot?

Comment by project member drewmcco...@mac.com, Jan 17, 2010

I'm afraid there actually aren't any animation features in Core Plot yet. It is planned, but not implemented. Sorry.

Drew

Comment by quique...@gmail.com, Feb 8, 2010

Ive dragged in the coreplot-cocoatouch.xcodeproj file, added the link binary, set up the dependency in target, set up the other link -all_load & -ObjC and the header search files any way you can imagine, recursively, non recursive...and unless i add the /Users/me/core-plot/framework + framework/Source + framework/iPhoneOnly, i cant get under 48 errors when trying to plot the exact same code for scatter plot from the CPTestApp example included in the download folders. The original CPTestApp runs fine, but when i duplicate the code in a new app...

I had to go to Target Settings, and add the 3 folders, framework, Source and iPhoneOnly and uncheck Always Search User Paths to get it to finally work, after a horrible entire day of trial and error...not very user friendly this framework

Comment by mattias....@mac.com, Feb 15, 2010

I've followed the above instructions for a mac application, but I get the error "CorePlot?/CorePlot?.h" file not found on the #import line. Anyone have an idea of why?

Comment by project member drewmcco...@mac.com, Feb 16, 2010

You probably didn't set the path to the framework right. Go to build settings and fill in the path in Framework Search Paths.

Comment by nickbi...@gmail.com, Feb 26, 2010

When I compiled the example code CPTestApp-iPhone and other examples, I got these Internal Error. Anyone know what's going on here ? Please help !!!!

Comment by nickbi...@gmail.com, Feb 26, 2010

Sorry, I didn't mean to flood with those images. I just put in those image links and they are auto shown like that :(

Comment by jens.is.located@gmail.com, Mar 12, 2010

The setup description doesn't work for me on iPhone 3.1.3 with XCode 3.2.1 ! I setup the user header search path to the relative path to "framework" folder. But Xcode can't find "CorePlot?-CocoaTouch?.h" ! Interface Builder won't recognize "CPLayerHostingView" as well.

Comment by mayuresh...@gmail.com, Mar 12, 2010

thank you ,thank you very very much ,i got whaT I NEED ,BIG THANK YOU

Comment by murilo.b...@gmail.com, Mar 14, 2010

Im having the same problem that nickbiznz had.

What I did was to checkout the project and open the testMerge xcode project file and tried to build and run.

After that, I tried the tutorial at http://www.switchonthecode.com/tutorials/using-core-plot-in-an-iphone-application with all tips from the comments and got the same errors.

Im new at xcode and mac development and have no idea how to fix this.

When I try to compile any other Mac or iphone app everything is normal.

Comment by nik.estep, Apr 3, 2010

murilo.belluzzo needs to check the tutorial again. There are more comments that get all of the errors straightenend out.

As a note for the dev team, using the patches in said tutorial, the code base builds and runs successfully in the iPad simulator (CPXYGraph).

Comment by nik.estep, Apr 6, 2010

Does anybody know how to rotate an XY plot? I want to chart something with 0<=x<=365. The y values are not too spread out, so I want to tip the iPhone sideways and view the chart. This would make the x-axis along the side and the y-axis along the bottom of the iPhone.

Comment by project member drewmcco...@mac.com, Apr 6, 2010

Why not just switch your data coordinates? Return your y data for x, and vice versa.

Comment by nik.estep, Apr 15, 2010

There are frequently repeated Y values, so unless I can return an array of y points for one X value, this will not work.

Comment by project member drewmcco...@mac.com, Apr 15, 2010

You don't return an array of y values, you just return the same x value many times, once for each corresponding y value at that x.

Comment by nik.estep, Apr 16, 2010

Then I clearly don't understand how this works. The examples I have seen use numberForPlot:field:recordIndex. What I have seen and played with, this takes an x (record index) and returns a y. I thought this was called by the CorePlot? library and it only called this function for each x and only once per x.

This is becoming an academic exercise I think. I must admit to not knowing much about iPhone programming and I am learning more. I figured out how to make a chart rotate on rotating the device, which is ultimately what I think I want to do. I appreciate your attempt at helping a newbie like me though.

Comment by sn.steve...@gmail.com, Apr 16, 2010

I ran into one problem with the instructions for setting up a Mac program. When I created the Copy Files Build Phase, I dragged CorePlot.framework into the text field under "Frameworks". This didn't work--the framework wasn't copied into the application bundle. Instead, close the window after selecting "Frameworks" and drag CorePlot.framework onto the "Copy Files" item in the Groups & Files list. It will change to "Copy Files (1)".

Comment by project member eskr...@mac.com, Apr 17, 2010

@nik: The plot data is stored in two parallel arrays, one for X and one for Y. The recordIndex is the index into both arrays. The numberForPlot:field:recordIndex method just asks for a value from one of the arrays. The field parameter tells you whether it wants the X or Y value.

Comment by nik.estep, Apr 17, 2010

Ok, so if the data is two parallel arrays and I check field and it is for X, how would I return 3 values for that X? Do I do them one at a time or return them all at once. Also, how do I know that this method would get called three times for X and the same index if I have to return the Ys one at a time?

Comment by project member eskr...@mac.com, Apr 17, 2010

For example:

IndexXY
001
102
203
311
421

In this case, numberOfRecordsForPlot: should return 5. numberForPlot:field:recordIndex: will get called 5 times for X and 5 times for Y.

Comment by nik.estep, Apr 17, 2010

Ok, I really appreciate the help. I have been able to get it to work the way I wanted. This is a great library for the iPhone, excellent work.

Comment by nik.estep, Apr 20, 2010

So I have one more question. Is it possible to insert an empty data point, nil if you will? Here is my logic. I am trying to chart utility meter data for a today. I want the chart to update throughout the day, with a line moving from left to right as the day progresses, but I want the whole day to be visible. If you need to see what I am talking about, the chart that I am trying to reproduce on iPhone can be found here.

Comment by project member drewmcco...@mac.com, Apr 20, 2010

You don't need to insert nil data. Just set the plot range in the CPXYPlotSpace to span the whole day, and have your plots x data points just cover the part of the day that has passed so far. As the day progresses, you just add more data points.

Comment by nik.estep, Apr 20, 2010

Yes, that would make sense. I appreciate the help.

Comment by j2cont...@gmail.com, Apr 20, 2010

Core plot has pretty good support for building Pie Charts. It also supports gradient and custom drawing of pie slices. Here is a very good tutorial on pie chart drawing using core plot - http://www.quickprogrammer.com/articles/pie-chart-drawing-in-iphone-using-core-plot-library.html.

Comment by zghotlawala@gmail.com, Apr 24, 2010

Dear Sir, Well i am new to core plot frame work, so can you please guide how can i download this library. I am keenly interested to develop the line chart and bar charts using this framework. Awaiting for your reply Thanks & Regards Zahur.

--

Comment by project member drewmcco...@mac.com, Apr 24, 2010

There is no official download yet. You have to use mercurial to get the source. Instructions are on the page http://code.google.com/p/core-plot/wiki/UsingMercurial

Comment by zghotlawala@gmail.com, Apr 27, 2010

Thanks for the reply Sir, I am successfully able to implement the Core Plot. Thanks for your guidance. Well the Xaxis & Yaxis values are displayed accurately but the position of those values are after the line of Xaxis and Yaxis. I Got:

|30
Yaxis |20
|10 | |0134
Xaxis

What I Expect:

30|
Yaxis 20|
  1. |
  2. | |
    0 1 2 3
    Xaxis
Please guide me for the same. Thanks & Regards Zahur

Comment by project member eskr...@mac.com, Apr 27, 2010

You can use the CPAxis tickDirection property to control where the labels are positioned relative to the axis.

Comment by asopublic@gmail.com, Apr 29, 2010

@Comment by drewmcco...@mac.com, Feb 16, 2010 You probably didn't set the path to the framework right. Go to build settings and fill in the path in Framework Search Paths.

Could you be a bit more explicit. Is this the Framework Search Path for the Project, or your Project's Target? What do you put in this search path? Drag the framework icon for CorePlot? from your project? Something else?

Comment by zghotlawala@gmail.com, Apr 30, 2010

Sir, i can built the whole project successfully under debug profile, but when i try the same under distribution profile it fire error that

error: CorePlot?-CocoaTouch?.h: No such file or directory
and many other errors related to it. I try to set the Framework Search Path under the distribution profile but still the same errors. Please guide me for the same

Comment by asopublic@gmail.com, Apr 30, 2010

@Comment by asopublic, Yesterday (19 hours ago) @Comment by drewmcco...@mac.com, Feb 16, 2010 You probably didn't set the path to the framework right. Go to build settings and fill in the path in Framework Search Paths.

Could you be a bit more explicit. Is this the Framework Search Path for the Project, or your Project's Target? What do you put in this search path? Drag the framework icon for CorePlot?? from your project? Something else?

I've gotten it to find CorePlot?.h--Read the documentation titled: Embedding a Private Framework in Your Application Bundle in Developer Documentation

Comment by patricks...@gmail.com, May 4, 2010

zghotlawala, you should verify that you set the "Header Search Paths" and "Other Linker Flags" for "All Configurations". There's a dropdown menu under the "Build" tab in the "Project Info". I guess you just entered the mentioned settings for your Distribution Profile.

Comment by zghotlawala@gmail.com, May 12, 2010

Sir, can we pass the NSDate object for X data plot values and NSNumber for the Y data plot values. If yes, can you please guide me how?

Comment by project member drewmcco...@mac.com, May 13, 2010

To see how to use dates on an axis, see the date plot example in the examples folder.

Comment by zghotlawala@gmail.com, May 13, 2010

Sir, I had gone through the date plot example, it really helps me out thanks. Now let say, plotSpace.xRange = plotRangeWithLocation:CPDecimalFromFloat(xLow) length:CPDecimalFromFloat(oneDay*10.0f)?;

plotSpace.yRange = plotRangeWithLocation:CPDecimalFromFloat(1.0) length:CPDecimalFromFloat(3.0)?;
// Axes
CPXYAxisSet axisSet = (CPXYAxisSet )graph.axisSet;
CPXYAxis x = axisSet.xAxis; x.majorIntervalLength = CPDecimalFromFloat(oneDay); x.orthogonalCoordinateDecimal = CPDecimalFromString(@"1"); x.minorTicksPerInterval = 0; NSDateFormatter dateFormatter = [[alloc? init] autorelease]; dateFormatter.dateStyle = kCFDateFormatterShortStyle; CPTimeFormatter timeFormatter = [[alloc? initWithDateFormatter:dateFormatter] autorelease]; timeFormatter.referenceDate = refDate; x.labelFormatter = timeFormatter;

CPXYAxis y = axisSet.yAxis; y.majorIntervalLength = CPDecimalFromString(@"0.5"); y.minorTicksPerInterval = 5; y.orthogonalCoordinateDecimal = CPDecimalFromFloat(oneDay);

/// End of Code snippet Output Got the Y axis values continues till 4.0, Output Required the Y axis values should continue till 3.0 Please guide me where am going wrong. Thanks & Regards

Comment by project member eskr...@mac.com, May 14, 2010

Ranges are given as a starting point and length. Your y range starts at 1 and has a length of 3, which gives it an ending point of 4 (1 + 3). If you only want it to run between 1 and 3, use length = 2.

Comment by zghotlawala@gmail.com, May 14, 2010

Thanks a lot, i got it.

Comment by zghotlawala@gmail.com, May 15, 2010

Sir when i use this below code, to remove the negative range for x & y axis, what i got is, the Xaxis value and Yaxis get hidden. Only the line of both the axis can be seen and its ticker position Code snippet: - (CPPlotRange )plotSpace:(CPPlotSpace )space

willChangePlotRangeTo:(CPPlotRange )newRange
forCoordinate:(CPCoordinate)coordinate {
// Display only Quadrant I: never let the location go negative. // if (newRange.doublePrecisionLocation < 5.0F) {
newRange.location = CPDecimalFromFloat(0.0);
}
// Adjust axis to keep them in view at the left and bottom; // adjust scale-labels to match the scroll. // CPXYAxisSet axisSet = (CPXYAxisSet )graph.axisSet;
if (coordinate == CPCoordinateX) {
axisSet.yAxis.orthogonalCoordinateDecimal = newRange.location;
axisSet.xAxis.titleLocation = CPDecimalFromFloat(newRange.doublePrecisionLocation +(newRange.doublePrecisionLength / 2.0F)); } else {
axisSet.xAxis.orthogonalCoordinateDecimal = newRange.location;
axisSet.yAxis.titleLocation = CPDecimalFromFloat(newRange.doublePrecisionLocation +(newRange.doublePrecisionLength / 2.0F)); }
return newRange;
}

//End of the code i had use the expandRangeByFactor for both of x&y ranges. Please guide me for the same

Please guide me for the same

Comment by zghotlawala@gmail.com, May 20, 2010

Sir, Can you please let me know how can we implement the multi-touch events(two finger events) when the user interaction is set YES.

Comment by project member drewmcco...@mac.com, May 20, 2010

Someone is working on this now. Not in there yet though.

Comment by zghotlawala@gmail.com, May 25, 2010

Sir, is there a way to call a app delegate method from CPGraph.m. Basically i need to call a app delegate method from below method, -(BOOL)pointingDeviceUpEvent:(id)event atPoint:(CGPoint)interactionPoint{}

Please guide me as it fires error when i just import appDelegate.h Error: no such file or directory

Or the way to override this method in my own code

Comment by project member drewmcco...@mac.com, May 25, 2010

The CPGraph does not have a delegate method, but the CPPlotSpace does. Set the delegate of the plot space, and implement the delegate methods.

Comment by zghotlawala@gmail.com, May 26, 2010

Sir, i got the solution to implement pinch and multiple touch events in cplayerhostingView.h

if ([allTouches? count] > 1) {
dot superview touchesEnded:touches withEvent:event?; //mycode return;
}

here this self.superview will call the project ViewController? events. Thus we can handle those events from our own ViewController? class. Thanks & Regards Zahur.

Comment by zghotlawala@gmail.com, May 26, 2010

here dot==self

Comment by maxime.l...@gmail.com, May 28, 2010

Thank you very much for the latest performance improvements and leaks corrections done recently. They have drastically improved the performance of my research app on an iPod touch 2g.

Comment by zghotlawala@gmail.com, Jun 2, 2010

Sir, Is there a way to over ride this defaultPlotSpace. plotSpace = (CPXYPlotSpace )graph.defaultPlotSpace;

Comment by project member drewmcco...@mac.com, Jun 2, 2010

Yes. You can set one or more plot spaces for a graph yourself, and set them up how you want. The default is just a convenience.

Comment by Franklin...@gmail.com, Jun 3, 2010

VERY IMPORTANT: Make the search path recursive as mentioned by ErikCJordan

/Users/me/Documents/workspace/core-plot/framework//

Yes...thats two forward slashes followed by two stars

Comment by Franklin...@gmail.com, Jun 5, 2010

Is there any place where I can find the documentation for the classes?

Comment by project member eskr...@mac.com, Jun 6, 2010

We use Doxygen to build the documentation. See the documentation wiki (http://code.google.com/p/core-plot/wiki/DocumentationPolicy) for details.

Comment by zghotlawala@gmail.com, Jun 9, 2010

Dear Concerned, Currently am developing the line-graph using the core-plot. Well am bit confuse that how to add a tag or label on the particular data-plot point. Here tag stands for additional info regarding that specific data-plot point. Please guide me. Regards Zahur

Comment by zghotlawala@gmail.com, Jun 9, 2010

For more info regarding core-plot Data fields http://florent.clairambault.fr/downloads/iPhone/core-plot-doc/

Comment by hacintom...@gmail.com, Jun 30, 2010

Does core plot work with the new iPhone 4.0 OS?

Comment by project member carbon...@gmail.com, Jun 30, 2010

Yes, It does.

Comment by monikadh...@gmail.com, Jul 20, 2010

how i am able to implement touch event in pie chart.I am trying to do but did,t get success.

Comment by oliver.m...@gmail.com, Jul 21, 2010

I had the same problem as asopublic had above (comment dated April 30th). The instructions for mac projects don't work unless you set the build output directory of the coreplot framework to the same build output directory as your new project. This has to be set in the coreplot framework project settings, not your new project settings. Otherwise trying to include <CorePlot?/CorePlot?.h> fails. Full detail on this (following asopublic's direction) is in the apple docs.

Comment by koritala...@gmail.com, Jul 26, 2010

Hi all,

I am trying to include coreplot framework in my xcode (version 3.2.3), its not setting up correctly its giving many errors strangely in my classes not in coreplot classes. My code worked fine before I included coreplot. coreplot did work just fine in my older laptop with xcode 3.1.4.

Does anyone else faced the same problem?

Comment by koritala...@gmail.com, Jul 26, 2010

Hi all,

I am trying to include coreplot framework in my xcode (version 3.2.3), its not setting up correctly its giving many errors strangely in my classes not in coreplot classes. My code worked fine before I included coreplot. coreplot did work just fine in my older laptop with xcode 3.1.4.

Does anyone else faced the same problem?

Comment by koritala...@gmail.com, Jul 26, 2010

Hi all,

I am trying to include coreplot framework in my xcode (version 3.2.3), its not setting up correctly its giving many errors strangely in my classes not in coreplot classes. My code worked fine before I included coreplot. coreplot did work just fine in my older laptop with xcode 3.1.4.

Does anyone else faced the same problem?

Comment by koritala...@gmail.com, Jul 26, 2010

Hi all,

I am trying to include coreplot framework in my xcode (version 3.2.3), its not setting up correctly its giving many errors strangely in my classes not in coreplot classes. My code worked fine before I included coreplot. coreplot did work just fine in my older laptop with xcode 3.1.4.

Does anyone else faced the same problem?

Comment by chang....@gmail.com, Jul 27, 2010

Hi, I have the same problem while moving an iPhone 3.0 project with old Core-plot to iOS 4.0 with latest Core-Plot. It gives me syntax error in UIView.m when I follow the instructions in README. Is there any instruction for iOS 4.0? My old project works just fine but I am having a hard time moving to iOS 4.0. Thanks!

Comment by chang....@gmail.com, Jul 27, 2010

The error is on precompile PCH step on UIView.h:

/var/folders/4D/4DaVNC1OE3ed7SCfkJmJX++++TI/-Caches-/com.apple.Xcode.501/CompositeSDKs/iphonesimulator-iPhoneSimulator4.0-gixkiuoisprnvihawsqdludbkjan/System/Library/Frameworks/UIKit.framework/Headers/UIView.h:250:0 /var/folders/4D/4DaVNC1OE3ed7SCfkJmJX++++TI/-Caches-/com.apple.Xcode.501/CompositeSDKs/iphonesimulator-iPhoneSimulator4.0-gixkiuoisprnvihawsqdludbkjan/System/Library/Frameworks/UIKit.framework/Headers/UIView.h:250: error: syntax error before '^' token

+ (void)animateWithDuration:(NSTimeInterval)duration delay:(NSTimeInterval)delay options:(UIViewAnimationOptions)options animations:(void ()(void))animations completion:(void ()(BOOL finished))completion OSX_AVAILABLE_STARTING(MAC_NA,IPHONE_4_0);

Comment by chang....@gmail.com, Jul 27, 2010

I went back to the old way and it works fine now, i.e. include the project. I can't get the new way to work (i.e. from the readme file).

Comment by project member eskr...@mac.com, Jul 28, 2010

You might need to do a clean build.

Comment by Thisb...@gmail.com, Aug 11, 2010

I have the same problem as chang.luo and clean all build changes nothing

Comment by project member eskr...@mac.com, Aug 12, 2010

 Issue #194  was just added to the issue tracker. It looks like the same problem being described here. Let's move the troubleshooting discussion to the issue tracker.

Comment by healingw...@gmail.com, Aug 13, 2010

The following lines in CPLayer.m with give me "Format not a string literal and no format arguments"

-(void)bind:(NSString )binding toObject:(id)observable withKeyPath:(NSString )keyPath options:(NSDictionary )options { #if TARGET_IPHONE_SIMULATOR || TARGET_OS_IPHONE raise:CPException format:BindingsNotSupportedString?; #else

bind:binding toObject:observable withKeyPath:keyPath options:options?;
#endif }

-(void)unbind:(NSString )binding { #if TARGET_IPHONE_SIMULATOR || TARGET_OS_IPHONE raise:CPException format:BindingsNotSupportedString?; #else

unbind:binding?;
#endif }

-(Class)valueClassForBinding:(NSString )binding { #if TARGET_IPHONE_SIMULATOR || TARGET_OS_IPHONE raise:CPException format:BindingsNotSupportedString?;

return Nil;
#else
return valueClassForBinding:binding?;
#endif }

Just installed it in an app for iOS 4.0 following above procedures. Please advise.

Comment by project member eskr...@mac.com, Aug 13, 2010

This was  Issue #146  and should now be fixed. Are you using the latest source?

Comment by sean.bat...@gmail.com, Aug 29, 2010

iOS4 - followed the setup above but project doesn't compile. In file included from /Users/admin/Documents/Development.mb/appstore/Utilities/BMICalc/framework/Source/CPPlotSymbol.m:2: /Users/admin/Documents/Development.mb/appstore/Utilities/BMICalc/framework/Source/CPLineStyle.h:8: error: expected specifier-qualifier-list before 'CGLineCap' /Users/admin/Documents/Development.mb/appstore/Utilities/BMICalc/framework/Source/CPLineStyle.h:10: error: expected specifier-qualifier-list before 'CGLineJoin' /Users/admin/Documents/Development.mb/appstore/Utilities/BMICalc/framework/Source/CPLineStyle.h:11: error: expected specifier-qualifier-list before 'CGFloat' /Users/admin/Documents/Development.mb/appstore/Utilities/BMICalc/framework/Source/CPLineStyle.h:12: error: expected specifier-qualifier-list before 'CGSize' /Users/admin/Documents/Development.mb/appstore/Utilities/BMICalc/framework/Source/CPLineStyle.h:19: error: expected specifier-qualifier-list before 'CGLineCap' /Users/admin/Documents/Development.mb/appstore/Utilities/BMICalc/framework/Source/CPLineStyle.h:20: error: expected specifier-qualifier-list before 'CGLineJoin' /Users/admin/Documents/Development.mb/appstore/Utilities/BMICalc/framework/Source/CPLineStyle.h:21: error: expected specifier-qualifier-list before 'CGFloat' /Users/admin/Documents/Development.mb/appstore/Utilities/BMICalc/framework/Source/CPLineStyle.h:22: error: expected specifier-qualifier-list before 'CGSize' /Users/admin/Documents/Development.mb/appstore/Utilities/BMICalc/framework/Source/CPLineStyle.h:25: error: expected ')' before 'CGContextRef' In file included from /Users/admin/Documents/Development.mb/appstore/Utilities/BMICalc/framework/Source/CPPlotSymbol.m:3: /Users/admin/Documents/Development.mb/appstore/Utilities/BMICalc/framework/Source/CPFill.h:23: error: expected ')' before 'CGRect' /Users/admin/Documents/Development.mb/appstore/Utilities/BMICalc/framework/Source/CPFill.h:23: error: expected ')' before 'CGContextRef' /Users/admin/Documents/Development.mb/appstore/Utilities/BMICalc/framework/Source/CPFill.h:24: error: expected ')' before 'CGContextRef' In file included from /Users/admin/Documents/Development.mb/appstore/Utilities/BMICalc/framework/Source/CPPlotSymbol.m:4: /Users/admin/Documents/Development.mb/appstore/Utilities/BMICalc/framework/Source/CPPlotSymbol.h:25: error: expected specifier-qualifier-list before 'CGSize' /Users/admin/Documents/Development.mb/appstore/Utilities/BMICalc/framework/Source/CPPlotSymbol.h:29: error: expected specifier-qualifier-list before 'CGMutablePathRef' /Users/admin/Documents/Development.mb/appstore/Utilities/BMICalc/framework/Source/CPPlotSymbol.h:30: error: expected specifier-qualifier-list before 'CGPathRef' /Users/admin/Documents/Development.mb/appstore/Utilities/BMICalc/framework/Source/CPPlotSymbol.h:34: error: expected specifier-qualifier-list before 'CGSize' /Users/admin/Documents/Development.mb/appstore/Utilities/BMICalc/framework/Source/CPPlotSymbol.h:38: error: expected specifier-qualifier-list before 'CGPathRef' /Users/admin/Documents/Development.mb/appstore/Utilities/BMICalc/framework/Source/CPPlotSymbol.h:53: error: expected ')' before 'CGPathRef' /Users/admin/Documents/Development.mb/appstore/Utilities/BMICalc/framework/Source/CPPlotSymbol.h:57: error: expected ')' before 'CGContextRef' /Users/admin/Documents/Development.mb/appstore/Utilities/BMICalc/framework/Source/CPPlotSymbol.h:57: error: expected ')' before 'CGPoint' /Users/admin/Documents/Development.mb/appstore/Utilities/BMICalc/framework/Source/CPPlotSymbol.m:16: error: no declaration of property 'size' found in the interface /Users/admin/Documents/Development.mb/appstore/Utilities/BMICalc/framework/Source/CPPlotSymbol.m:16: error: no declaration of property 'customSymbolPath' found in the interface /Users/admin/Documents/Development.mb/appstore/Utilities/BMICalc/framework/Source/CPPlotSymbol.m: In function '-init?': /Users/admin/Documents/Development.mb/appstore/Utilities/BMICalc/framework/Source/CPPlotSymbol.m:24: error: 'size' undeclared (first use in this function) /Users/admin/Documents/Development.mb/appstore/Utilities/BMICalc/framework/Source/CPPlotSymbol.m:24: error: (Each undeclared identifier is reported only once /Users/admin/Documents/Development.mb/appstore/Utilities/BMICalc/framework/Source/CPPlotSymbol.m:24: error: for each function it appears in.) cc1obj: warnings being treated as errors /Users/admin/Documents/Development.mb/appstore/Utilities/BMICalc/framework/Source/CPPlotSymbol.m:24: warning: implicit declaration of function 'CGSizeMake' /Users/admin/Documents/Development.mb/appstore/Utilities/BMICalc/framework/Source/CPPlotSymbol.m:28: error: request for member 'customSymbolPath' in something not a structure or union /Users/admin/Documents/Development.mb/appstore/Utilities/BMICalc/framework/Source/CPPlotSymbol.m: In function '-dealloc?': /Users/admin/Documents/Development.mb/appstore/Utilities/BMICalc/framework/Source/CPPlotSymbol.m:38: warning: implicit declaration of function 'CGPathRelease' /Users/admin/Documents/Development.mb/appstore/Utilities/BMICalc/framework/Source/CPPlotSymbol.m:38: error: 'symbolPath' undeclared (first use in this function) /Users/admin/Documents/Development.mb/appstore/Utilities/BMICalc/framework/Source/CPPlotSymbol.m:39: error: 'customSymbolPath' undeclared (first use in this function) /Users/admin/Documents/Development.mb/appstore/Utilities/BMICalc/framework/Source/CPPlotSymbol.m: At top level: /Users/admin/Documents/Development.mb/appstore/Utilities/BMICalc/framework/Source/CPPlotSymbol.m:47: error: expected ')' before 'CGSize' /Users/admin/Documents/Development.mb/appstore/Utilities/BMICalc/framework/Source/CPPlotSymbol.m: In function '-setSize:?': /Users/admin/Documents/Development.mb/appstore/Utilities/BMICalc/framework/Source/CPPlotSymbol.m:49: error: 'size' undeclared (first use in this function) /Users/admin/Documents/Development.mb/appstore/Utilities/BMICalc/framework/Source/CPPlotSymbol.m: At top level: /Users/admin/Documents/Development.mb/appstore/Utilities/BMICalc/framework/Source/CPPlotSymbol.m:59: error: expected ')' before 'CGPathRef' /Users/admin/Documents/Development.mb/appstore/Utilities/BMICalc/framework/Source/CPPlotSymbol.m: In function '-setCustomSymbolPath:?': /Users/admin/Documents/Development.mb/appstore/Utilities/BMICalc/framework/Source/CPPlotSymbol.m:60: error: 'customSymbolPath' undeclared (first use in this function) /Users/admin/Documents/Development.mb/appstore/Utilities/BMICalc/framework/Source/CPPlotSymbol.m:62: warning: implicit declaration of function 'CGPathRetain' /Users/admin/Documents/Development.mb/appstore/Utilities/BMICalc/framework/Source/CPPlotSymbol.m: At top level: /Users/admin/Documents/Development.mb/appstore/Utilities/BMICalc/framework/Source/CPPlotSymbol.m:166: error: expected ')' before 'CGPathRef' /Users/admin/Documents/Development.mb/appstore/Utilities/BMICalc/framework/Source/CPPlotSymbol.m: In function '+customPlotSymbolWithPath:?': /Users/admin/Documents/Development.mb/appstore/Utilities/BMICalc/framework/Source/CPPlotSymbol.m:170: error: request for member 'customSymbolPath' in something not a structure or union /Users/admin/Documents/Development.mb/appstore/Utilities/BMICalc/framework/Source/CPPlotSymbol.m: In function '-copyWithZone:?': /Users/admin/Documents/Development.mb/appstore/Utilities/BMICalc/framework/Source/CPPlotSymbol.m:184: error: request for member 'size' in something not a structure or union /Users/admin/Documents/Development.mb/appstore/Utilities/BMICalc/framework/Source/CPPlotSymbol.m:184: error: request for member 'size' in something not a structure or union /Users/admin/Documents/Development.mb/appstore/Utilities/BMICalc/framework/Source/CPPlotSymbol.m:190: error: request for member 'customSymbolPath' in something not a structure or union /Users/admin/Documents/Development.mb/appstore/Utilities/BMICalc/framework/Source/CPPlotSymbol.m:191: error: 'CGPathRef' undeclared (first use in this function) /Users/admin/Documents/Development.mb/appstore/Utilities/BMICalc/framework/Source/CPPlotSymbol.m:191: error: expected ';' before 'pathCopy' /Users/admin/Documents/Development.mb/appstore/Utilities/BMICalc/framework/Source/CPPlotSymbol.m:192: error: request for member 'customSymbolPath' in something not a structure or union /Users/admin/Documents/Development.mb/appstore/Utilities/BMICalc/framework/Source/CPPlotSymbol.m:192: error: 'pathCopy' undeclared (first use in this function) /Users/admin/Documents/Development.mb/appstore/Utilities/BMICalc/framework/Source/CPPlotSymbol.m: At top level: /Users/admin/Documents/Development.mb/appstore/Utilities/BMICalc/framework/Source/CPPlotSymbol.m:202: error: expected ')' before 'CGContextRef' /Users/admin/Documents/Development.mb/appstore/Utilities/BMICalc/framework/Source/CPPlotSymbol.m:202: error: expected ')' before 'CGPoint' /Users/admin/Documents/Development.mb/appstore/Utilities/BMICalc/framework/Source/CPPlotSymbol.m: In function '-renderInContext:atPoint:?': /Users/admin/Documents/Development.mb/appstore/Utilities/BMICalc/framework/Source/CPPlotSymbol.m:206: warning: implicit declaration of function 'CGContextSaveGState' /Users/admin/Documents/Development.mb/appstore/Utilities/BMICalc/framework/Source/CPPlotSymbol.m:207: warning: implicit declaration of function 'CGContextTranslateCTM' /Users/admin/Documents/Development.mb/appstore/Utilities/BMICalc/framework/Source/CPPlotSymbol.m:207: error: request for member 'x' in something not a structure or union /Users/admin/Documents/Development.mb/appstore/Utilities/BMICalc/framework/Source/CPPlotSymbol.m:207: error: request for member 'y' in something not a structure or union /Users/admin/Documents/Development.mb/appstore/Utilities/BMICalc/framework/Source/CPPlotSymbol.m:211: error: 'CGSize' undeclared (first use in this function) /Users/admin/Documents/Development.mb/appstore/Utilities/BMICalc/framework/Source/CPPlotSymbol.m:211: error: expected ';' before 'symbolSize' /Users/admin/Documents/Development.mb/appstore/Utilities/BMICalc/framework/Source/CPPlotSymbol.m:212: error: expected ';' before 'halfSize' /Users/admin/Documents/Development.mb/appstore/Utilities/BMICalc/framework/Source/CPPlotSymbol.m:213: error: 'CGRect' undeclared (first use in this function) /Users/admin/Documents/Development.mb/appstore/Utilities/BMICalc/framework/Source/CPPlotSymbol.m:213: error: expected ';' before 'bounds' /Users/admin/Documents/Development.mb/appstore/Utilities/BMICalc/framework/Source/CPPlotSymbol.m:216: warning: implicit declaration of function 'CGContextBeginPath' /Users/admin/Documents/Development.mb/appstore/Utilities/BMICalc/framework/Source/CPPlotSymbol.m:217: warning: implicit declaration of function 'CGContextAddPath' /Users/admin/Documents/Development.mb/appstore/Utilities/BMICalc/framework/Source/CPPlotSymbol.m:217: error: 'symbolPath' undeclared (first use in this function) /Users/admin/Documents/Development.mb/appstore/Utilities/BMICalc/framework/Source/CPPlotSymbol.m:219: warning: implicit declaration of function 'CGContextEOClip' /Users/admin/Documents/Development.mb/appstore/Utilities/BMICalc/framework/Source/CPPlotSymbol.m:221: warning: implicit declaration of function 'CGContextClip' /Users/admin/Documents/Development.mb/appstore/Utilities/BMICalc/framework/Source/CPPlotSymbol.m:223: error: 'bounds' undeclared (first use in this function) /Users/admin/Documents/Development.mb/appstore/Utilities/BMICalc/framework/Source/CPPlotSymbol.m:224: warning: implicit declaration of function 'CGContextRestoreGState' /Users/admin/Documents/Development.mb/appstore/Utilities/BMICalc/framework/Source/CPPlotSymbol.m:231: warning: implicit declaration of function 'CGContextStrokePath' /Users/admin/Documents/Development.mb/appstore/Utilities/BMICalc/framework/Source/CPPlotSymbol.m: In function '-setSymbolPath?': /Users/admin/Documents/Development.mb/appstore/Utilities/BMICalc/framework/Source/CPPlotSymbol.m:244: error: 'CGFloat' undeclared (first use in this function) /Users/admin/Documents/Development.mb/appstore/Utilities/BMICalc/framework/Source/CPPlotSymbol.m:244: error: expected ';' before 'dx' /Users/admin/Documents/Development.mb/appstore/Utilities/BMICalc/framework/Source/CPPlotSymbol.m:245: error: 'CGSize' undeclared (first use in this function) /Users/admin/Documents/Development.mb/appstore/Utilities/BMICalc/framework/Source/CPPlotSymbol.m:245: error: expected ';' before 'symbolSize' /Users/admin/Documents/Development.mb/appstore/Utilities/BMICalc/framework/Source/CPPlotSymbol.m:246: error: expected ';' before 'halfSize' /Users/admin/Documents/Development.mb/appstore/Utilities/BMICalc/framework/Source/CPPlotSymbol.m:247: error: 'CGRect' undeclared (first use in this function) /Users/admin/Documents/Development.mb/appstore/Utilities/BMICalc/framework/Source/CPPlotSymbol.m:247: error: expected ';' before 'bounds' /Users/admin/Documents/Development.mb/appstore/Utilities/BMICalc/framework/Source/CPPlotSymbol.m:248: error: expected ';' before 'oldBounds' /Users/admin/Documents/Development.mb/appstore/Utilities/BMICalc/framework/Source/CPPlotSymbol.m:249: error: 'CGAffineTransform' undeclared (first use in this function) /Users/admin/Documents/Development.mb/appstore/Utilities/BMICalc/framework/Source/CPPlotSymbol.m:249: error: expected ';' before 'scaleTransform' /Users/admin/Documents/Development.mb/appstore/Utilities/BMICalc/framework/Source/CPPlotSymbol.m:251: error: 'symbolPath' undeclared (first use in this function) /Users/admin/Documents/Development.mb/appstore/Utilities/BMICalc/framework/Source/CPPlotSymbol.m:252: warning: implicit declaration of function 'CGPathCreateMutable' /Users/admin/Documents/Development.mb/appstore/Utilities/BMICalc/framework/Source/CPPlotSymbol.m:256: warning: implicit declaration of function 'CGPathAddRect' /Users/admin/Documents/Development.mb/appstore/Utilities/BMICalc/framework/Source/CPPlotSymbol.m:256: error: 'bounds' undeclared (first use in this function) /Users/admin/Documents/Development.mb/appstore/Utilities/BMICalc/framework/Source/CPPlotSymbol.m:259: warning: implicit declaration of function 'CGPathAddEllipseInRect' /Users/admin/Documents/Development.mb/appstore/Utilities/BMICalc/framework/Source/CPPlotSymbol.m:262: warning: implicit declaration of function 'CGPathMoveToPoint' /Users/admin/Documents/Development.mb/appstore/Utilities/BMICalc/framework/Source/CPPlotSymbol.m:262: warning: implicit declaration of function 'CGRectGetMinX' /Users/admin/Documents/Development.mb/appstore/Utilities/BMICalc/framework/Source/CPPlotSymbol.m:262: warning: implicit declaration of function 'CGRectGetMaxY' /Users/admin/Documents/Development.mb/appstore/Utilities/BMICalc/framework/Source/CPPlotSymbol.m:263: warning: implicit declaration of function 'CGPathAddLineToPoint' /Users/admin/Documents/Development.mb/appstore/Utilities/BMICalc/framework/Source/CPPlotSymbol.m:263: warning: implicit declaration of function 'CGRectGetMaxX' /Users/admin/Documents/Development.mb/appstore/Utilities/BMICalc/framework/Source/CPPlotSymbol.m:263: warning: implicit declaration of function 'CGRectGetMinY' /Users/admin/Documents/Development.mb/appstore/Utilities/BMICalc/framework/Source/CPPlotSymbol.m:275: error: 'halfSize' undeclared (first use in this function) /Users/admin/Documents/Development.mb/appstore/Utilities/BMICalc/framework/Source/CPPlotSymbol.m:279: warning: implicit declaration of function 'CGPathCloseSubpath' /Users/admin/Documents/Development.mb/appstore/Utilities/BMICalc/framework/Source/CPPlotSymbol.m:302: error: 'dx' undeclared (first use in this function) /Users/admin/Documents/Development.mb/appstore/Utilities/BMICalc/framework/Source/CPPlotSymbol.m:303: error: 'dy' undeclared (first use in this function) /Users/admin/Documents/Development.mb/appstore/Utilities/BMICalc/framework/Source/CPPlotSymbol.m:338: error: 'customSymbolPath' undeclared (first use in this function) /Users/admin/Documents/Development.mb/appstore/Utilities/BMICalc/framework/Source/CPPlotSymbol.m:339: error: 'oldBounds' undeclared (first use in this function) /Users/admin/Documents/Development.mb/appstore/Utilities/BMICalc/framework/Source/CPPlotSymbol.m:339: warning: implicit declaration of function 'CGPathGetBoundingBox' /Users/admin/Documents/Development.mb/appstore/Utilities/BMICalc/framework/Source/CPPlotSymbol.m:340: error: expected ';' before 'dx1' /Users/admin/Documents/Development.mb/appstore/Utilities/BMICalc/framework/Source/CPPlotSymbol.m:341: error: expected ';' before 'dy1' /Users/admin/Documents/Development.mb/appstore/Utilities/BMICalc/framework/Source/CPPlotSymbol.m:342: error: expected ';' before 'f' /Users/admin/Documents/Development.mb/appstore/Utilities/BMICalc/framework/Source/CPPlotSymbol.m:343: error: 'scaleTransform' undeclared (first use in this function) /Users/admin/Documents/Development.mb/appstore/Utilities/BMICalc/framework/Source/CPPlotSymbol.m:343: warning: implicit declaration of function 'CGAffineTransformScale' /Users/admin/Documents/Development.mb/appstore/Utilities/BMICalc/framework/Source/CPPlotSymbol.m:343: error: 'CGAffineTransformIdentity' undeclared (first use in this function) /Users/admin/Documents/Development.mb/appstore/Utilities/BMICalc/framework/Source/CPPlotSymbol.m:343: error: 'f' undeclared (first use in this function) /Users/admin/Documents/Development.mb/appstore/Utilities/BMICalc/framework/Source/CPPlotSymbol.m:344: warning: implicit declaration of function 'CGAffineTransformConcat' /Users/admin/Documents/Development.mb/appstore/Utilities/BMICalc/framework/Source/CPPlotSymbol.m:345: warning: implicit declaration of function 'CGAffineTransformMakeTranslation' /Users/admin/Documents/Development.mb/appstore/Utilities/BMICalc/framework/Source/CPPlotSymbol.m:346: warning: implicit declaration of function 'CGPathAddPath'

Comment by project member eskr...@mac.com, Aug 29, 2010

Most of the error messages reference Core Graphics types. Have you added the QuartzCore? framework to your project?

Comment by avinash....@gmail.com, Sep 2, 2010

Hi, how can i put my own values in y axis labels instead of range? is there a way or do i need to change some classes..

Comment by project member eskr...@mac.com, Sep 2, 2010

Set the labelingPolicy for the axis. You can use the automatic mode where Core Plot tries to determine the best tick locations, fixed interval (the default) where you specify the starting point and interval between ticks, locations provided where you set the locations and Core Plot makes the labels, or CPAxisLabelingPolicyNone where you provide both the tick locations and the corresponding labels.

Comment by avinash....@gmail.com, Sep 3, 2010

In my bar graph, x axis labels are not aligned with bars since i am using thick bars and increased space between them. How can i shift x axis label position horizontally?

Comment by project member drewmcco...@mac.com, Sep 3, 2010

Labels have an offset/displacement type property that allows you to position them relative to their anchor point.

Comment by avinash....@gmail.com, Sep 3, 2010

I got the solution.. CPAxisLabel offset property moves label vertically. I want to shift them horizontally.

I made a property distanceFromViewPoint inside CPAxisLabel class. Then inside positionRelativeToViewPoint method i added this value to the x axis value.

Comment by jeroen.l...@gmail.com, Sep 9, 2010

Had the same problem as sean.batson.

My guess is Sean checked out from SVN like I did. Took me a whole days work before I figured that one out. :( :(

Comment by marqui...@gmail.com, Sep 9, 2010

I followed the instructions twice and came up with 104 errors. And yes QuartzCore??.framework is under my Targets.

"CGImageRetain", referenced from:
-initWithCGImage:? in libCorePlot-CocoaTouch??.a(CPImage.o)
-setImage:? in libCorePlot-CocoaTouch??.a(CPImage.o)
"CGContextSetLineDash", referenced from:
-setLineStyleInContext:? in libCorePlot-CocoaTouch??.a(CPLineStyle.o)
"CGPathAddArcToPoint", referenced from:
-newBarPathWithContext:recordIndex:? in libCorePlot-CocoaTouch??.a(CPBarPlot.o)
-newBarPathWithContext:recordIndex:? in libCorePlot-CocoaTouch??.a(CPBarPlot.o)
CreateRoundedRectPath?? in libCorePlot-CocoaTouch??.a(CPPathExtensions.o)
CreateRoundedRectPath?? in libCorePlot-CocoaTouch??.a(CPPathExtensions.o)
CreateRoundedRectPath?? in libCorePlot-CocoaTouch??.a(CPPathExtensions.o)
CreateRoundedRectPath?? in libCorePlot-CocoaTouch??.a(CPPathExtensions.o)
-drawCandleStickInContext:x:open:close:high:low:? in libCorePlot-CocoaTouch??.a(CPTradingRangePlot.o)
-drawCandleStickInContext:x:open:close:high:low:? in libCorePlot-CocoaTouch??.a(CPTradingRangePlot.o)
"CGContextDrawShading", referenced from:
-fillRect:inContext:? in libCorePlot-CocoaTouch??.a(CPGradient.o)
-fillPathInContext:? in libCorePlot-CocoaTouch??.a(CPGradient.o)
"CGRectIsEmpty", referenced from:
-setConstraints? in libCorePlot-CocoaTouch??.a(CPLayerAnnotation.o)
"CGContextConvertRectToDeviceSpace", referenced from:
CPAlignRectToUserSpace in libCorePlot-CocoaTouch??.a(CPUtilities.o)
"CGPointZero", referenced from:
CGPointZero$non_lazy_ptr in libCorePlot-CocoaTouch??.a(CPPlotSpace.o)
CGPointZero$non_lazy_ptr in libCorePlot-CocoaTouch??.a(CPGraph.o)
CGPointZero$non_lazy_ptr in libCorePlot-CocoaTouch??.a(CPLayer.o)
CGPointZero$non_lazy_ptr in libCorePlot-CocoaTouch??.a(CPAxis.o)
CGPointZero$non_lazy_ptr in libCorePlot-CocoaTouch??.a(CPPlotArea.o)
CGPointZero$non_lazy_ptr in libCorePlot-CocoaTouch??.a(CPAxisLabel.o)
CGPointZero$non_lazy_ptr in libCorePlot-CocoaTouch??.a(CPAxisTitle.o)
CGPointZero$non_lazy_ptr in libCorePlot-CocoaTouch??.a(CPAnnotation.o)
(maybe you meant: CGPointZero$non_lazy_ptr)
"CGPathCloseSubpath", referenced from:
-renderAsVectorInContext:? in libCorePlot-CocoaTouch??.a(CPScatterPlot.o)
-newBarPathWithContext:recordIndex:? in libCorePlot-CocoaTouch??.a(CPBarPlot.o)
-setSymbolPath? in libCorePlot-CocoaTouch??.a(CPPlotSymbol.o)
-setSymbolPath? in libCorePlot-CocoaTouch??.a(CPPlotSymbol.o)
-setSymbolPath? in libCorePlot-CocoaTouch??.a(CPPlotSymbol.o)
-setSymbolPath? in libCorePlot-CocoaTouch??.a(CPPlotSymbol.o)
-setSymbolPath? in libCorePlot-CocoaTouch??.a(CPPlotSymbol.o)
Comment by project member drewmcco...@mac.com, Sep 10, 2010

You should never use svn anymore. We use hg on the project. Where did the idea to use svn come from?

Comment by fmau...@gmail.com, Sep 13, 2010

Hello, I followed the instruction of the installation but had one warning and one error:

ld: warning: in /Users/fmauger/Downloads/alpharelease_0.2/Source/framework/build/Release-iphoneos/libCorePlot-CocoaTouch?.a, missing required architecture i386 in file

ld: duplicate symbol OBJC_IVAR$CPAnnotationHostLayer.mutableAnnotations in /Users/fmauger/Downloads/alpharelease_0.2/Source/build/Debug-iphonesimulator/libCorePlot-CocoaTouch?.a(CPAnnotationHostLayer.o) and /var/folders/Uc/Uc78QT-MH80uB7lYVmGAUk+++TI/-Caches-/com.apple.Xcode.501/CompositeSDKs/iphonesimulator-iPhoneSimulator3.2-cckoycftwpxhgmawummikylpomfr/usr/lib/libCorePlot.a(CPAnnotationHostLayer.o) collect2: ld returned 1 exit status Command /Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin/gcc-4.0 failed with exit code 1

Any idea? Thank you!

Comment by project member drewmcco...@mac.com, Sep 13, 2010

Best to ask these questions on our google group mailing list. It looks like you are building Core Plot yourself, rather than using the SDK. Is that right? You seem to be linking to the iPhone device library (ARM), rather than the simulator library (i386). I think you should look at how exactly you are compiling and linking the library.

Comment by gadda.sr...@gmail.com, Sep 20, 2010

I was getting errors while compiling my application with Core-Plot static library, syntax error before '^' token and also getting warnings like IPHONE_OS_VERSION_MIN_REQUIRED redefined iOS Deployment targets are same for Core-plot library and my application.Could anyone help me to resolve this problem..

Comment by StephanE...@gmail.com, Oct 11, 2010

our app compiles well and we can show a chart on iphone simulator. But we have Problems with Codesense/Classes are not colored in code and we cant use "Jump to Definition". With other static libraries everthing works fine. Seems that i cant find the right headers. We were not find a solution, looking for hours... any ideas?

Comment by project member eskr...@mac.com, Oct 11, 2010

@StephanEpping?,

It's best to address questions like this on the Core Plot discussion board: http://groups.google.com/group/coreplot-discuss

Comment by randymel...@gmail.com, Nov 6, 2010

Getting the same "syntax error before '^' token" problem as in "Comment by gadda.srinivas, Sep 20, 2010"

Comment by project member drewmcco...@mac.com, Nov 8, 2010

The error relates to blocks not being supported. You may need to change your compiler to GCC 4.2 or LLVM. Look in the build settings.

Comment by merlynbe...@gmail.com, Nov 10, 2010
building using ios sdk 3.2 fails with error

Undefined symbols:

".objc_class_name_NSAutoreleasePool", referenced from:
literal-pointer@OBJC@cls_refs@NSAutoreleasePool in main.o
".objc_class_name_UIViewController", referenced from:
.objc_class_name_graph_Core_plotViewController in graph_Core_plotViewController.o
".objc_class_name_NSObject", referenced from:
.objc_class_name_graph_Core_plotAppDelegate in graph_Core_plotAppDelegate.o
ld: symbol(s) not found collect2: ld returned 1 exit status

Comment by merlynbe...@gmail.com, Nov 10, 2010
building using ios sdk 3.2 fails with error

Undefined symbols:

".objc_class_name_NSAutoreleasePool", referenced from:
literal-pointer@OBJC@cls_refs@NSAutoreleasePool in main.o
".objc_class_name_UIViewController", referenced from:
.objc_class_name_graph_Core_plotViewController in graph_Core_plotViewController.o
".objc_class_name_NSObject", referenced from:
.objc_class_name_graph_Core_plotAppDelegate in graph_Core_plotAppDelegate.o
ld: symbol(s) not found collect2: ld returned 1 exit status

Comment by llpi...@gmail.com, Nov 11, 2010

I have the same question, Xcode 3.2.4 + iOS4.0/iOS3.2


Comment by merlynbernard, Yesterday (23 hours ago) building using ios sdk 3.2 fails with error Undefined symbols:

".objc_class_name_NSAutoreleasePool", referenced from: literal-pointer@OBJC@cls_refs@NSAutoreleasePool in main.o ".objc_class_name_UIViewController", referenced from: .objc_class_name_graph_Core_plotViewController in graph_Core_plotViewController.o ".objc_class_name_NSObject", referenced from: .objc_class_name_graph_Core_plotAppDelegate in graph_Core_plotAppDelegate.o ld: symbol(s) not found collect2: ld returned 1 exit status

Comment by llpi...@gmail.com, Nov 11, 2010

CorePlotInstaller? is not supported?

1, change "iOS Deployment Target" to 3.2 and rebuild CorePlot?-CocoaTouch?.xcodeproj 2, change MyTestCP.xcodeproj the same target and rebuild 3, success

Comment by project member drewmcco...@mac.com, Nov 11, 2010

You need to target SDK 4.0 or later, I believe. You can set the deployment target to 3.1. Don't set to 3.2, because it is not available for iPhone.

Drew

Comment by agraw...@gmail.com, Nov 11, 2010

Hi,

I am having the following issue when I am trying to integrate the core-plot with the my app.

I went with the SDK install options: I installed it with Mac installer Package, it got installed in the following location /Library/SDKs/iphoneos.sdk and /Library/SDKs/iphonesimulator.os

Then i did step 2 as mentioned.

For 3a i added /Library/SDKs/CorePlotSDK/iphonesimulator.os

Then i did 3b and then 4.

After that I tried to do a build and see how does it works and i get the following errors:

:1:0 :1:1: warning: "IPHONE_OS_VERSION_MIN_REQUIRED" redefined

:1:0 :1:1: warning: this is the location of the previous definition

/var/folders/+r/+rBG+BziF1OqK12XNyw1ak+++TM/-Caches-/com.apple.Xcode.502/CompositeSDKs/iphonesimulator-iPhoneSimulator4.1-cztutytisanvsqaptkdkpoyyctln/System/Library/Frameworks/UIKit.framework/Headers/UIView.h:250:0 /var/folders/+r/+rBG+BziF1OqK12XNyw1ak+++TM/-Caches-/com.apple.Xcode.502/CompositeSDKs/iphonesimulator-iPhoneSimulator4.1-cztutytisanvsqaptkdkpoyyctln/System/Library/Frameworks/UIKit.framework/Headers/UIView.h:250: error: syntax error before '^' token

/var/folders/+r/+rBG+BziF1OqK12XNyw1ak+++TM/-Caches-/com.apple.Xcode.502/CompositeSDKs/iphonesimulator-iPhoneSimulator4.1-cztutytisanvsqaptkdkpoyyctln/System/Library/Frameworks/UIKit.framework/Headers/UIView.h:250:0 /var/folders/+r/+rBG+BziF1OqK12XNyw1ak+++TM/-Caches-/com.apple.Xcode.502/CompositeSDKs/iphonesimulator-iPhoneSimulator4.1-cztutytisanvsqaptkdkpoyyctln/System/Library/Frameworks/UIKit.framework/Headers/UIView.h:250: error: 'type name' declared as function returning a function

This appears 20 times. and it points all to UIView.h

There are same question in the stackoverflow and people suggested to change the compiler to 4.2 and for lot of people it worked, but for me the compiler was always set to 4.2 and still I get the same error.

On 3a if do /Library/SDKs/CorePlotSDK/iphoneos.sdk

I get the following error

error: Composite SDK failed: The base SDK uses platform 'iphonesimulator', but an additional SDK uses platform 'iphoneos'. All SDKs must use the same platform (PLATFORM_NAME).

Please help

Comment by project member eskr...@mac.com, Nov 11, 2010

I posted a new installer last night (version 0.2.2). Download that one and see if it fixes your problem. It should install the SDKs to the right place now. You'll want to make sure you use the recommended SDK paths.

Comment by agraw...@gmail.com, Nov 11, 2010

I did used the new one, and I am using the recommended SDK path which is /Library/SDKs/CorePlotSDK/iphonesimulator.os correct me If I am wrong. But still I get the same error

Comment by project member eskr...@mac.com, Nov 11, 2010

If you installed for all users, you should use "/Library/SDKs/CorePlotSDK/${PLATFORM_NAME}.sdk" for additional SDKs for all configurations. "iphonesimulator.os" should not be part of the installed SDKs. That may have been an artifact from the old installer.

Comment by agraw...@gmail.com, Nov 11, 2010

I didn't get you, sorry for bugging you so much, but I am really struggling to get this working. I really appreciate your help.

1) What do you mean by installed for all users? 2) Are you saying use "/Library/SDKs/CorePlotSDK/${PLATFORM_NAME}.sdk" as it is don't replace ${PLATFORM_NAME} with anything like iphoneos.sdk or iphonesimulator.sdk

Thanks

Comment by project member eskr...@mac.com, Nov 11, 2010

The installer gives you two choices of installation location: all users or just the active user account (whoever was logged in when you ran the installer). When you choose "all users", it installs the SDKs in /Library otherwise it installs in ~/Library (equivalent to $HOME/Library).

You shouldn't replace "${PLATFORM_NAME}". Xcode will do it for you when it evaluates the path. This way it always points to the correct SDK whether you're building for the simulator or device.

Comment by agraw...@gmail.com, Nov 11, 2010

Yes I did installed for all users, and I made the changes to use /Library/SDKs/CorePlotSDK/${PLATFORM_NAME}.sdk for additional SDK,

And I have checked the path for the SDK is correct.

But still I get the same error.

Comment by sebastie...@gmail.com, Nov 12, 2010

@agrawaly I had the same issue but fixed it by changing the C/C++ Compiler Version from GCC 4.2 to LLVM GCC 4.2. You will find this in Project>Edit Project Settings>Build tab.

Hope this helps!

Comment by agraw...@gmail.com, Nov 13, 2010

Thanks @sebastien.leduc this works, you have saved my life, I have struggling with this for a week now.

@eskr...@mac.com, i think we should add this to the above steps for SDK installation

Comment by agraw...@gmail.com, Nov 13, 2010

So now my code compile without any error, so I went ahead started doing some coding for it, again I bumped into another problem and this time it is

"error: CorePlot?-CocoaTouch?.h: No such file or directory"

Once again I need help from all you wonderful people.

Comment by agraw...@gmail.com, Nov 13, 2010

Hi Eric, I have seen your comments regarding User Header search path but that is only for static thing right, If I am going the SDK route, I don't think I have to do that, because there is no framework folder anywhere, Can you please tell why do I get this error.

Comment by project member eskr...@mac.com, Nov 13, 2010

@agrawaly,

As shown at the top of this page, the #import statement is different depending on whether you're using the SDK or the static library. Make sure you're using the right one.

Comment by agraw...@gmail.com, Nov 13, 2010

Thank you Eric. Thanks a lot. It's working now.

Comment by merlynbe...@gmail.com, Nov 25, 2010

unable decompress "CorePlotInstaller?_0.2.1.zip". The zip seems to be corrupted

Comment by project member eskr...@mac.com, Nov 25, 2010

I just tried it and it worked fine for me. 0.2.2 is posted. Have you tried that one?

Comment by dfrob...@gmail.com, Nov 25, 2010
I need to use the Y-axis upside down, so zero is on the top and the end on the bottom. Who can help?
Comment by project member eskr...@mac.com, Nov 26, 2010

Give the yRange on your plot space a negative length.

Comment by garys...@gmail.com, Nov 29, 2010

Hi,

I created an Ad Hoc distribution profile and tried to sign the app and got lots of errors (54 to be exact).

It's obviously not seeing the linked library/framework. I don't know what to put in the build settings... I'm at a loss.

Has anyone experienced a problem signing an app with a distribution profile?

Any help would greatly be appreciated...

Thank you.

Comment by project member drewmcco...@mac.com, Nov 30, 2010

I doubt the signing problem has anything to do with Core Plot. Core Plot gets statically linked, so the Core Plot code is in the application executable when signing takes place.

Please ask this question on the mailing list, and post some of the errors.

Comment by gplab@barnholt.net, Dec 21, 2010

Using CorePlot? 0.2.2 (Nov 10, 2010) in a Mac application basically works, i.e. a CPXYGraph is displayed in the app. However using CPDecimalFromDouble() or CPDecimalFromFloat() results in link errors:

"CPDecimalFromDouble(double)", referenced from:
-configureGraphView? in MathFunctionRegressionVisualizerView?.o

ld: symbol(s) not found

Any ideas?? Followed the setup steps (add CorePlot? to my project, link w/ CorePlot? framework build phase) and everything except these nasty errors seems to work...

Comment by Wit...@gmail.com, Jan 6, 2011

I'm having the same issue as gplab. This issue was not happening when I was using CPDecimalFromFloat() in a .m file, but it's occurring when I switch to a .mm file.

I guess I'll have to construct a NSDecimal manually for now...

Comment by project member eskr...@mac.com, Jan 6, 2011

I just pushed a change that should fix this issue for C++. If you're building Core Plot from source, you can pull the latest from Mercurial and give it a try.

In the future, please raise these sorts of issues on the discussion board or the issue tracker.

Comment by noma...@gmail.com, Jan 17, 2011

I have the following error, even though, I followed all the settings suggested above. Any idea?

Command /Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin/gcc-4.2 failed with exit code 1

Comment by goo...@postmechanical.com, Feb 3, 2011

If you put the SDK under source control and want to link it from your source tree, then you need to use something like the following settings:

Additional SDKs "${SRCROOT}/ThirdParty?/CorePlotSDK/${PLATFORM_NAME}.sdk" Library Search Paths "${SRCROOT}/ThirdParty?/CorePlotSDK/${PLATFORM_NAME}.sdk/usr/lib"

Comment by goo...@postmechanical.com, Feb 3, 2011

Also, the other linker flag -all_load doesn't seem to be required and can cause duplicate symbol errors in some cases.

Comment by goo...@postmechanical.com, Feb 4, 2011

Actually the -all_load linker flag is required but causes errors with other poorly formed libs such as JumpTap?'s. http://groups.google.com/group/adwhirl-users/browse_thread/thread/b11d621ac487d334?pli=1

Comment by chetanma...@gmail.com, Feb 11, 2011

please help me to fix these errors:

error: use of undeclared identifier 'CPLayerHostingView' error: use of undeclared identifier 'hostingView' error: incompatible type assigning 'NSDecimalNumber ', expected 'NSDecimal' (aka 'NSDecimal')

error: property 'axisLabelOffset' not found on object of type 'CPXYAxis '

error: incompatible type assigning 'NSDecimalNumber ', expected 'NSDecimal' (aka 'NSDecimal')

error: property 'axisLabelOffset' not found on object of type 'CPXYAxis '

error: property 'bounds' not found on object of type 'CPPlotSpace '

error: property 'defaultPlotSymbol' not found on object of type 'CPScatterPlot ' error: property 'bounds' not found on object of type 'CPPlotSpace '

Comment by dorinc%g...@gtempaccount.com, Feb 12, 2011

I can't get this to work and I followed all the steps! I'm getting 168 errors. The first few being:

pbxcp: CorePlot?-CocoaTouch?.h: No such file or directory Command

/Developer/Library/PrivateFrameworks??/DevToolsCore??.framework/Resources/pbxcp failed with exit code 1 Command

/Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin/gcc-4.2 failed with exit code 1

/Users/dorinc/Desktop/GraphTestCP/Classes/GraphTestCPViewController.h:12: error: cannot find protocol declaration for 'CPPlotDataSource'

/Users/dorinc/Desktop/GraphTestCP/Classes/GraphTestCPViewController.h:14: error: expected specifier-qualifier-list before 'CPXYGraph'

Any help would be appreciated! Thanks.

Comment by ka...@hotmail.com, Feb 22, 2011

chetanma: on the 'incompatible type assigning 'NSDecimalNumber' try using

[decimalNumberWithString:@"5"? decimalValue];
Comment by eskr...@gmail.com, Feb 22, 2011

I was able to use Core Plot in a regular XCode application, but I am getting a "no such file or directory" error when I go through the same steps on an X-code project created through the OsiriX Plug-in Generator. Will the above steps work in this context? Or should I be uploading the coreplot header files to foundation? Thanks.

Comment by project member drewmcco...@mac.com, Feb 23, 2011

Plugins are a bit different. You might have to change the setting for the bundle loader in the Core Plot Xcode project. I believe it is setup under the assumption that it is being loaded by a app. There are other options in Xcode to use when the framework will be installed in a plugin.

Comment by eskr...@gmail.com, Feb 23, 2011

The bundle loader has no default value. Do you know what I should enter? Thanks.

Comment by thomaspf...@me.com, Mar 13, 2011

Since upgrading to XCode4 I have problems running my App on the device (iPhone), the simulator works without problems. When building my project I receive the following message:

ld: warning: ignoring file /Users/pt/Library/Developer/Xcode/DerivedData?/HRV-cxmnyobshhcollhinkxuqrdsgrsk/Build/Products/Debug-iphoneos/libCorePlot-CocoaTouch?.a, file was built for archive which is not the architecture being linked (armv6) Undefined symbols for architecture armv6:

I tried about everything I know but I hope that someone can give me a hint.

regards Thomas

Comment by ajayclem...@gmail.com, Mar 14, 2011

Hi

I have the same problem as Thomas, it would be good to get a fix for this.

Regards

Antony

Comment by ajayclem...@gmail.com, Mar 14, 2011

Hey Thomas

I think I have a solution. You need to activate the CorePlot? project (the drop down next to the "Stop" button), select "for iOS" device and rebuild. Next, delete the libCorePlot-CocoaTouch?.a file from your main app and add the newly built one. It should work fine then.

Regards

Antony

Comment by thomaspf...@me.com, Mar 14, 2011

Hi Antony

Thanks for your help. Just a few minutes ago i found the solution. The setting "Build active Architecture Only" has to be set to "YES". Since I did that it works!

regards Thomas

Comment by taeil....@gmail.com, Mar 14, 2011

Hi Thomas,

Thanks for your info. Changing the build setting also solved the problem I had.

Comment by timco...@gmail.com, Mar 15, 2011

Hullo I'm trying to get this working on a Mac. Downloaded examples work if I open eg. CPTestApp.xcodeproj in Xcode, it will build and run. However, following the instructions above with xcode 3.2.5 I keep running into "no such file or directory" around the #import <CorePlot?/CorePlot?.h> statements.

If I fix this specific example (eg by putting in a Header Search Path to the download directory and changing the import to "#import <framework/CorePlot?.h>"), then all other references to <CorePlot?/ break in the imported file. I'd guess that this is some problem with identifying Coreplot as a framework to the compiler, but I cannot find a relevant property. What's worrying is that I cannot google the error that I'm seeing in the context of this example, so I've probably got some weirdness in my xcode configuration.

I cannot work out how the xcode properties are used and munged to get from something like <FrameworkName?/IncludeFile?.h> to the relevant imported file, which is usually somewhere down the directory tree below the FrameworkName? directory. And I suspect that's not where I should be looking in any case.

Annoyingly the xcode config files (project.pbxproj), are non-trivial to diff between projects to see if I could unpick what was going wrong between simply building from an example xcodeproj to letting xcode construct one.

Any pointers on how to troubleshoot this?

tia

Tim

Comment by project member drewmcco...@mac.com, Mar 15, 2011

You are better off asking this on our Google Groups mailing list. This comment section has become a graveyard.

Comment by timco...@gmail.com, Mar 15, 2011

A build on the above comment. Reading through http://developer.apple.com/library/mac/#documentation/MacOSX/Conceptual/BPFrameworks/Tasks/CreatingFrameworks.html, There's a line that says: "Drag your framework product (located in the Products folder) to the existing Link Binary With Libraries build phase of your application target. This causes the application to link against your framework." For some reason, this doesn't work with the version of xcode that I've got and I think that it's replaced in the instructions above by: "To link Core Plot to your target application, drag CorePlot?.framework from inside the CorePlot?.xcodeproj group into the Link Binary with Libraries build phase in your app's target." The CorePlot?.framework in CorePlot?.xcodeproj, unlike the CorePlot?.framework in the Products folder does not include the Header files. I'm guessing that if I can find the right thing to drop into the Link Binary phase, it will set up the header files.

Comment by timco...@gmail.com, Mar 15, 2011

Thanks, Drew. Fwiw, I've fixed it now, by following this blog: http://blog.rickschmidt.org/2010/09/up-and-running-with-coreplot.html.

I think that the key issue was step 5. I'd guess that I'd picked up a wrong CorePlot?.xcodeproj. It looks to me like there are several ways to do the same thing with xcode and the details of what actually happens can change.

Comment by jrbal...@gmail.com, Mar 31, 2011

For those guys who are still not able to figure out hot to properly add CorePlot? to your iPhone project, check this link http://codecentration.com/2011/03/07/installing-coreplot-in-8-steps/.

Comment by dhwagst...@gmail.com, Apr 1, 2011

I have an existing project which I am trying to integrate core-plot into. I followed the instructions but must of missed something or I am confused. when I try to build my project I get several error all surrounding #include's like #include Stdarg.h and Float.h etc ... No such File or Directory. Also when the directions say "Add a CPGraph to your application." what exactly is it referring to.

Thanks, Dean

Comment by vichu.me...@gmail.com, Apr 6, 2011

Is there a way to specify the intersection point of the x and y axis, i.e. change the intersection from x=0,y=0 to say x=2, y=3?

Thanks

Comment by kThe...@gmail.com, May 4, 2011

Sorry, but this explanation is really bad. A step by step documentation would be much better. Especially for the reason that Xcode 4 strongly differs from the earlier versions regarding target settings.

Comment by mihir.pu...@gmail.com, May 18, 2011

Can anyone tell me how can we add a plot symbols with two colors? As i am working in an application where i need to display plot symbols if quantity goes below certain level then its color is red otherwise green.

Comment by project member eskr...@mac.com, May 18, 2011

You should ask questions like this on our discussion board (http://groups.google.com/group/coreplot-discuss/topics), not the wiki. To answer your question, you can implement the -symbolForScatterPlot:recordIndex: method in your datasource and return the appropriate symbol for each index.

Comment by mihir.pu...@gmail.com, May 18, 2011

Thanks a lot for the answer, i will do further communication on (http://groups.google.com/group/coreplot-discuss/topics) if any.

Comment by archball...@gmail.com, Jul 13, 2011

Build target DashBoard?? of project DashBoard?? with configuration Debug

Ld /Users/MacMini??/Library/Developer/Xcode/DerivedData??/DashBoard??-dnjapugvetrgnxgfxrjmdruyskgo/Build/Products/Debug-iphonesimulator/DashBoard??.app/DashBoard?? normal i386

cd "/Users/MacMini??/Desktop/DashBoard?? 1" setenv MACOSX_DEPLOYMENT_TARGET 10.6 setenv PATH "/Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin:/Developer/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin" /Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin/llvm-gcc-4.2 -arch i386 -isysroot /var/folders/8B/8BGab5iaFeeebTcSD9rTwU+++TI/-Caches-/com.apple.Xcode.501/CompositeSDKs/iphonesimulator-iPhoneSimulator4.3-bubbnicuystyimgjljhyzsdbfqsf -L/Users/MacMini??/Library/Developer/Xcode/DerivedData??/DashBoard??-dnjapugvetrgnxgfxrjmdruyskgo/Build/Products/Debug-iphonesimulator "-L/Users/MacMini??/Desktop/DashBoard?? 1/CorePlotInstall??DB/iosbinaries" "-L/Users/MacMini??/Desktop/DashBoard?? 1/QuartzCore??.framework" -F/Users/MacMini??/Library/Developer/Xcode/DerivedData??/DashBoard??-dnjapugvetrgnxgfxrjmdruyskgo/Build/Products/Debug-iphonesimulator -FQuartzCore.framework -FQuartzCore.framework/Headers "-F/Users/MacMini??/Desktop/DashBoard?? 1" -filelist /Users/MacMini??/Library/Developer/Xcode/DerivedData??/DashBoard??-dnjapugvetrgnxgfxrjmdruyskgo/Build/Intermediates/DashBoard??.build/Debug-iphonesimulator/DashBoard??.build/Objects-normal/i386/DashBoard??.LinkFileList?? -mmacosx-version-min=10.6 -ObjC -all_load -lCorePlot -Xlinker -objc_abi_version -Xlinker 2 -framework UIKit -framework Foundation -framework CoreGraphics?? -lCorePlot-CocoaTouch?? -o /Users/MacMini??/Library/Developer/Xcode/DerivedData??/DashBoard??-dnjapugvetrgnxgfxrjmdruyskgo/Build/Products/Debug-iphonesimulator/DashBoard??.app/DashBoard?? Ld /Users/MacMini??/Library/Developer/Xcode/DerivedData??/DashBoard??-dnjapugvetrgnxgfxrjmdruyskgo/Build/Products/Debug-iphonesimulator/DashBoard??.app/DashBoard?? normal i386

cd "/Users/MacMini??/Desktop/DashBoard?? 1" setenv MACOSX_DEPLOYMENT_TARGET 10.6 setenv PATH "/Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin:/Developer/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin" /Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin/llvm-gcc-4.2 -arch i386 -isysroot /var/folders/8B/8BGab5iaFeeebTcSD9rTwU+++TI/-Caches-/com.apple.Xcode.501/CompositeSDKs/iphonesimulator-iPhoneSimulator4.3-bubbnicuystyimgjljhyzsdbfqsf -L/Users/MacMini??/Library/Developer/Xcode/DerivedData??/DashBoard??-dnjapugvetrgnxgfxrjmdruyskgo/Build/Products/Debug-iphonesimulator "-L/Users/MacMini??/Desktop/DashBoard?? 1/CorePlotInstall??DB/iosbinaries" "-L/Users/MacMini??/Desktop/DashBoard?? 1/QuartzCore??.framework" -F/Users/MacMini??/Library/Developer/Xcode/DerivedData??/DashBoard??-dnjapugvetrgnxgfxrjmdruyskgo/Build/Products/Debug-iphonesimulator -FQuartzCore.framework -FQuartzCore.framework/Headers "-F/Users/MacMini??/Desktop/DashBoard?? 1" -filelist /Users/MacMini??/Library/Developer/Xcode/DerivedData??/DashBoard??-dnjapugvetrgnxgfxrjmdruyskgo/Build/Intermediates/DashBoard??.build/Debug-iphonesimulator/DashBoard??.build/Objects-normal/i386/DashBoard??.LinkFileList?? -mmacosx-version-min=10.6 -ObjC -all_load -lCorePlot -Xlinker -objc_abi_version -Xlinker 2 -framework UIKit -framework Foundation -framework CoreGraphics?? -lCorePlot-CocoaTouch?? -o /Users/MacMini??/Library/Developer/Xcode/DerivedData??/DashBoard??-dnjapugvetrgnxgfxrjmdruyskgo/Build/Products/Debug-iphonesimulator/DashBoard??.app/DashBoard?? ld: duplicate symbol squareOfDistanceBetweenPoints in /Users/MacMini??/Desktop/DashBoard?? 1/CorePlotInstall??DB/iosbinaries/libCorePlot-CocoaTouch??.a(CPScatterPlot.o) and /var/folders/8B/8BGab5iaFeeebTcSD9rTwU+++TI/-Caches-/com.apple.Xcode.501/CompositeSDKs/iphonesimulator-iPhoneSimulator4.3-bubbnicuystyimgjljhyzsdbfqsf/usr/lib/libCorePlot.a(CPScatterPlot.o) for architecture i386 collect2: ld returned 1 exit status Command /Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin/llvm-gcc-4.2 failed with exit code 1

ld: duplicate symbol squareOfDistanceBetweenPoints in /Users/MacMini??/Desktop/DashBoard?? 1/CorePlotInstall??DB/iosbinaries/libCorePlot-CocoaTouch??.a(CPScatterPlot.o) and /var/folders/8B/8BGab5iaFeeebTcSD9rTwU+++TI/-Caches-/com.apple.Xcode.501/CompositeSDKs/iphonesimulator-iPhoneSimulator4.3-bubbnicuystyimgjljhyzsdbfqsf/usr/lib/libCorePlot.a(CPScatterPlot.o) for architecture i386 collect2: ld returned 1 exit status Command /Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin/llvm-gcc-4.2 failed with exit code 1

This error occurred after installing core-plot through SDK method as given in wiki...can anybody explain me what this error means and help me solve this.

Thank U

Comment by project member eskr...@mac.com, Jul 14, 2011

As of version 0.4, the SDK install is no longer supported. 0.4 includes a universal (device + simulator) static library that you should use instead.

Comment by colorado...@gmail.com, Jul 23, 2011

When you say "drag the CorePlot?.xcodeproj bundle into your application's Xcode project (without copying the file)", drag it where?

Thank you! Steve

Comment by colorado...@gmail.com, Jul 23, 2011

I'm getting the "No such file or directory" error at the "#import <CorePlot?/CorePlot?.h>" line of code after following the directions at the top of this page. So how do you tell Xcode where to go find the header?

Thank you! Steve

Comment by archball...@gmail.com, Jul 24, 2011

"No such file or directory" comes if header path isnt given o if its wrong..open the application->click on Ur project name->it will show Ur project and targets->go to project build settings->give header search path in search tab->give path to Ur header file from there.then compile..it wont display any error. To find header path..right click on Ur header file in core-plot folder and click on get info..copy the path and paste it here.

Comment by archball...@gmail.com, Jul 24, 2011

tick mark on recursive while giving header path

Comment by quique...@gmail.com, Aug 3, 2011

My project worked fine on Xcode 3.2, I have since upgraded to Lion and Xcode 4.2. Im getting this error:

Check Dependencies No Architectures to compile for (ONLY_ACTIVE_ARCH=YES, active arch=i386, VALID_ARCHS=armv6 armv7)

Dash1 (my project) has: Architectures: Standard armv6 armv7 Base SDK: Latest iOS4.3 Build for Active Architecture Only: YES Supported Platforms: iphonesimulator iphoneos Valid architectures armv6 armv7

Compiler LLVM GCC 4.2 Targeted Family: iPhone iOS Deployment Target: iOS 4.3 Other Linker Flags -ObjC - allLoad

Then the CorePlot? Build Settings have: Architectures: Standard armv6 armv7 Base SDK: Latest iOS4.3 Build for Active Architecture Only: YES Supported Platforms: iphonesimulator iphoneos Valid architectures armv6 armv7

What else can I do?

Comment by project member eskr...@mac.com, Aug 3, 2011

Questions like this will get a wider audience and are more likely to get answered on the discussion board. http://groups.google.com/group/coreplot-discuss

The "Build for Active Architecture Only" setting should be YES for builds that will run in the simulator and NO if you want to run on the device.

Comment by casspang...@gmail.com, Aug 4, 2011

For all of you struggling with xcode4 setup, I made a tutorial on how I did it with pictures. Hope this helps!

http://recycled-parts.blogspot.com/2011/07/setting-up-coreplot-in-xcode-4.html

Comment by jennifer...@gmail.com, Aug 11, 2011

Did you ever get an Osirix plugin to work with CorePlot?? (eskr...@gmail.com) If so, please can you advice how? I think the problem is to do with inheriting from the superclass "PluginFilter?" not "NSObject <CPTPlotDataSource>"... Thanks Jen

Comment by quique...@gmail.com, Aug 23, 2011

I had core plot working fine in a project called Dash. I had originally dragged the coreplotcocoatouch.xcodeproj file into it. Today I attempted to create a second app with core plot and when i dragged the coreplotcocoatouch.xcodeproj from the original core plot_0.4 download folder, it made a mess:

1. It removed the coreplotcocoatouch.xcodeproj file from my old app (Dash). 2. It didn't add it to my new app (datum)

and when i dragged it back into my old add,:

3. The build paths and headers point to my new apps folder...

Why did this happen?

Comment by b...@shastevineyard.com, Aug 31, 2011

Newly installed core-plot ... followed all installation instructions ... example iPhone app builds/runs fine ... but same code crashes within my project. Must be something simple, like not correctly linking to static library. Any ideas:

2011-08-31 10:28:24.287 Thecus[19012:207] -setCollapsesLayers:?: unrecognized selector sent to instance 0x4e45b30 2011-08-31 10:28:24.290 Thecus[19012:207] Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-setCollapsesLayers:?: unrecognized selector sent to instance 0x4e45b30' Call stack at first throw: (

0 CoreFoundation? 0x011e95a9 exceptionPreprocess + 185
  1. libobjc.A.dylib 0x0133d313 objc_exception_throw + 44
2 CoreFoundation? 0x011eb0bb -[NSObject(NSObject) doesNotRecognizeSelector:] + 187 3 CoreFoundation? 0x0115a966 forwarding + 966 4 CoreFoundation? 0x0115a522 CF_forwarding_prep_0 + 50 5 Thecus 0x000029c3 -viewDidLoad? + 861 6 UIKit 0x0044f089 -view? + 179 7 Thecus 0x00001f2e -application:didFinishLaunchingWithOptions:? + 79 8 UIKit 0x0039fc89 -_callInitializationDelegatesForURL:payload:suspended:? + 1163 9 UIKit 0x003a1d88 -_runWithURL:payload:launchOrientation:statusBarStyle:statusBarHidden:? + 439
  1. UIKit 0x003ac617 -handleEvent:withNewEvent:? + 1533
  2. UIKit 0x003a4abf -sendEvent:? + 71
  3. UIKit 0x003a9f2e UIApplicationHandleEvent + 7576
  4. GraphicsServices? 0x01b41992 PurpleEventCallback? + 1550
  5. CoreFoundation? 0x011ca944 CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE1_PERFORM_FUNCTION + 52
  6. CoreFoundation? 0x0112acf7 CFRunLoopDoSource1 + 215
  7. CoreFoundation? 0x01127f83 CFRunLoopRun + 979
  8. CoreFoundation? 0x01127840 CFRunLoopRunSpecific + 208
  9. CoreFoundation? 0x01127761 CFRunLoopRunInMode + 97
  10. UIKit 0x003a17d2 -_run? + 623
20 UIKit 0x003adc93 UIApplicationMain + 1160 21 Thecus 0x00001e64 main + 102 22 Thecus 0x00001df5 start + 53 23 ??? 0x00000001 0x0 + 1
) terminate called after throwing an instance of 'NSException' Program received signal: “SIGABRT”. (gdb)

Comment by goldrunn...@gmail.com, Oct 12, 2011

Since ARC is no longer under NDA (Xcode 4.2 was released today), I can comment on my problem: I've followed all the instructions to get the CorePlot? framework included in my Lion app. Problem is, if I include it in a file (<CorePlot?/CorePlot?.h>, it fails to build citing non-ARC compliant problems, if I don't ever include it, it builds perfectly. And yes, I have added the "-fno-objc-arc" flag to all CorePlot? source files, which makes this situation even more frustrating. Please help.

Comment by project member waupacalarson@gmail.com, Oct 28, 2011

Pull the latest version of Core Plot from the repository. It is now fully ARC-compatible.

Comment by compwiz...@gmail.com, Nov 17, 2011

I have downloaded the Coreplot library 0.9 from CorePlot? Home http://code.google.com/p/core-plot/downloads/detail?name=CorePlot_0.9.zip&can=2&q= ..... So does it not contain the compatibility changes ?

Comment by project member eskr...@mac.com, Nov 18, 2011

The ARC-compatible headers were added after 0.9. You'll need to pull the latest code with Mercurial or wait for the next release.

Comment by vlraj...@gmail.com, Nov 20, 2011

Already 4 days I can not advice. I stopped at the outset. Copy and Install Core fence I 0.9 through I add file into the Xcode project added CorePlot?-CocoaTouch?.xcodeproj. I set Other Linkers for Flag-ObjC. The Build Phases I added the Target Dependenciens CorePlot?-CocoaTopuch?.a. While everything is OK. when I want to add to CocoaTopuch?.a CorePlot?-Link Binary With Libraries and library displays I red. App A declares an error-CorePlot? CocoaTouch?.h No such file or doirectory.

Please government help. Vlado Rajcok

Comment by project member eskr...@mac.com, Nov 20, 2011

Did you set the header search path?

Comment by fi...@me.com, Dec 16, 2011

I've followed all steps above with my own project, but can't seem to get beyond this:

2011-12-16 18:36:09.576 Truck[23737:fb03] -cgFloatValue?: unrecognized selector sent to instance 0x6c9d5d0 2011-12-16 18:36:09.577 Truck[23737:fb03] Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-cgFloatValue?: unrecognized selector sent to instance 0x6c9d5d0' First throw call stack: etc.

Comment by fi...@me.com, Dec 16, 2011

I should add that -ObjC and -all_load flags have been set.

Comment by fi...@me.com, Dec 17, 2011

Please help someone: I have an urgent deadline!

Comment by uladzimi...@leverx.com, Dec 18, 2011

Hey fi...@me.com,

would be helpful to see the code where the error appears. If you can not find it with debugger, try to find the text cgFloatValue] of sending instance message 'cgFloatValue'.

The most likely problem is that the NSNumber category for -cgFloatValue is not recognized, you could also try to find where it is declared and play a little around.

Regards, Uladzimir.

Comment by fi...@me.com, Dec 18, 2011

Thanks for responding Uladzimir...

In my code there is no direct usage of the symbol cgFloatValue. In fact, all I have attempted to do is get the CorePlot? iPad example (in a simplified form) working from within an existing project. It is also not at any point in my code where the crash occurs. All the following lines of code run through without crashing (this is just a small selection of the code):

scatterPlotView = [alloc? initWithFrame:CGRectMake(0, 0, 768, 400)]; treadGraph = [alloc? initWithFrame:CGRectMake(0, 0, 768, 400)]; CPTTheme theme = themeNamed:kCPTPlainWhiteTheme?; [treadGraph applyTheme:theme]; scatterPlotView.hostedGraph = treadGraph;

: :

treadGraph.paddingLeft = 10.0; treadGraph.paddingTop = 10.0; treadGraph.paddingRight = 10.0; treadGraph.paddingBottom = 10.0;

// Setup plot space CPTXYPlotSpace plotSpace = (CPTXYPlotSpace ) treadGraph.defaultPlotSpace; plotSpace.allowsUserInteraction = YES; plotSpace.xRange = plotRangeWithLocation:CPTDecimalFromFloat(1.0) length:CPTDecimalFromFloat(2.0)?; plotSpace.yRange = plotRangeWithLocation:CPTDecimalFromFloat(1.0) length:CPTDecimalFromFloat(3.0)?;

: : etc. etc.

I have seen that cgFloatValue is declared in the NSNumber category CPTExtensions (header file: NSNumberExtensions.h). I can also verify that all headers are on the search path.

So it appears to me - although I may be wrong - that the category implementation of cgFloatValue (if I can call it that) is missing at runtime. But of course libCorePlot-CocoaTouch?.a is included as one of the linked in binaries (otherwise non of the above lines would work), so I don't know what to do beyond this.

Thanks in advance for any advice or suggestions.

Finav

Comment by project member eskr...@mac.com, Dec 18, 2011

More people are likely to see your question if you post it on the Core Plot discussion board. http://groups.google.com/group/coreplot-discuss/topics

You're right--the `cgFloatValue category method isn't being loaded. The -ObjC and -all_load flags should take care of that. What version of Xcode and which compiler are you using? Which version of Core Plot?

Comment by fi...@me.com, Dec 18, 2011

XCode 4.2, CorePlot? 0.9

Thx for the hint about the discussion board. I'm new to CorePlot? and am still navigating my way around the forum.

Comment by project member eskr...@mac.com, Dec 18, 2011

Based on what you've said, it should work. Do the example apps run for you? If so, take another look at the linker flags and make sure they're set for the active build.

Comment by fi...@me.com, Dec 19, 2011

Finally cracked it - basically by cleaning up every conceivable cache and output directory used by XCode. But to answer your question, the samples always did work, and that was what was so frustrating, because I was spending the entire time trying to spot a difference in by settings compared to the sample - and of course there was none.

Comment by fabianig...@gmail.com, Jan 24, 2012

Hi I'm using XCode 4.2 on snow leopard and followed the steps on "Static Library Install" I can reference all the classes but wehn I compiled I get a Build Failed with no issues error. I google and try many installs, but I always get the same problema. Don't know where to look anymore Could u help me? Thanks !

Comment by Hyboo...@gmail.com, Jan 30, 2012

Hi all, I'm new to ios. I followed the steps as the instruction and tried to build my project by Xcode 3.2.2. i got some errors like "'CALayer' may not respond to '-encodeWithCoder:' ". I tried to build the examples and got the same errors. Anyone knows the reason? How can i fix this problem?


Sign in to add a comment
Powered by Google Project Hosting