Dealing with large numbers of points


#1

I’m trying to use Plots.jl with GR backend to generate a scatter plot with a large number of points. However, 10,000 points fails to generate a plot in the Plots window and Juno generally crashes soon after.

Am I doing something wrong, or is the library unable to handle large numbers of points?


#2

This was an issue in some earlier version. What’s your versions of Plots, GR and Julia?


#3

Julia 1.0.1
Not sure how to find out about package versions, though I ran Pkg.add again on them and Plots seemed to have no change, while GR’s update reported “+ GR v0.34.1”

Still blank and crashed despite that, when I generated a second plot and tried to use Juno’s ability to navigate between plots.

For reference, I’m running:x=rand(10000); y=rand(10000); scatter(x,y)


#4

I opened a similar thread some months ago:

My experience then was that GR was quite slow and didn’t deal well with large datasets.
You can try with GLVisualize (now Makie) and InspectDR instead.

Now I’m not using Julia but still keeping and eye on it.
What package is currently the best solution to deal with a large number of points? Say 10K, 100K o 1M points.
Maybe with OnlineStats?


#5

The GR backend should be completely capable of handling very large numbers of data points (have you seen this issue @jheinen?). The InspectDR backend is also focused on doing exactly that. 10,000 scatter points is nothing, though.
Makie is not a backend to Plots. It is very good at handling large numbers of data though (https://hackernoon.com/drawing-2-7-billion-points-in-10s-ecc8c85ca8fa ).

@BioTurboNick could you try in the REPL to see if this is a juno interaction issue?


#6

Nice, though that solution doesn’t just rely on Makie but on several custom (and complex for the average user) scripts to map the data from disk to memory.


#7

Yes absolutely, it was not a suggested solution but a demonstration of Makie’s potential (it’s still fairly new)


#8

I was using the Juno REPL. And… yeah, it works when run outside of Juno. Where should I report this problem?


#9

Is there a way to redirect plots output so it doesn’t use Juno’s window?


#10

Yes you can turn the plot pane off in the settings. But first, try calling gr(fmt = :png) and see if it helps.


#11

Found this advice: http://docs.juliaplots.org/latest/output/ but the environment variable doesn’t seem to work.

Turning the plot plane off in the Juno settings prevents it from using the plot plane, but no window is spawned to show results.

gr(fmt = :png) does not help


#12

Oh I think the environment variable might be deprecated.
It’s a bug, so try to report it on Plots.jl as an issue and ping pfitzseb (the Juno maintainer). Thanks. (BTW you get package versions with ]st)


#13

Ah, it’s already an issue there, #1727: https://github.com/JuliaPlots/Plots.jl/issues/1727


#14

GR.jl v0.36.0-4-gfc0d1e6 now takes respect of the plot pane setting in Atom.