plot

package
v0.0.0-...-00da793 Latest Latest
Warning

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

Go to latest
Published: Sep 24, 2022 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Show

func Show(f Figure) error

Show function takes in a Figure struct and opens a browser tab at `localhost:8080` for rendering the figure. If the figure does not appear, please use the Developer Console in the browser to identify the issue. Most likely, an incorrect key: value pair was passed to plotly.js

Types

type Figure

type Figure struct {
	Data   []map[string]any // slice of maps containing data for each trace
	Layout *map[string]any  // optional map for defining the plot's layout
}

func NewFigure

func NewFigure(data []map[string]any) *Figure

NewFigure takes in a slice of maps. Each map is a trace for rendering and returns a pointer to the Figure object with a `nil` layout Figures with `nil` layout will have a `height` attribute assigned in JavaScript equal to available screen height / 1.25

func NewFigureWithLayout

func NewFigureWithLayout(data []map[string]any, layout map[string]any) *Figure

NewFigureWithLayout takes in a slice of maps for trace data, and a map defining the plots layout.

func NewPDFFigure

func NewPDFFigure(data []map[string]any, layout *map[string]any) Figure

func NewScatter3DFigure

func NewScatter3DFigure(data []map[string]any, layout *map[string]any) Figure

Jump to

Keyboard shortcuts

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