Skip to content
Core Plot Gallery is now part of the official Core Plot distribution. See the README for details.
Objective-C C
Find file
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.
Plot Gallery-Mac.xcodeproj
Plot Gallery-iOS.xcodeproj


Core Plot Gallery is now part of Core Plot.
You can find the most recent version in the 
examples directory of the Core Plot source

A gallery of Core Plot examples for Mac OS X and iOS.

There are currently a few generic examples in the 
plots group of the Xcode projects, but the hope is 
to provide small simple examples that illustrate
a simple task in core-plot (creating a floating 
axis, for example).

To add a new plot:

1. Create a new class that derives from PlotItem

2. Add a 
	+ (void)load 
   class method to register the class via the
	[super registerPlotItem:self];
   This makes it show up in the tableview/imageview.

3. If you are only generating a single plot, override
   the renderInLayer:withTheme method to create your
   graphs.  Make sure you add your CPGraph object to
   the graphs array.

4. Add any delegate methods you need for handling
   labels or user interaction.

If your view consists of multiple plots, you also
need to override the 
method to set up your CPLayers. You should also 
override the 
on the Mac and 
on iOS to handle resizing and device rotation. See
the CompositePlot.[hm] files for an example of
creating multiple plots.

If you are just generating a single plot, the 
resizing and rotation handling are done for you.

Something went wrong with that request. Please try again.