Documentation ¶
Overview ¶
package qplot provides compatibility between QFrame and gonum.org/v1/plot
Index ¶
- Constants
- type BarConfig
- type BoxPlotConfig
- type Config
- type ConfigFunc
- type FormatType
- type HistogramConfig
- type LabelFunc
- type Labeller
- type LabelsConfig
- type LineConfig
- type PlotterFunc
- func BarPlotter(valuer plotter.Valuer, width vg.Length, cfg BarConfig) PlotterFunc
- func BoxPlot(w vg.Length, loc float64, values plotter.Valuer, cfg BoxPlotConfig) PlotterFunc
- func HistogramPlotter(xyer plotter.XYer, n int, cfg HistogramConfig) PlotterFunc
- func Labels(labeller XYLabeller, cfg LabelsConfig) PlotterFunc
- func LinePlotter(xyer plotter.XYer, cfg LineConfig) PlotterFunc
- func PolygonPlotter(xyer plotter.XYer, cfg PolygonConfig) PlotterFunc
- func QuartPlot(loc float64, values plotter.Valuer, cfg QuartConfig) PlotterFunc
- func ScatterPlotter(xyer plotter.XYer, cfg ScatterConfig) PlotterFunc
- func XErrorBars(xyer XYer, xerr XErrorer, cfg XErrorBarsConfig) PlotterFunc
- func YErrorBars(xyer XYer, yerr YErrorer, cfg YErrorBarsConfig) PlotterFunc
- type PolygonConfig
- type QPlot
- type QuartConfig
- type ScatterConfig
- type ValueFunc
- type Valuer
- type XErrorBarsConfig
- type XErrorer
- type XYLabeller
- type XYZer
- type XYer
- type YErrorBarsConfig
- type YErrorer
Constants ¶
const ( SVG = FormatType("svg") PNG = FormatType("png") )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BoxPlotConfig ¶
BoxPlotConfig is an optional function which configures a BoxPlot after creation.
type Config ¶
type Config struct { Plotters []PlotterFunc Width vg.Length Height vg.Length Format FormatType PlotConfig func(*plot.Plot) }
Config specifies the QPlot configuration.
type ConfigFunc ¶
type ConfigFunc func(*Config)
ConfigFunc is a functional option for configuring QPlot.
func PlotConfig ¶
func PlotConfig(fn func(*plot.Plot)) ConfigFunc
PlotConfig is an optional function which configures a plot.Plot prior to serialization.
type HistogramConfig ¶
HistogramConfig is an optional function which configures a Histogram after creation.
type LabelFunc ¶
LabelFunc returns a string representation of the value in row i.
func LabelOfBool ¶
LabelOfBool returns a BoolView compatible LabelFunc
func LabelOfEnum ¶
LabelOfEnum returns a EnumView compatible LabelFunc
func LabelOfFloat ¶
LabelOfFloat returns a FloatView compatible LabelFunc fmt determines the float format when creating a string
func LabelOfInt ¶
LabelOfInt returns an IntView compatible LabelFunc
func LabelOfString ¶
func LabelOfString(view qframe.StringView) LabelFunc
LabelOfString returns a StringView compatible LabelFunc
type Labeller ¶
type Labeller struct {
// contains filtered or unexported fields
}
Labeller implements the Labeller interface defined in gonum.org/v1/plot/plotter. It accepts any of the predefined LabelFunc methods in this package or a custom function may be specified.
func NewLabeller ¶
NewLabeller returns a new Labeller
type LabelsConfig ¶
LabelsConfig is an optional function which configures a Labels after creation.
type LineConfig ¶
LineConfig is an optional function which configures a Line after creation.
type PlotterFunc ¶
PlotterFunc returns a plot.Plotter.
func BarPlotter ¶
BarPlotter returns a new PlotterFunc that plots a bar
func BoxPlot ¶
func BoxPlot(w vg.Length, loc float64, values plotter.Valuer, cfg BoxPlotConfig) PlotterFunc
BoxPlot returns a new PlotterFunc that plots a BoxPlot.
func HistogramPlotter ¶
func HistogramPlotter(xyer plotter.XYer, n int, cfg HistogramConfig) PlotterFunc
HistogramPlotter returns a new PlotterFunc that plots a histogram
func Labels ¶
func Labels(labeller XYLabeller, cfg LabelsConfig) PlotterFunc
Labels returns a new PlotterFunc that plots a plotter.Labels.
func LinePlotter ¶
func LinePlotter(xyer plotter.XYer, cfg LineConfig) PlotterFunc
LinePlotter returns a new PlotterFunc that plots a line
func PolygonPlotter ¶
func PolygonPlotter(xyer plotter.XYer, cfg PolygonConfig) PlotterFunc
PolygonPlotter returns a new PlotterFunc that plots a polygon
func QuartPlot ¶
func QuartPlot(loc float64, values plotter.Valuer, cfg QuartConfig) PlotterFunc
QuartPlot returns a new PlotterFunc that plots a QuartPlot.
func ScatterPlotter ¶
func ScatterPlotter(xyer plotter.XYer, cfg ScatterConfig) PlotterFunc
ScatterPlotter returns a new PlotterFunc that plots a Scatter.
func XErrorBars ¶
func XErrorBars(xyer XYer, xerr XErrorer, cfg XErrorBarsConfig) PlotterFunc
XErrorBars returns a new PlotterFunc that plots a XErrorBars.
func YErrorBars ¶
func YErrorBars(xyer XYer, yerr YErrorer, cfg YErrorBarsConfig) PlotterFunc
YErrorBars returns a new PlotterFunc that plots a YErrorBars.
type PolygonConfig ¶
PolygonConfig is an optional function which configures a Polygon after creation.
type QPlot ¶
type QPlot struct {
Config
}
QPlot is a abstraction over Gonum's plotting interface for a less verbose experience in interactive environments such as Jypter notebooks.
type QuartConfig ¶
QuartConfig is an optional function which configures a QuartPlot after creation.
type ScatterConfig ¶
ScatterConfig is an optional function which configures a Scatter after creation.
type ValueFunc ¶
ValueFunc returns a float representation of the value in row i.
func MustNewValueFunc ¶
MustNewValueFunc returns a ValueFunc and panics when an error is encountered.
func NewValueFunc ¶
NewValueFunc returns a ValueFunc for column col if it is a numeric column, or returns an error.
func ValueOfFloat ¶
ValueOfFloat returns an FloatView compatible ValueFunc
func ValueOfInt ¶
ValueOfInt returns an IntView compatible ValueFunc
type Valuer ¶
type Valuer struct {
// contains filtered or unexported fields
}
Valuer implements the Valuer interface defined in gonum.org/v1/plot/plotter.Valuer
func MustNewValuer ¶
MustNewValuer returns a new Valuer from the values in col.
type XErrorBarsConfig ¶
type XErrorBarsConfig func(*plot.Plot, *plotter.XErrorBars)
XErrorBarsConfig is an optional function which configures a XErrorBars after creation.
type XErrorer ¶
type XErrorer struct {
// contains filtered or unexported fields
}
XErrorer implements the XErrorer interface defined in gonum.org/v1/plot/plotter
func MustNewXErrorer ¶
MustNewXErrorer returns a new XErrorer for the values in column low and high of the QFrame. All columns must have numeric types.
func NewXErrorer ¶
NewXErrorer returns a new XErrorer for the values in column low and high of the QFrame. All columns must have numeric types.
type XYLabeller ¶
XYLabeller implements the XYLabeller interface defined in gonum.org/v1/plot/plotter. It is a union of the Labeller and XYer types defined in this package.
type XYZer ¶
type XYZer struct {
// contains filtered or unexported fields
}
XYZer implements the XYZer interface defined in gonum.org/v1/plot/plotter
func MustNewXYZer ¶
MustNewXYZer returns a new XYZer from the values in column x, y, and z. All columns must have numeric types.
func NewXYZer ¶
NewXYZer returns a new XYZer from the values in column x, y, and z. All columns must have numeric types.
type XYer ¶
type XYer struct {
// contains filtered or unexported fields
}
XYer implements the XYer interface defined in gonum.org/v1/plot/plotter.
func MustNewXYer ¶
MustNewXYer returns a new XYer from the values in column x and y. Both columns must have numeric types.
type YErrorBarsConfig ¶
type YErrorBarsConfig func(*plot.Plot, *plotter.YErrorBars)
YErrorBarsConfig is an optional function which configures a YErrorBars after creation.
type YErrorer ¶
type YErrorer struct {
// contains filtered or unexported fields
}
YErrorer implements the YErrorer interface defined in gonum.org/v1/plot/plotter
func MustNewYErrorer ¶
NewYErrorer returns a new YErrorer for the values in column low and high of the QFrame. All columns must have numeric types.
func NewYErrorer ¶
NewYErrorer returns a new YErrorer for the values in column low and high of the QFrame. All columns must have numeric types.