MCPcopy Create free account
hub / github.com/cogentcore/core / Defaults

Method Defaults

plot/plot.go:71–82  ·  view source on GitHub ↗

Defaults sets defaults

()

Source from the content-addressed store, hash-verified

69
70// Defaults sets defaults
71func (pt *Plot) Defaults() {
72 pt.Title.Defaults()
73 pt.Title.Style.Size.Dp(24)
74 pt.Background = colors.Scheme.Surface
75 pt.X.Defaults(math32.X)
76 pt.Y.Defaults(math32.Y)
77 pt.Legend.Defaults()
78 pt.DPI = 96
79 pt.Size = image.Point{1280, 1024}
80 pt.StandardTextStyle.Defaults()
81 pt.StandardTextStyle.WhiteSpace = styles.WhiteSpaceNowrap
82}
83
84// New returns a new plot with some reasonable default settings.
85func New() *Plot {

Callers 1

NewFunction · 0.95

Calls 2

DefaultsMethod · 0.65
DpMethod · 0.45

Tested by

no test coverage detected