2

I'm trying to include a plot using the PlotlyJS package in a small application using Blink. So far, whenever I use the plot function, it opens a new window, which I want to avoid.. Furthermore, when updating the plot, another window pops up - also not wanted. Does anyone know how to avoid these new windows? Thanks in advance!

Sample code:

using PlotlyJS,Blink

scatter_1 = scatter(;x=rand(10),y=rand(10))
p = plot(scatter_1) # first unwanted window

w = Window()
body!(w,p)

scatter_2 = scatter(;x = 2*rand(10), y = 2*rand(10))
addtraces(p, scatter_2) #second unwated window


Adam
  • 743
  • 1
  • 6
  • 11

1 Answers1

1

Try adding ; at the end of the line.

using PlotlyJS,Blink

scatter_1 = scatter(;x=rand(10),y=rand(10))
p = plot(scatter_1);

w = Window()
body!(w,p)

scatter_2 = scatter(;x = 2*rand(10), y = 2*rand(10))
addtraces(p, scatter_2);
Prudhvi
  • 1,095
  • 1
  • 7
  • 18