Skip to content
mbaz edited this page Jun 1, 2012 · 12 revisions

Introduction

Graphics (plotting) in Julia is a work in progress. There are a number of independent development efforts going on currently. At least in the short term, there may be more than one graphics framework. This page was started as an attempt to help summarize these efforts, and possibly lead to greater collaboration.

From a graphics toolkit, some or all of the following "big picture" features might be desirable:

  • 2-d plotting (lines, bars, fills, images, etc)
  • 3-d graphics (surface visualization, volume rendering, etc)
  • Layout of complex figures (multiple axes containing different types of data)
  • Annotation (text, arrows, legends, etc)
  • Exporting publication-quality figures (both bitmap and vector formats)
  • Traits ("Handle graphics-like") architecture so that graphical elements may be updated, animated, etc
  • Support for building GUIs
  • Integration of externally-generated vector graphics (e.g., from drawing programs)
  • Browser-based remote access

Ideally these would be developed with an eye towards performance, consistent with the Julia language itself.

Current efforts

In listing the pros and cons of each method below, the intent is to focus on the long-term promise/tradeoffs of each approach; the current implementation status is treated as a separate issue.

Web graphics

Web graphics (web repl) is the current standard, in which plots are displayed inside an interactive Julia session operating in a browser window. Pros:

  • easy cross-platform deployment (the web browser provides the graphical toolkit)
  • easy remote access (server/cloud computing)

Cons:

  • performance penalty for animations/interaction?
  • limitations for sophisticated GUI development? (e.g., context menus, shift/ctrl/alt-scroll?)
  • does not allow a figure to be in a separate window, making it harder to implement GUIs or to have multiple figure windows open on the user's desktop at once (fixable?) [Tom: sure you can! Load GMail, view an email, and click a link in the top right corner with the arrow pointing out of a square... for a demonstration.]

Current status:

  • Simple line and bar plots implemented
  • Experiments with webGL (particularly useful for 3d graphics) underway
  • No GUIs, handle graphics, or annotation.

Winston

Winston (currently in "preview" status) provides plotting directly from the Julia prompt. Winston originally used the gnu plotutils library, but now implements plotting in native Julia code.

Pros:

  • Export to a wide variety of publication-quality formats (via Cairo library)
  • Traits architecture, annotation, and complex figure layout

Cons:

  • Currently no GUIs, but because rendering is performed with native Julia code, Winston is a logical base for future growth.

Current status:

  • No on-screen display, only export to files (may change soon)
  • 2d plotting is well underway
  • Traits architecture established

Gnuplot wrapper

Gaston, a gnuplot interface, supports both 2d and 3d plots.

Pros:

  • On-screen graphics with some interaction (zooming, panning, etc.)
  • Well documented
  • gnuplot is quite mature and extensive

Cons:

  • No GUIs

Present status: Supports line/point/dots/errorbar 2-D plots, histograms, images (rgb and scalar), and 3-D surfaces. Supports saving images as pdf, png, gif and svg files. Currently, may be the most comprehensive solution.

Julia-plot

Julia-plot is a plotting package based on MathGL.

Pros:

  • MathGL focuses on performance and large data sets and sophisticated rendering
  • Export of publication-quality graphics

Cons:

  • No remote web-browser access (?)
  • No GUI support (?)

Current status: Currently only very limited MathGL functionality is exposed

Qt/Qwt

Qt is a well-known GUI toolbox, and Qwt implements many scientific plotting capabilities.

Pros:

  • Ease of creating sophisticated, cross-platform GUIs
  • Many scientific plots already supported

Cons:

  • No remote browser-based access
  • Qwt capabilities not as sophisticated as gnuplot and MathGL (?)
  • Installing Qt backend can be a pain

Current status: suggested on mailing list but not yet started (?)