Introduction to Luxor

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

"luxor gallery"

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.

For more complex and sophisticated graphics in 2D and 3D, Makie.jl is the best choice.

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, and some Luxor-related blog posts at

Luxor is designed primarily for drawing static pictures and simple animations. If you want to build complex or elaborate animations, use Javis.jl and Makie.

Luxor isn't interactive: for building interactivity, look at Pluto.jl and Makie.

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 using the package manager:

] add Luxor

To use Luxor, type:

using Luxor

To test:

julia> @svg juliacircles()


julia> @png juliacircles()

which should create a graphic file and possibly also display and/or open it, depending on your environment.


This documentation was built using Documenter.jl.

Documentation built 2024-01-14T10:13:58.001 with Julia 1.10.0 on Linux