I can not see my graph after a successful execution in Scala

Hi, I am working with Apache Spark using IntelliJ IDEA. I need to make a simple plot. I have made an account and I have API code. I also have added this code to my build.sbt:

libraryDependencies ++= Seq(
   "co.theasi" %% "plotly" % "0.2.0",
   "org.apache.spark" %% "spark-core" % "2.1.1",
   "org.apache.spark" %% "spark-sql" % "2.1.1",
   "org.apache.spark" %% "spark-hive" % "2.1.1",
   "org.apache.spark" %% "spark-streaming" % "2.1.1",
   "org.apache.spark" %% "spark-mllib" % "2.1.1"
 )

I also configure my API programmatically. My question is, when I run my program, where should I see the result. Since the IntelliJ tells me that the program runs successfully. Here is my code:

     import co.theasi.plotly.{Plot, draw, writer}
     object ML_Test {
       def main(args: Array[String]) {
         implicit val server = new writer.Server {
           val credentials = writer.Credentials("saeedtkh", "QO6kJrQsY5y3jLSW7jwv")
           val url = "https://api.plot.ly/v2/"
         }
         val p = Plot().withScatter(Vector(1, 2), Vector(3, 4))
         draw(p, "custom-credentials")
       }
     }

can you help me?

1 Like

Same problem for me. Did you find a solution ?

Solution : draw just generates and sends the data to Plotly’s servers ; it doesn’t display a window containing the charts.
Cf. : https://stackoverflow.com/questions/48244473/plotly-and-intellij-idea + Plotly and IntelliJ IDEA (Scala)