Table of Contents

Interface IAxis

Namespace
ScottPlot
Assembly
ScottPlot.dll

This interface describes a 1D axis (horizontal or vertical). Responsibilities include: min/max management, unit/pixel conversion, tick generation (and rendering), axis label rendering, and self-measurement for layout purposes.

public interface IAxis : IPanel
Inherited Members
Extension Methods

Properties

FrameLineStyle

LineStyle FrameLineStyle { get; }

Property Value

LineStyle

Label

The label is the text displayed distal to the ticks

LabelStyle Label { get; }

Property Value

LabelStyle

MajorTickStyle

TickMarkStyle MajorTickStyle { get; set; }

Property Value

TickMarkStyle

Max

double Max { get; set; }

Property Value

double

Min

double Min { get; set; }

Property Value

double

MinorTickStyle

TickMarkStyle MinorTickStyle { get; set; }

Property Value

TickMarkStyle

Range

Min/Max range currently displayed by this axis

CoordinateRangeMutable Range { get; }

Property Value

CoordinateRangeMutable

TickGenerator

Logic for determining tick positions and formatting tick labels

ITickGenerator TickGenerator { get; set; }

Property Value

ITickGenerator

TickLabelStyle

LabelStyle TickLabelStyle { get; set; }

Property Value

LabelStyle

Methods

GetCoordinate(float, PixelRect)

Get the coordinate of a pixel position given the location and size of the data area

double GetCoordinate(float pixel, PixelRect dataArea)

Parameters

pixel float
dataArea PixelRect

Returns

double

GetCoordinateDistance(float, PixelRect)

Given a distance in pixel space, converts to coordinate space

double GetCoordinateDistance(float pixelDistance, PixelRect dataArea)

Parameters

pixelDistance float

A distance in pixel units

dataArea PixelRect

The rectangle onto which the coordinates are mapped

Returns

double

The same distance in coordinate units

GetPixel(double, PixelRect)

Get the pixel position of a coordinate given the location and size of the data area

float GetPixel(double position, PixelRect dataArea)

Parameters

position double
dataArea PixelRect

Returns

float

GetPixelDistance(double, PixelRect)

Given a distance in coordinate space, converts to pixel space

double GetPixelDistance(double coordinateDistance, PixelRect dataArea)

Parameters

coordinateDistance double

A distance in coordinate units

dataArea PixelRect

The rectangle onto which the coordinates are mapped

Returns

double

The same distance in pixel units

RegenerateTicks(PixelLength)

Use the TickLabelStyle to generate ticks with ideal spacing.

void RegenerateTicks(PixelLength size)

Parameters

size PixelLength

SetTicks(double[], string[])

Replace the TickGenerator with a NumericManual pre-loaded with the given ticks.

void SetTicks(double[] xs, string[] labels)

Parameters

xs double[]
labels string[]