go-hep.org/x/hep@v0.38.1/hplot/fwd.go (about)

     1  // Copyright ©2016 The go-hep Authors. All rights reserved.
     2  // Use of this source code is governed by a BSD-style
     3  // license that can be found in the LICENSE file.
     4  
     5  package hplot
     6  
     7  import (
     8  	"gonum.org/v1/plot"
     9  	"gonum.org/v1/plot/plotter"
    10  )
    11  
    12  // NewLine returns a Line that uses the default line style and
    13  // does not draw glyphs.
    14  func NewLine(xys plotter.XYer) (*plotter.Line, error) {
    15  	return plotter.NewLine(xys)
    16  }
    17  
    18  // NewLinePoints returns both a Line and a
    19  // Points for the given point data.
    20  func NewLinePoints(xys plotter.XYer) (*plotter.Line, *plotter.Scatter, error) {
    21  	return plotter.NewLinePoints(xys)
    22  }
    23  
    24  // NewScatter returns a Scatter that uses the
    25  // default glyph style.
    26  func NewScatter(xys plotter.XYer) (*plotter.Scatter, error) {
    27  	return plotter.NewScatter(xys)
    28  }
    29  
    30  // NewGrid returns a new grid with both vertical and
    31  // horizontal lines using the default grid line style.
    32  func NewGrid() *plotter.Grid {
    33  	return plotter.NewGrid()
    34  }
    35  
    36  // A Legend gives a description of the meaning of different data elements of
    37  // the plot. Each legend entry has a name and a thumbnail, where the thumbnail
    38  // shows a small sample of the display style of the corresponding data.
    39  type Legend = plot.Legend
    40  
    41  // NewLegend returns a legend with the default parameter settings.
    42  func NewLegend() Legend {
    43  	return plot.NewLegend()
    44  }