OKCartesius class documentation

Authors

Riccardo Mottola

Copyright: (C) 2011-2017 Free Software Foundation


Contents -

  1. Software documentation for the OKCartesius class
  2. OKCartesius types

Software documentation for the OKCartesius class

OKCartesius : NSView

Declared in:
OKCartesius.h

The OKCartesius class is meant to plot x-y data, e.g. like a y=f(x) function on a Carthesian plane.

Data is represented as an array of NSPoints.

The engine can plot one or two curves in different colors on the same plane with the same scale.


Instance Variables

Method summary

curve1 

- (NSMutableArray*) curve1;
series 1 array of NSPoints

curve2 

- (NSMutableArray*) curve2;
series 2 array of NSPoints

setAxisColor: 

- (void) setAxisColor: (NSColor*)color;
graph background color

setBackgroundColor: 

- (void) setBackgroundColor: (NSColor*)color;
sets graph background color

setCurve1Color: 

- (void) setCurve1Color: (NSColor*)color;
sets color of curve 1

setCurve2Color: 

- (void) setCurve2Color: (NSColor*)color;
sets color of curve 2

setQuadrantPositioning: 

- (void) setQuadrantPositioning: (OKQuadrantPositioning)p;
sets which quadrants are visible

setVisibleXUnits: 

- (void) setVisibleXUnits: (float)units;
sets visible part of X in units

setVisibleYUnits: 

- (void) setVisibleYUnits: (float)units;
sets visible part of Y in units



Instance Variables for OKCartesius Class

axisColor

@protected NSColor* axisColor;
Description forthcoming.

backgroundColor

@protected NSColor* backgroundColor;
Description forthcoming.

curve1

@protected NSMutableArray* curve1;
array of NSPoints in NSValues

curve1Color

@protected NSColor* curve1Color;
Description forthcoming.

curve2

@protected NSMutableArray* curve2;
array of NSPoints in NSValues

curve2Color

@protected NSColor* curve2Color;
Description forthcoming.

quadrantPositioning

@protected OKQuadrantPositioning quadrantPositioning;
Description forthcoming.

visibleXUnits

@protected float visibleXUnits;
Description forthcoming.

visibleYUnits

@protected float visibleYUnits;
Description forthcoming.




OKCartesius types

OKQuadrantPositioning

typedef enum ... OKQuadrantPositioning;
Defines the quadrants plotted.
OKQuadrantCentered
All quadrants visible, origin is placed in the middle
OKQuadrantI
Quadrant I
OKQuadrantII
Quadrant II
OKQuadrantIII
Quadrant III
OKQuadrantIV
Quadrant IV
OKQuadrantAuto
Automatic placement. E.g. Quadrant 3 and 4 are not visible, only y-positive values are displayed