plotly

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Jun 10, 2024 License: Apache-2.0 Imports: 5 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package plotly implements plotting in Jupyter Notebooks using github.com/janpfeifer/gonb (Notebook Kernel) and the Plotly github.com/MetalBlueberry/go-plotly library.

Use New to create a new Config object, and after configuring it, use Config.Plot to draw the plot.

Features:

  • B-spline function, visible by default.
  • Control Points, visible by default.
  • Derivative, non-visible by default.
  • Basis functions, non-visible by default.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	// contains filtered or unexported fields
}

Config holds a plot configuration that can be changed. Once finished, call the method [Plot] to actually plot.

func New

func New(b *bsplines.BSpline) *Config

New returns a Config object that can be changed. Once finished, call Config.Plot to draw the plot in the Jupyter notebook.

func (*Config) Plot

func (c *Config) Plot() error

Plot using the current configuration. It returns an error if plotting failed for some reason.

func (*Config) WithMargin

func (c *Config) WithMargin(marginRatio float64) *Config

WithMargin defines how much space (relative to the defined B-spline range) to plot. It defaults to 0.1, and it's handy to see how the curve is going to extrapolate beyond its boundaries.

func (*Config) WithNumPlotPoints

func (c *Config) WithNumPlotPoints(numPlotPoints int) *Config

WithNumPlotPoints set the number of plot points to evaluate. Default is 1000.

Jump to

Keyboard shortcuts

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