Luxor.jl

Simple vector graphics

Cairo for tourists!

Luxor.jl Luxor.jl
colorful graphic colorful graphic

Colorful drawings

With Luxor you can make all kinds of drawings with vector and pixel graphics, static illustrations, diagrams, generative artworks, and simple animations, using colored fills, strokes, patterns, blends, and gradient meshes. There are turtles too, if you like exploring Turtle Graphics.

colorful graphic colorful graphic

Graphical toolbox

Luxor provides lots of graphic primitives: lines, rectangles, circles, ellipses, arcs, polygons, Bézier curves, squircles, hypotrochoids, stars, crescents, pies, sectors, plus options for filling, stroking, clipping, and blending shapes. You can build up complex compositions using coordinate transformations (translation, rotation, and scaling) and Boolean operations.

text handling text handling

Text

Luxor's text handling allows for custom fonts, text alignment, text-on-a-path, and precise placement, useful for annotated diagrams, posters, and typographic experiments in addition to pure geometric art. You can add text to drawings using the LaTEX and Typst text engines.

grids grids

Layout

Luxor includes features for common layout tasks, such as arranging objects in grids and tables, creating tiling patterns, and computing point arrangements along paths.

mona mona lisa mona mona lisa

Pixels and noise

Luxor lets you add pixel-based graphics to drawings, and you can interact with Julia's images-processing package Images.jl. You can freely mix pixel images and vector graphics, and there's noise generation tools too, for making graphics based on procedural noise.

output formats output formats

Output

You can export drawings to multiple formats, including PNG, SVG, PDF, and EPS, and Luxor integrates well with Jupyter/Pluto notebooks for inline previews. Animations can be exported as animated GIFs and MP4 movies.

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.

Here's a Luxor drawing showing some of the possibilities:

"luxor gallery"

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

There are some Luxor-related videos on YouTube, and some Luxor-related blog posts at cormullion.github.io/.

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()

or

julia> @png juliacircles()

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

Documentation

This documentation was built using Documenter.jl.

Documentation built 2026-08-19T13:54:30.234 with Julia 1.12.7 on Linux