Skip to content

Commit

Permalink
PS1
Browse files Browse the repository at this point in the history
Signed-off-by: Sebastien Binet <[email protected]>
  • Loading branch information
sbinet committed Aug 18, 2022
1 parent 6dbf496 commit edd14a4
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 8 deletions.
16 changes: 14 additions & 2 deletions plot.go
Original file line number Diff line number Diff line change
Expand Up @@ -494,7 +494,13 @@ func (p *Plot) NominalY(names ...string) {
//
// Supported formats are:
//
// eps, jpg|jpeg, pdf, png, svg, tex and tif|tiff.
// - .eps
// - .jpg|.jpeg
// - .pdf
// - .png
// - .svg
// - .tex
// - .tif|.tiff
func (p *Plot) WriterTo(w, h vg.Length, format string) (io.WriterTo, error) {
c, err := draw.NewFormattedCanvas(w, h, format)
if err != nil {
Expand All @@ -509,7 +515,13 @@ func (p *Plot) WriterTo(w, h vg.Length, format string) (io.WriterTo, error) {
//
// Supported extensions are:
//
// .eps, .jpg, .jpeg, .pdf, .png, .svg, .tex, .tif and .tiff.
// - .eps
// - .jpg|.jpeg
// - .pdf
// - .png
// - .svg
// - .tex
// - .tif|.tiff
func (p *Plot) Save(w, h vg.Length, file string) (err error) {
f, err := os.Create(file)
if err != nil {
Expand Down
2 changes: 1 addition & 1 deletion plotter/boxplot.go
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ type BoxPlot struct {
// NewBoxPlot returns a new BoxPlot that represents
// the distribution of the given values. The style of
// the box plot is that used for Tukey's schematic
// plots is “Exploratory Data Analysis.”
// plots in “Exploratory Data Analysis.”
//
// An error is returned if the boxplot is created with
// no values.
Expand Down
10 changes: 5 additions & 5 deletions vg/draw/canvas.go
Original file line number Diff line number Diff line change
Expand Up @@ -293,11 +293,11 @@ func New(c vg.CanvasSizer) Canvas {
// image format. Supported formats need to be registered by importing one or
// more of the following packages:
//
// gonum.org/v1/plot/vg/vgeps // provides eps
// gonum.org/v1/plot/vg/vgimg // provides png, jpg|jpeg, tif|tiff
// gonum.org/v1/plot/vg/vgpdf // provides pdf
// gonum.org/v1/plot/vg/vgsvg // provides svg
// gonum.org/v1/plot/vg/vgtex // provides tex
// - gonum.org/v1/plot/vg/vgeps: provides eps
// - gonum.org/v1/plot/vg/vgimg: provides png, jpg|jpeg, tif|tiff
// - gonum.org/v1/plot/vg/vgpdf: provides pdf
// - gonum.org/v1/plot/vg/vgsvg: provides svg
// - gonum.org/v1/plot/vg/vgtex: provides tex
func NewFormattedCanvas(w, h vg.Length, format string) (vg.CanvasWriterTo, error) {
formats.RLock()
defer formats.RUnlock()
Expand Down

0 comments on commit edd14a4

Please sign in to comment.