Introduction to Luxor

Introduction to Luxor

Luxor is a Julia package for drawing simple static vector graphics. It provides basic drawing functions and utilities for working with shapes, polygons, clipping masks, PNG images, turtle graphics, animations, and shapefiles.

The focus of Luxor is on simplicity and ease of use: it should be easier to use than plain Cairo.jl, with shorter names, fewer underscores, default contexts, and simplified functions.

Luxor is thoroughly procedural and static: your code issues a sequence of simple graphics 'commands' until you've completed a drawing, then the results are saved into a PDF, PNG, SVG, or EPS file.

There are some Luxor-related videos on YouTube.

For interactive graphics, you'll find Gtk.jl, GLVisualize, and Makie language worth investigating.

Please submit issues and pull requests on GitHub. Original version by cormullion, much improved with contributions from the Julia community.

Installation and basic usage

Install the package as follows:

Pkg.add("Luxor")

Cairo.jl and Colors.jl will be installed if necessary.

To use Luxor, type:

using Luxor

To test:

julia> @svg juliacircles()

or

julia> @png juliacircles()

Documentation

The documentation was built using Documenter.jl.

Documentation built 2018-06-27T11:49:08.425 with Julia 0.7.0-beta.44