Adds the ability to draw an XY scatter plot. (#27)

* works more or less

* updating comment

* removing debugging printf

* adding output

* tweaks

* missed a couple series validations

* testing auto coloring

* updated output.png

* color tests etc.

* sanity check tests.

* should not use unkeyed fields anyway.
This commit is contained in:
Will Charczuk 2017-03-05 16:54:40 -08:00 committed by GitHub
parent 17b28beae8
commit b713ff85cc
22 changed files with 511 additions and 72 deletions

View file

@ -3,6 +3,8 @@ package drawing
import (
"testing"
"image/color"
"github.com/blendlabs/go-assert"
)
@ -39,3 +41,13 @@ func TestColorFromHex(t *testing.T) {
shortBlue := ColorFromHex("00F")
assert.Equal(ColorBlue, shortBlue)
}
func TestColorFromAlphaMixedRGBA(t *testing.T) {
assert := assert.New(t)
black := ColorFromAlphaMixedRGBA(color.Black.RGBA())
assert.True(black.Equals(ColorBlack), black.String())
white := ColorFromAlphaMixedRGBA(color.White.RGBA())
assert.True(white.Equals(ColorWhite), white.String())
}