plot

package
v0.0.0-...-040724e Latest Latest
Warning

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

Go to latest
Published: Jun 6, 2019 License: BSD-3-Clause, GPL-2.0, BSD-3-Clause, + 1 more Imports: 12 Imported by: 0

Documentation

Overview

Package plot provides methods for plotting data. This package uses the gonum plot library Plot type. Produce a plot using the Plot function and then export into an antha filetype using the Export function

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AddAxisTitles

func AddAxisTitles(plt *plot.Plot, xtitle string, ytitle string)

AddAxisTitles adds axis titles to the plot

func Export

func Export(plt *plot.Plot, heightstr string, lengthstr string, filename string) (file wtype.File, err error)

Export creates a wtype.file from the plot data. Heights and lengths can be parsed from strings i.e. 10cm. If no valid height or length is specified default values of 10cm will be used but an error will also be returned. If the desired filename specified does not contain a file extension, a png file will be used as the default file format.

func FromMinMaxPairs

func FromMinMaxPairs(sheet *xlsx.Sheet, Xminmax []string, Yminmaxarray [][]string, Exportedfilename string)

FromMinMaxPairs creates a plot from a spreadsheet.

func FromSpreadsheet

func FromSpreadsheet(sheet *xlsx.Sheet, Xdatarange []string, Ydatarangearray [][]string, Exportedfilename string)

FromSpreadsheet creates a plot from a spreadsheet.

func Plot

func Plot(Xvalues []float64, Yvaluearray [][]float64) (plt *plot.Plot, err error)

Plot creates a plot from float data. Multiple sets of y values may be specified for a set of x values. The length of any yvalue dataset must be equal to the length of xvalues or the function will stop and return an error.

func RSquared

func RSquared(xname string, xvalues []float64, yname string, yvalues []float64) (rsquared float64, variance float64, formula string)

RSquared computes R^2

Types

This section is empty.

Jump to

Keyboard shortcuts

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