scatter

package
v1.0.0-alpha Latest Latest
Warning

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

Go to latest
Published: Feb 18, 2021 License: BSD-3-Clause, MIT Imports: 10 Imported by: 0

Documentation

Overview

Package scatter draws a svg scatter plot.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreateLegend

func CreateLegend(data Legend)

CreateLegend creates a legend for a dotplot.

func WriteElement

func WriteElement(file afero.File) func(str string)

WriteElement writes an svg element/tag to a file.

Types

type Legend

type Legend struct {
	Filename string
	Points   []map[string]string
	Title    string
}

Legend settings.

type Scatter

type Scatter struct {
	LogBase  string
	Plot     []types.ScatterPoint
	PlotSize float64 // Height/width in pixels
	Ticks    Ticks
	XLabel   string
	YLabel   string
}

Scatter plot properties

func Initialize

func Initialize() *Scatter

Initialize a scatter plot.

func (*Scatter) Draw

func (s *Scatter) Draw(filename string)

Draw a scatter in svg format.

type Ticks

type Ticks struct {
	X      []float64
	XLabel []string
	Y      []float64
	YLabel []string
}

Ticks for axes

Jump to

Keyboard shortcuts

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