…If you don’t need fancy advanced features like 3D plots & pie charts, but still want publication-quality 2D plots:
You could also use InspectDR (ANN: New interactive Plots.jl backend for large datasets).
InspectDR has the advantage over GR by providing basic interactivity:
- Mouse/keyboard bindings for pan/zoom
- Programmatic + user-level control of annotations (ex: delta markers).
…Hopefully GR will start providing some interactivity features soon as well (it is supposedly on the TODO list).
The usage documentation for InspectDR is on the Github home page: https://github.com/ma-laforge/InspectDR.jl
There is also a few sample usage cases in the “sample” subdirectory: InspectDR.jl/sample at master · ma-laforge/InspectDR.jl · GitHub
Sample output:
- FileRepo/README.md at master · ma-laforge/FileRepo · GitHub
- https://github.com/ma-laforge/FileRepo/blob/master/SignalProcessing/sampleplots/README.md
Warning:
Will not work in JuliaBox (JuliaBox has problems with installing the Gtk.jl package).
Sample minimal Code:
using InspectDR
x = collect(0:10) #Must vectorize using collect - ranges not yet supported
y = rand(length(x))
plot = InspectDR.Plot2D(:lin, :lin,
title = "Sample Plot",
xlabel = "X-Values",
ylabels = ["Y-Values"]
)
wfrm = add(plot, x, y, id="Random Sample")
#Show Gtk GUI
gplot = display(InspectDR.GtkDisplay(), plot)
edit:
To display inline plots, use the following call to display
instead:
#SVG plotting in Jupyter buggy @ the moment:
InspectDR.defaults.rendersvg = false #Call once only
display(plot) #Explicit call to "display" plot
nothing #Clear return value so we don't display plot twice