You should really use modules. The module name is "gonum.org/v1/plot", not 
"github.com/gonum/plot".

$ mkdir scatter-demo
$ cd scatter-demo
$ go mod init scatter-demo
$ edit main.go
# Copy and paste code from 
https://gist.github.com/sbinet/602522b7399ead414e279e2261d81095 into main.go
# Replace all instances of "github.com/gonum/plot" by "gonum.org/v1/plot" 
in the imports of main.go:

        "gonum.org/v1/plot"

        "gonum.org/v1/plot/plotter"

        "gonum.org/v1/plot/vg"
$ go mod tidy
$ go build

On Monday, 17 May 2021 at 14:11:01 UTC+2 Fred wrote:

> Hi,
> I have 2 computers with Linux Manjaro and  go version 1.16.3.
> The same scatter plot 
> <https://gist.github.com/sbinet/602522b7399ead414e279e2261d81095> works 
> on one computer and produces on the other these already known errors : 
> <https://groups.google.com/g/gonum-dev/c/a8sC1fzV3Mo>
>
> # gonum.org/v1/plot/text
> /home/fred/GO/src/gonum.org/v1/plot/text/latex.go:153:3: cannot use 
> hdlr.Fonts.Lookup(rm, fnt.Size).Face (type *sfnt.Font) as type 
> *truetype.Font in field value
> /home/fred/GO/src/gonum.org/v1/plot/text/latex.go:154:3: cannot use 
> hdlr.Fonts.Lookup(rm, fnt.Size).Face (type *sfnt.Font) as type 
> *truetype.Font in field value
> /home/fred/GO/src/gonum.org/v1/plot/text/latex.go:155:3: cannot use 
> hdlr.Fonts.Lookup(it, fnt.Size).Face (type *sfnt.Font) as type 
> *truetype.Font in field value
> /home/fred/GO/src/gonum.org/v1/plot/text/latex.go:156:3: cannot use 
> hdlr.Fonts.Lookup(bf, fnt.Size).Face (type *sfnt.Font) as type 
> *truetype.Font in field value
> /home/fred/GO/src/gonum.org/v1/plot/text/latex.go:157:3: cannot use 
> hdlr.Fonts.Lookup(bfit, fnt.Size).Face (type *sfnt.Font) as type 
> *truetype.Font in field value
> /home/fred/GO/src/gonum.org/v1/plot/text/latex.go:221:3: cannot use 
> op.Glyph.Font (type *truetype.Font) as type *sfnt.Font in field value
>
> an update does not fix the error.
>
> go get -u gonum.org/v1/plot/...
> # cd /home/fred/GO/src/github.com/go-latex/latex; git pull --ff-only
> Votre information de configuration indique de fusionner avec la référence 
> 'refs/heads/master'
> du serveur distant, mais cette référence n'a pas été récupérée.
> package github.com/go-latex/latex/drawtex: exit status 1
>
> the go/src/gonum.org/v1/plot/font directory is the same on both 
> computers. Do I need to install some missing fonts ?
>
> Thanks in advance,
>
> Fred
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to golang-nuts+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/golang-nuts/0bff84b8-0756-42df-8604-3035a861f9e7n%40googlegroups.com.

Reply via email to