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 ¶
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 ¶
Plot using the current configuration. It returns an error if plotting failed for some reason.
func (*Config) WithMargin ¶
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 ¶
WithNumPlotPoints set the number of plot points to evaluate. Default is 1000.