plot

package
v0.0.0-...-98db5b7 Latest Latest
Warning

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

Go to latest
Published: May 7, 2020 License: CC-BY-4.0 Imports: 7 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Difference

func Difference(title, xaxis, yaxis string, h, w int, A, B LabeledData) (io.WriterTo, error)

Difference will subtract that datapoints of the Y axis of B from A. It will also add to the plot "A.Label - B.Label" A and B need to have the same number of elements. This only works on discrete n arrays so x=i intigers It will return an io.WriterTo and an error

func Verses

func Verses(title, xaxis, yaxis string, h, w int, data ...LabeledData) (io.WriterTo, error)

Verses does a verses line plot with the data passed. title,xaxis,yaxis are the labels for the plot image h,w are the size of the image returns a WriteTo. I did this because I thought the user might want to store an array of them

func Verses2

func Verses2(title, xaxis, yaxis string, h, w int, data []LabeledData) (io.WriterTo, error)

Verses2 does a verses line plot with the data passed. title,xaxis,yaxis are the labels for the plot image h,w are the size of the image returns a WriteTo. I did this because I thought the user might want to store an array of them Verse2 is the same as verses accept it takes a slice of LabeledData instead of a bunch of arguments of LabeledData

Types

type LabeledData

type LabeledData struct {
	Label string
	Data  plotter.XYs
}

LabeledData holdes the label and the data for the plot

func NewLabeledData

func NewLabeledData(label string, data interface{}) (LabeledData, error)

NewLabeledData will maake a labeled data. data supported is []float32, []float64, and plotter.XYs.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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