Documentation
¶
Index ¶
- func AdjustHue(msh *MSHFloat, unsatM float64) (h float64)
- func AngleDiff(a, b float64) float64
- func BoundedNormalize(val, min, max float64) (norm float64)
- func GroupPlot(p []PlotAssigner)
- type ColoredScatter
- func (c *ColoredScatter) DataRange() (xmin, xmax, ymin, ymax float64)
- func (c *ColoredScatter) Max() float64
- func (c *ColoredScatter) Min() float64
- func (c *ColoredScatter) Plot(da draw.Canvas, plt *plot.Plot)
- func (c *ColoredScatter) SetColormap(m Colormapper)
- func (c *ColoredScatter) SetMax(max float64)
- func (c *ColoredScatter) SetMin(min float64)
- func (c *ColoredScatter) SetScale(min, max float64)
- type Colormapper
- type Diverging
- type Grayscale
- type GridMat
- type Jet
- type LabFloat
- type MSHFloat
- type PlotAssigner
- type RGBFloat
- type ScaledColormapper
- type Uniform
- type VecXY
- type VecXYZ
- type XYSorter
- type XYZFloat
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func BoundedNormalize ¶
Transform a value to an interval between 0 and 1
func GroupPlot ¶
func GroupPlot(p []PlotAssigner)
Types ¶
type ColoredScatter ¶
type ColoredScatter struct { plotter.XYZs draw.GlyphStyle Colormapper // contains filtered or unexported fields }
coloredscatter implements the Plotter interface, drawing a bubble plot of x, y, z triples where the z value determines the color of the dot.
func NewColoredScatter ¶
func NewColoredScatter(xyzs plotter.XYZer) (*ColoredScatter, error)
NewColoredScatter returns a ColoredScatter that uses the default glyph style and colormap.
func (*ColoredScatter) DataRange ¶
func (c *ColoredScatter) DataRange() (xmin, xmax, ymin, ymax float64)
DataRange implements the DataRange method of the plot.DataRanger interface.
func (*ColoredScatter) Max ¶
func (c *ColoredScatter) Max() float64
func (*ColoredScatter) Min ¶
func (c *ColoredScatter) Min() float64
func (*ColoredScatter) Plot ¶
func (c *ColoredScatter) Plot(da draw.Canvas, plt *plot.Plot)
func (c *ColoredScatter) Plot(da plot.DrawArea, plt *plot.Plot) {
func (*ColoredScatter) SetColormap ¶
func (c *ColoredScatter) SetColormap(m Colormapper)
func (*ColoredScatter) SetMax ¶
func (c *ColoredScatter) SetMax(max float64)
func (*ColoredScatter) SetMin ¶
func (c *ColoredScatter) SetMin(min float64)
func (*ColoredScatter) SetScale ¶
func (c *ColoredScatter) SetScale(min, max float64)
type Colormapper ¶
Maps a value to a color
type Diverging ¶
type Diverging struct { Low *MSHFloat // Low valued color High *MSHFloat // High valued color // contains filtered or unexported fields }
func (*Diverging) ResetMidpoint ¶
func (d *Diverging) ResetMidpoint()
func (*Diverging) SetMidpoint ¶
type Grayscale ¶
type Grayscale struct { Inverted bool // Flip the direction of the maximum // contains filtered or unexported fields }
Linearly maps the colors between light gray and black
type Jet ¶
type Jet struct {
// contains filtered or unexported fields
}
Implementation of the jet colormap
type PlotAssigner ¶
type RGBFloat ¶
type RGBFloat struct {
R, G, B, Alpha float64
}
Comes from matlab, so RGB need to be between 0 and 1
func NewRGBFloat ¶
func (*RGBFloat) XYZ ¶
Converts RGB to XYZ Note from original author: The following performs a "gamma correction" specified by the sRGB color space. sRGB is defined by a canonical definition of a display monitor and has been standardized by the International Electrotechnical Commission (IEC 61966-2-1). The nonlinearity of the correction is designed to make the colors more perceptually uniform. This color space has been adopted by several applications including Adobe Photoshop and Microsoft Windows color management. OpenGL is agnostic on its RGB color space, but it is reasonable to assume it is close to this one.
type ScaledColormapper ¶
type ScaledColormapper interface { Colormapper SetScale(min float64, max float64) }
Maps a value in [0,1] to a color
type Uniform ¶
Single Color is a colormap which returns a single color regardless of the value of the input