Documentation ¶
Index ¶
- type BrokenColorMap
- func (c *BrokenColorMap) Alpha() float64
- func (c *BrokenColorMap) At(v float64) (color.Color, error)
- func (c *BrokenColorMap) Max() float64
- func (c *BrokenColorMap) Min() float64
- func (c *BrokenColorMap) Palette(colors int) palette.Palette
- func (c *BrokenColorMap) SetAlpha(v float64)
- func (c *BrokenColorMap) SetHighCut(v float64)
- func (c *BrokenColorMap) SetMax(v float64)
- func (c *BrokenColorMap) SetMin(v float64)
- type BrokenScale
- type BrokenTicks
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BrokenColorMap ¶
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 ¶
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.