Winston.jl icon indicating copy to clipboard operation
Winston.jl copied to clipboard

New feature discussion: Interactive, animatable graphics

Open jiahao opened this issue 12 years ago • 1 comments

One of the key features that would make the Julia project a much more powerful data visualization and manipulation tool is the ability to have interactive graphics which would allow users to visualize their data and how they are transformed in real time.

Perhaps the most advanced such feature that is currently available is Mathematica's Manipulate[] function. Not only does it allow visualization of any type of valid Mathematica output (text, formula, graph, animation,...), it also automatically generates and places control widgets like 1-D and 2-D sliders. While the user is allowed to control the generation and placement of these widgets, having sane defaults for these allows the user to have something to play with rightaway without being distracted by having to futz around with the output to get something reasonable, if the user just wants to play with the data rather than have to design a GUI just to do so. With such features, the graphics are no longer passive receptacles for pretty pictures, but allow for powerful visualizations which are extremely helpful for learning numerical algorithms and deciphering published code listings. I personally find this very helpful for my work.

Furthermore, Mathematica graphical output objects are renderings that can be further manipulated, e.g. to create animations on the fly.

Mathematica documentation:

Ideally we would want something along these lines in Julia as well.

Some features to consider:

  • [ ] The ability to manipulate parametrically any kind of valid output type from Julia or Winston, possibly extensible to third-party output types.

  • [ ] Sane automatic generation and placement of a variety of controls

    • Tick boxes and radio buttons (for Boolean and small discrete inputs)
    • 1-D sliders (for Real input)
    • 2-D sliders (for Complex input)
    • Text boxes with optional type validation
    • Others?
  • [ ] Ability to further manipulate rendered graphics objects.

    • Graphical manipulations in the form of animations
    • Algebraic manipulation of plots. For example:
    x = [-pi:0.2:pi]
    y = sin(x)
    W = Curve(x, y)
    V = 2W - 1 #Same as Curve(x, 2y-1)
    p = FramedPlot()
    add(p, V)
    Winston.display(V)
    

    and have a plot of 2 sin(x) - 1.

jiahao avatar Jul 02 '13 03:07 jiahao

@jiahao It only covers some of your second set of desired features, but this example https://github.com/JuliaLang/Tk.jl/blob/master/examples/manipulate.jl implements RStudio's stripped-down version of Mathematica's manipulate. Implementing 1 would be pretty easy.

jverzani avatar Jul 07 '13 17:07 jverzani