plotextra

package module
v0.0.0-...-96488e3 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 23, 2018 License: MIT Imports: 4 Imported by: 2

README

plotextra

Additional types and functions for gonum.org/v1/plot

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BrokenColorMap

type BrokenColorMap struct {
	Base, OverFlow palette.ColorMap
}

func (*BrokenColorMap) Alpha

func (c *BrokenColorMap) Alpha() float64

Alpha returns the opacity value of the ColorMap.

func (*BrokenColorMap) At

func (c *BrokenColorMap) At(v float64) (color.Color, error)

At returns the color associated with the given value. If the value is not between Max() and Min(), an error is returned.

func (*BrokenColorMap) Max

func (c *BrokenColorMap) Max() float64

Max returns the current maximum value of the ColorMap.

func (*BrokenColorMap) Min

func (c *BrokenColorMap) Min() float64

Min returns the current minimum value of the ColorMap.

func (*BrokenColorMap) Palette

func (c *BrokenColorMap) Palette(colors int) palette.Palette

Palette creates a Palette with the specified number of colors from the ColorMap.

func (*BrokenColorMap) SetAlpha

func (c *BrokenColorMap) SetAlpha(v float64)

SetAlpha sets the opacity value of the ColorMap. Zero is transparent and one is completely opaque. The default value of alpha should be expected to be one. The function should be expected to panic if alpha is not between zero and one.

func (*BrokenColorMap) SetHighCut

func (c *BrokenColorMap) SetHighCut(v float64)

SetHighCut sets the cut point for switching between the base and overflow color maps.

func (*BrokenColorMap) SetMax

func (c *BrokenColorMap) SetMax(v float64)

SetMax sets the maximum value of the ColorMap.

func (*BrokenColorMap) SetMin

func (c *BrokenColorMap) SetMin(v float64)

SetMin sets the minimum value of the ColorMap.

type BrokenScale

type BrokenScale struct {
	HighCut         float64
	HighCutFraction float64
}

BrokenScale can be used as the value of an Axis.Scale function to set the axis to a linear scale with a break.

func (BrokenScale) Normalize

func (b BrokenScale) Normalize(min, max, x float64) float64

Normalize returns the fractional broken distance of x between min and max.

type BrokenTicks

type BrokenTicks struct {
	// HighCut is the location of the break in the scale
	HighCut float64

	// MaxFormat is the string format for the tick at the maximum value.
	// All other ticks will be formatted using plot.DefaultTicks.
	MaxFormat string
}

BrokenTicks creates ticks appropriate for a broken scale.

func (BrokenTicks) Ticks

func (b BrokenTicks) Ticks(min, max float64) []plot.Tick

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL