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: 8 Imported by: 0

Documentation

Overview

Package scatter creates an interactive scatter plot file.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Create

func Create(data *Data)

Create a file for the interactive scatter plot viewer.

Types

type Data

type Data struct {
	AnalysisType string
	Filename     string
	Legend       []map[string]string
	Parameters   types.Settings
	Plots        []types.ScatterPlot
	Settings     map[string]interface{}
}

Data defines the type and variables required for generating an interactive scatter plot

type PlotRounded

type PlotRounded struct {
	Labels types.ScatterAxesLabels `json:"labels"`
	Name   string                  `json:"name"`
	Points []PointRounded          `json:"points"`
}

PlotRounded contains data for a scatter plot

type PointRounded

type PointRounded struct {
	Color string              `json:"color"`
	Label string              `json:"label"`
	X     RoundedScatterPoint `json:"x"`
	Y     RoundedScatterPoint `json:"y"`
}

PointRounded contains data for a point on a scatter plot

type RoundedScatterPoint

type RoundedScatterPoint float64

RoundedScatterPoint rounds scatter points to a precision of 2

func (RoundedScatterPoint) MarshalJSON

func (r RoundedScatterPoint) MarshalJSON() ([]byte, error)

MarshalJSON rounds scatter points to a precision of 2 when exporting to JSON

Jump to

Keyboard shortcuts

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