gonum / gonum/plot

plot: plots fails to render with oversized glyphs

Open
#773 12 comments 0 reactions 0 assignees View on GitHub
Dominant language
Go
Stars
3k
Forks
201
PR merge metrics
No merged PRs in 30d

Description

### What are you trying to do?

Generate a box plot visualization on a canvas of a specified width and height.

### What did you do?

https://go.dev/play/p/EzwxtwaRRnA

Unfortunately, this times out while fetching gonum, so I cannot verify that it builds and runs correctly in the Go playground. However I have tested it locally with go 1.21.1 darwin/arm64. It reproduces for me against both the 0.13.0 and 0.14.0 tags.

### What did you expect to happen?

I expected both `p1.svg` and `p2.svg` to contain the generated box plots. If for some reason gonum/plot was unable to render the plot correctly with the specified dimensions, I would have expected some kind of error, rather than a nil error and an empty output.

### What actually happened?

`p1.svg` contains the expected plot, but `p2.svg` is blank, with only the axes being rendered. I will attach copies of `p1.svg` and `p2.svg` as generated on my local machine.

p1:

![p1](https://github.com/gonum/plot/assets/11738895/e4b7ead7-da3a-45f5-bb7f-51249574d6d8)

p2:

![p2](https://github.com/gonum/plot/assets/11738895/8af97072-4f62-4950-8c87-27ffebf92ffe)

I also tried using PNG outputs rather than SVG, but the results were the same, so I do not believe this issue is SVG-specific.

### What version of Go and Gonum/plot are you using?

```
$ go version
go version go1.21.1 darwin/arm64
$ cat go.mod | grep gonum
require gonum.org/v1/plot v0.13.0
```

(it is also broken on 0.14.0)

### Does this issue reproduce with the current master?

I tried testing against 342a5cee2153b051d94ae813861f9436c5584de2, which shows up in go.mod as `require gonum.org/v1/plot v0.14.1-0.20230902105700-342a5cee2153` for me. The behavior was the same as what I described.

I believe this reproduces against the current master branch at time of writing.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.