You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Oct 11, 2023. It is now read-only.
I made some plot with bokeh-scala. It looks very good, but when the plot have nearly 2000 points, the browser is very likely to freeze and crash after i zoom or move the plot. I don't know if it is the same with the python version... Hope we can find out the problem. Really looking to use the library.
The text was updated successfully, but these errors were encountered:
@zpfxellose, 2k is supposed to be very few points to draw for bokeh. Perhaps your're hitting a bug. Which version of bokeh-scala do you use? It would be great if you could show the code you use for plotting.
Here is the code I uesd to prepare the plot object
val xdr = new DataRange1d()
val ydr = new DataRange1d()
val plot = new Plot().x_range(xdr).y_range(ydr).tools(List(new BoxZoomTool, new ResetTool, new CrosshairTool())).width(1024).height(600)
val xaxis = if (xIsDatetime) new DatetimeAxis().plot(plot).location(Location.Below) else new LinearAxis().plot(plot).location(Location.Below)
val yaxis = if (yIslog) new LogAxis().plot(plot).location(Location.Left) else new LinearAxis().plot(plot).location(Location.Left)
val xgrid = new Grid().plot(plot).dimension(0).ticker(xaxis.ticker.value).grid_line_dash(DashPattern.Dashed)
val ygrid = new Grid().plot(plot).dimension(1).ticker(yaxis.ticker.value).grid_line_dash(DashPattern.Dashed)
plot.below <<= (xaxis :: _)
plot.left <<= (yaxis :: _)
plot.renderers := List(xaxis, yaxis, xgrid, ygrid)
Here is the code i used to generate line and circle:
object source extends ColumnDataSource {
val x = column(l.map(_._1))
val y = column(l.map(_._2))
}
import source.{x, y}
val circle = new Circle().x(x).y(y).size(5).fill_color(color).line_color(color)
val line = new Line().x(x).y(y).line_color(color)
plot.addGlyph(source, circle)
plot.addGlyph(source, line)
val tooltip = Tooltip("""@x{0.00}, @y{0.00}""")
val hover = new HoverTool().plot(plot).tooltips(tooltip)
plot.tools := plot.tools.value ::: hover :: Nil
also the LogAxis seems not working.
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
I made some plot with bokeh-scala. It looks very good, but when the plot have nearly 2000 points, the browser is very likely to freeze and crash after i zoom or move the plot. I don't know if it is the same with the python version... Hope we can find out the problem. Really looking to use the library.
The text was updated successfully, but these errors were encountered: