PowerPlotPercolation logo

Examples

The following images showcase examples from the demo app on the iPhone that can be downloaded here together with PowerPlot itself. Please click on each image to see the source code that generates each graph in the demo app.

Animations

PowerPlot supports animations (on iOS 4.0 and above). These animations are similar to those of UIView, but with more powerful and flexible callbacks, similar to OpenGL. Three examples show different capabilities of animations: Animation of a standard line chart, animation of the entire coordinate system and animation of a ocombined chart with bars and lines.

Animation of a line chart
See the source code.


See the source code.


See the source code.

Interactive charts

It is often necessary to not only display the information, but also to let the user interact with it. The first example extends one chart from the data chart section with scrolling and zooming gestures. Furthermore, a custom handler for selecting individual points can be implemented easily. The second chart shows how to implement a response to selecting bars in the code. It is based on the election chart in the bar chart section. This functionality is available by default since PowerPlot v1.4 (earlier for commercial customers) and can be activated with a few lines of code. The third example is a graph whose nodes can be manually selected. The current selection is displayed in a label at the top of the screen.

Interactive scientific data
See the source code.

Interactive Election chart
See the source code.

Interactive Business graph
See the source code.

Bar charts

Bar charts can have a unified appearance for all bars or be individually configured. The first example shows a standard bar chart. The second one features individually configured bars. The third chart is an example of combining multiple data sets in a single bar chart.

The fourth example shows how users can be “alerted” of custom conditions, in this case if the number of bankrupts becomes too high.

Failed banks in the US
See the source code.

German Federal Elections 2009
See the source code.

Web traffic field-theory.org
See the source code.

Failed banks with alerting
See the source code.

Graphs

Graphs consist of nodes with connections. Connections can have a strength and a direction, or be bidirectional. The first example is a standard chart, the second one shows individually colored nodes.

Business model graph
See the source code.

Value creation model graph
See the source code.

Data charts

Data charts can be configured in a wide variety of manners. The first chart shows how to configure even the more exotic options available. The second shows a scatter plot with contour regions, easily obtained by combining different chart types. The third one is a practical example taken from Phys.Rev. D82:094592, 2010 that shows how real-life data can easily be visualized (in the latter case the error band has been scaled up to make it more visually prominent). Note that further code for fits and data can be found on www.field-theory.org. The fourth plot is a combination of four lines, three of which have shadows (in different “heights”) and smooth Bezier interpolations.

The fifth example shows the use of automatic data bindings where the chart is automatically updated when the underlying data is modified.

Scientific data 1
See the source code.

Scatter plot with contours
See the source code.

Scientific data 2
See the source code.

Multiple lines plot
See the source code.

Automatic chart update
See the source code.

Data model manipulations

PowerPlot is based on a powerful data model that is both extensible and flexible. Whereas all previous examples are essentially based on data in the form of arrays (e.g., downloaded from a web service or taken from a computational kernel in C++) it is possible to use the model class WSData directly for manipulations. The example below demonstrates a couple of the features that the data model provides.

Operations on data model
See the source code.