Separation of DotColorProvider and ColorProvider Interfaces (#34)
* fully functioning Viridis * pure functions
This commit is contained in:
parent
e53554fb04
commit
b3dc3fef3c
7 changed files with 18 additions and 13 deletions
6
jet.go
6
jet.go
|
|
@ -3,11 +3,7 @@ package chart
|
|||
import "github.com/wcharczuk/go-chart/drawing"
|
||||
|
||||
// Jet is a color map provider based on matlab's jet color map.
|
||||
func Jet(xr, yr Range, x, y float64) drawing.Color {
|
||||
return getJetColour(y, yr.GetMin(), yr.GetMax())
|
||||
}
|
||||
|
||||
func getJetColour(v, vmin, vmax float64) drawing.Color {
|
||||
func Jet(v, vmin, vmax float64) drawing.Color {
|
||||
c := drawing.Color{R: 0xff, G: 0xff, B: 0xff, A: 0xff} // white
|
||||
var dv float64
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue