Bokeh-scala: value sources is not a member of DataRange1d.sources

Hello Everyone
I am new to Bokeh-scala and Bokeh.

This question pertains to bokeh-scala and I am trying to accomplish generating a scatter plot.

The version I am using is .7

These are all my scala-imports

import io.continuum.bokeh._

import breeze.linalg._

import java.io.File

import io.continuum.bokeh.Color

import io.continuum.bokeh.Plot

import io.continuum.bokeh.Document

import io.continuum.bokeh.GlyphRenderer

import io.continuum.bokeh.Diamond

import io.continuum.bokeh.DataRange1d

import io.continuum.bokeh.LinearAxis

import io.continuum.bokeh.Resources.{Remote, CDN}

import io.continuum.bokeh._

//Set Data range for the X and the Y Axis

val xRange = new DataRange1d().sources(petal_length :: Nil)

val yRange = new DataRange1d().sources(petal_width :: Nil)

I am using SBT and when I do sbt console, it fails in the lines highlighted

[error] C:\Trial_And_Error_Projects\chapter1\src\main\scala\com\modern\chapter1\MyScatter.scala:36: value sources is not a member of io.continuum.bokeh.DataRange1d

[error] val xRange = new DataRange1d().sources(petal_length :: Nil)

[error] ^

[error] C:\Users\Ilango\Documents\Packt-Book-Writing-Project\Trial_And_Error_Projects\chapter1\src\main\scala\com\modern\chapter1\MyScatter.scala:37: value sources is not a member of io.continuum.bokeh.DataRange1d

[error] val yRange = new DataRange1d().sources(petal_width :: Nil)

I have looked in the bokeh-scala api but cannot nail down DataRange1d.sources

Any help is appreciated. Thanks

I have answered my own question. I used the .5 version of the library for Scala 2.11 and it worked.

ยทยทยท

On Wednesday, January 17, 2018 at 7:15:15 PM UTC-6, ilango g wrote:

Hello Everyone
I am new to Bokeh-scala and Bokeh.

This question pertains to bokeh-scala and I am trying to accomplish generating a scatter plot.

The version I am using is .7

These are all my scala-imports

import io.continuum.bokeh._

import breeze.linalg._

import java.io.File

import io.continuum.bokeh.Color

import io.continuum.bokeh.Plot

import io.continuum.bokeh.Document

import io.continuum.bokeh.GlyphRenderer

import io.continuum.bokeh.Diamond

import io.continuum.bokeh.DataRange1d

import io.continuum.bokeh.LinearAxis

import io.continuum.bokeh.Resources.{Remote, CDN}

import io.continuum.bokeh._

//Set Data range for the X and the Y Axis

val xRange = new DataRange1d().sources(petal_length :: Nil)

val yRange = new DataRange1d().sources(petal_width :: Nil)

I am using SBT and when I do sbt console, it fails in the lines highlighted

[error] C:\Trial_And_Error_Projects\chapter1\src\main\scala\com\modern\chapter1\MyScatter.scala:36: value sources is not a member of io.continuum.bokeh.DataRange1d

[error] val xRange = new DataRange1d().sources(petal_length :: Nil)

[error] ^

[error] C:\Users\Ilango\Documents\Packt-Book-Writing-Project\Trial_And_Error_Projects\chapter1\src\main\scala\com\modern\chapter1\MyScatter.scala:37: value sources is not a member of io.continuum.bokeh.DataRange1d

[error] val yRange = new DataRange1d().sources(petal_width :: Nil)

I have looked in the bokeh-scala api but cannot nail down DataRange1d.sources

Any help is appreciated. Thanks