Documentation ¶
Overview ¶
Go package for Plotting.
Index ¶
- type Plot
- func (p *Plot) Box()
- func (p *Plot) GetBinCenters() []float64
- func (p *Plot) GetBinCounts() []int
- func (p *Plot) GetBinHeight() float64
- func (p *Plot) GetBinWidth() float64
- func (p *Plot) GetBins() int
- func (p *Plot) GetColor() color.Color
- func (p *Plot) GetData() []float64
- func (p *Plot) GetFileName() string
- func (p *Plot) GetHeight() int
- func (p *Plot) GetMinMax() (float64, float64)
- func (p *Plot) GetName() string
- func (p *Plot) GetWidth() int
- func (p *Plot) Histogram()
- func (p *Plot) Line()
- func (p *Plot) Scatter()
- func (p *Plot) SetBins(bins int)
- func (p *Plot) SetColor(color color.Color)
- func (p *Plot) SetData(data []float64)
- func (p *Plot) SetFileName(fileName string)
- func (p *Plot) SetHeight(height int)
- func (p *Plot) SetMax(max float64)
- func (p *Plot) SetMin(min float64)
- func (p *Plot) SetMinMax(min float64, max float64)
- func (p *Plot) SetName(name string)
- func (p *Plot) SetWidth(width int)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Plot ¶
type Plot struct { // The data to be plotted. Data []float64 // The width of the plot. Width int // The height of the plot. Height int // The color of the plot. Color color.Color // The name of the plot. Name string // The name of the file to save the plot to. FileName string // The minimum value of the plot. Min float64 // The maximum value of the plot. Max float64 // The number of bins to use for the plot. Bins int // The number of bins to use for the plot. BinWidth float64 // The number of bins to use for the plot. BinHeight float64 // The number of bins to use for the plot. BinCounts []int // The number of bins to use for the plot. BinCenters []float64 }
Plot is a struct that holds the data to be plotted.
func NewPlot ¶
func NewPlot(data []float64, width int, height int, color color.Color, name string, fileName string) *Plot
NewPlot returns a new plot.
func (*Plot) GetBinCenters ¶
GetBinCenters returns the centers of the bins.
func (*Plot) GetBinCounts ¶
GetBinCounts returns the counts of the bins.
func (*Plot) GetBinHeight ¶
GetBinHeight returns the height of the bins.
func (*Plot) GetBinWidth ¶
GetBinWidth returns the width of the bins.
func (*Plot) SetFileName ¶
SetFileName sets the file name.
Click to show internal directories.
Click to hide internal directories.