github.com/tobgu/qframe@v0.4.0/contrib/gonum/qplot/helpers.go (about) 1 package qplot 2 3 import ( 4 "github.com/tobgu/qframe" 5 "github.com/tobgu/qframe/types" 6 ) 7 8 // isNumCol checks to see if column contains a numeric 9 // type and may be plotted. 10 func isNumCol(col string, qf qframe.QFrame) bool { 11 cType, ok := qf.ColumnTypeMap()[col] 12 if !ok { 13 return false 14 } 15 switch cType { 16 case types.Float: 17 return true 18 case types.Int: 19 return true 20 } 21 return false 22 }