Skip to content

Commit b28f625

Browse files
committed
all: apply gofmt-1.19
Signed-off-by: Sebastien Binet <[email protected]>
1 parent 5581c96 commit b28f625

File tree

15 files changed

+47
-33
lines changed

15 files changed

+47
-33
lines changed

cmpimg/cmpimg.go

+3-3
Original file line numberDiff line numberDiff line change
@@ -151,9 +151,9 @@ func cmpImg(v1, v2 image.Image, delta float64) bool {
151151
// yiqEqApprox compares the colors of 2 pixels, in the NTSC YIQ color space,
152152
// as described in:
153153
//
154-
// Measuring perceived color difference using YIQ NTSC
155-
// transmission color space in mobile applications.
156-
// Yuriy Kotsarenko, Fernando Ramos.
154+
// Measuring perceived color difference using YIQ NTSC
155+
// transmission color space in mobile applications.
156+
// Yuriy Kotsarenko, Fernando Ramos.
157157
//
158158
// An electronic version is available at:
159159
//

font/len.go

+5-4
Original file line numberDiff line numberDiff line change
@@ -40,10 +40,11 @@ func Points(pt float64) Length {
4040
// e.g. "42cm" "2.4in" "66pt"
4141
// If no unit was given, ParseLength assumes it was (postscript) points.
4242
// Currently valid units are:
43-
// mm (millimeter)
44-
// cm (centimeter)
45-
// in (inch)
46-
// pt (point)
43+
//
44+
// - mm (millimeter)
45+
// - cm (centimeter)
46+
// - in (inch)
47+
// - pt (point)
4748
func ParseLength(value string) (Length, error) {
4849
var unit Length = 1
4950
switch {

palette/brewer/brewer.go

-1
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@
1515
//
1616
// For more information see:
1717
// http://www.personal.psu.edu/cab38/ColorBrewer/ColorBrewer_learnMore.html
18-
//
1918
package brewer // import "gonum.org/v1/plot/palette/brewer"
2019

2120
import (

plot.go

+14-2
Original file line numberDiff line numberDiff line change
@@ -494,7 +494,13 @@ func (p *Plot) NominalY(names ...string) {
494494
//
495495
// Supported formats are:
496496
//
497-
// eps, jpg|jpeg, pdf, png, svg, tex and tif|tiff.
497+
// - .eps
498+
// - .jpg|.jpeg
499+
// - .pdf
500+
// - .png
501+
// - .svg
502+
// - .tex
503+
// - .tif|.tiff
498504
func (p *Plot) WriterTo(w, h vg.Length, format string) (io.WriterTo, error) {
499505
c, err := draw.NewFormattedCanvas(w, h, format)
500506
if err != nil {
@@ -509,7 +515,13 @@ func (p *Plot) WriterTo(w, h vg.Length, format string) (io.WriterTo, error) {
509515
//
510516
// Supported extensions are:
511517
//
512-
// .eps, .jpg, .jpeg, .pdf, .png, .svg, .tex, .tif and .tiff.
518+
// - .eps
519+
// - .jpg|.jpeg
520+
// - .pdf
521+
// - .png
522+
// - .svg
523+
// - .tex
524+
// - .tif|.tiff
513525
func (p *Plot) Save(w, h vg.Length, file string) (err error) {
514526
f, err := os.Create(file)
515527
if err != nil {

plotter/boxplot.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ type BoxPlot struct {
8787
// NewBoxPlot returns a new BoxPlot that represents
8888
// the distribution of the given values. The style of
8989
// the box plot is that used for Tukey's schematic
90-
// plots is ``Exploratory Data Analysis.''
90+
// plots in “Exploratory Data Analysis.
9191
//
9292
// An error is returned if the boxplot is created with
9393
// no values.

plotter/heat.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -145,7 +145,7 @@ func (h *HeatMap) plotRasterized(c draw.Canvas, plt *plot.Plot) {
145145
pImg.Plot(c, plt)
146146
}
147147

148-
// plotVectorized plots the heatmap using vector-based drawing.
148+
// plotVectorized plots the heatmap using vector-based drawing.
149149
func (h *HeatMap) plotVectorized(c draw.Canvas, plt *plot.Plot) {
150150
if h.Min > h.Max {
151151
panic("contour: invalid Z range: min greater than max")

plotter/johnson.go

-1
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,6 @@ func min(a, b int) int {
125125
// algorithm. The implementation is from the pseudocode at
126126
//
127127
// http://en.wikipedia.org/wiki/Tarjan%27s_strongly_connected_components_algorithm?oldid=642744644
128-
//
129128
type tarjan struct {
130129
g graph
131130

text/latex.go

+3-3
Original file line numberDiff line numberDiff line change
@@ -50,9 +50,9 @@ func (hdlr Latex) Lines(txt string) []string {
5050
}
5151

5252
// Box returns the bounding box of the given non-multiline text where:
53-
// - width is the horizontal space from the origin.
54-
// - height is the vertical space above the baseline.
55-
// - depth is the vertical space below the baseline, a positive number.
53+
// - width is the horizontal space from the origin.
54+
// - height is the vertical space above the baseline.
55+
// - depth is the vertical space below the baseline, a positive number.
5656
func (hdlr Latex) Box(txt string, fnt font.Font) (width, height, depth vg.Length) {
5757
cnv := drawtex.New()
5858
face := hdlr.Fonts.Lookup(fnt, fnt.Size)

text/plain.go

+3-3
Original file line numberDiff line numberDiff line change
@@ -37,9 +37,9 @@ func (hdlr Plain) Lines(txt string) []string {
3737
}
3838

3939
// Box returns the bounding box of the given non-multiline text where:
40-
// - width is the horizontal space from the origin.
41-
// - height is the vertical space above the baseline.
42-
// - depth is the vertical space below the baseline, a positive number.
40+
// - width is the horizontal space from the origin.
41+
// - height is the vertical space above the baseline.
42+
// - depth is the vertical space below the baseline, a positive number.
4343
func (hdlr Plain) Box(txt string, fnt font.Font) (width, height, depth vg.Length) {
4444
face := hdlr.Fonts.Lookup(fnt, fnt.Size)
4545
ext := face.Extents()

version.go

+3-1
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,9 @@ const root = "gonum.org/v1/plot"
1919
//
2020
// If a replace directive exists in the Gonum/plot go.mod, the replace will
2121
// be reported in the version in the following format:
22-
// "version=>[replace-path] [replace-version]"
22+
//
23+
// "version=>[replace-path] [replace-version]"
24+
//
2325
// and the replace sum will be returned in place of the original sum.
2426
//
2527
// The exact version format returned by Version may change in future.

vg/draw/canvas.go

+5-5
Original file line numberDiff line numberDiff line change
@@ -293,11 +293,11 @@ func New(c vg.CanvasSizer) Canvas {
293293
// image format. Supported formats need to be registered by importing one or
294294
// more of the following packages:
295295
//
296-
// gonum.org/v1/plot/vg/vgeps // provides eps
297-
// gonum.org/v1/plot/vg/vgimg // provides png, jpg|jpeg, tif|tiff
298-
// gonum.org/v1/plot/vg/vgpdf // provides pdf
299-
// gonum.org/v1/plot/vg/vgsvg // provides svg
300-
// gonum.org/v1/plot/vg/vgtex // provides tex
296+
// - gonum.org/v1/plot/vg/vgeps: provides eps
297+
// - gonum.org/v1/plot/vg/vgimg: provides png, jpg|jpeg, tif|tiff
298+
// - gonum.org/v1/plot/vg/vgpdf: provides pdf
299+
// - gonum.org/v1/plot/vg/vgsvg: provides svg
300+
// - gonum.org/v1/plot/vg/vgtex: provides tex
301301
func NewFormattedCanvas(w, h vg.Length, format string) (vg.CanvasWriterTo, error) {
302302
formats.RLock()
303303
defer formats.RUnlock()

vg/len.go

+5-4
Original file line numberDiff line numberDiff line change
@@ -27,10 +27,11 @@ const (
2727
// e.g. "42cm" "2.4in" "66pt"
2828
// If no unit was given, ParseLength assumes it was (postscript) points.
2929
// Currently valid units are:
30-
// mm (millimeter)
31-
// cm (centimeter)
32-
// in (inch)
33-
// pt (point)
30+
//
31+
// - mm (millimeter)
32+
// - cm (centimeter)
33+
// - in (inch)
34+
// - pt (point)
3435
func ParseLength(value string) (Length, error) {
3536
return font.ParseLength(value)
3637
}

vg/vggio/vggio_test.go

+2-2
Original file line numberDiff line numberDiff line change
@@ -29,8 +29,8 @@ const deltaGio = 0.05 // empirical value from experimentation.
2929
// On GitHub Actions and on linux, that headless display may take some time to
3030
// be properly available and appears to be setup "on demand".
3131
// So we request it by trying to take a screenshot twice:
32-
// - the first time around might fail
33-
// - the second time shouldn't.
32+
// - the first time around might fail
33+
// - the second time shouldn't.
3434
func init() {
3535
if runtime.GOOS != "linux" {
3636
return

vg/vgpdf/vgpdf.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ import (
3333
// font files, needed by gofpdf to embed fonts in a PDF document.
3434
// We use cp1252 (code page 1252, Windows Western) to encode characters.
3535
// See:
36-
// - https://en.wikipedia.org/wiki/Windows-1252
36+
// - https://en.wikipedia.org/wiki/Windows-1252
3737
//
3838
// TODO: provide a Canvas-level func option to embed fonts with a user provided
3939
// code page schema?

vg/vgsvg/vgsvg.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
// this issue.
1414
//
1515
// Alternatively, users may want to install the Liberation fonts on their system:
16-
// - https://en.wikipedia.org/wiki/Liberation_fonts
16+
// - https://en.wikipedia.org/wiki/Liberation_fonts
1717
package vgsvg // import "gonum.org/v1/plot/vg/vgsvg"
1818

1919
import (

0 commit comments

Comments
 (0)