Search icon CANCEL
Subscription
0
Cart icon
Your Cart (0 item)
Close icon
You have no products in your basket yet
Save more on your purchases now! discount-offer-chevron-icon
Savings automatically calculated. No voucher code required.
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Conferences
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
Interactive Visualization and Plotting with Julia

You're reading from   Interactive Visualization and Plotting with Julia Create impressive data visualizations through Julia packages such as Plots, Makie, Gadfly, and more

Arrow left icon
Product type Paperback
Published in Aug 2022
Publisher Packt
ISBN-13 9781801810517
Length 392 pages
Edition 1st Edition
Languages
Tools
Arrow right icon
Author (1):
Arrow left icon
Diego Javier Zea Diego Javier Zea
Author Profile Icon Diego Javier Zea
Diego Javier Zea
Arrow right icon
View More author details
Toc

Table of Contents (19) Chapters Close

Preface 1. Section 1 – Getting Started
2. Chapter 1: An Introduction to Julia for Data Visualization and Analysis FREE CHAPTER 3. Chapter 2: The Julia Plotting Ecosystem 4. Chapter 3: Getting Interactive Plots with Julia 5. Chapter 4: Creating Animations 6. Section 2 – Advanced Plot Types
7. Chapter 5: Introducing the Grammar of Graphics 8. Chapter 6: Creating Statistical Plots 9. Chapter 7: Visualizing Graphs 10. Chapter 8: Visualizing Geographically Distributed Data 11. Chapter 9: Plotting Biological Data 12. Section 3 – Mastering Plot Customization
13. Chapter 10: The Anatomy of a Plot 14. Chapter 11: Defining Plot Layouts to Create Figure Panels 15. Chapter 12: Customizing Plot Attributes – Axes, Legends, and Colors 16. Chapter 13: Designing Plot Themes 17. Chapter 14: Designing Your Own Plots – Plot Recipes 18. Other Books You May Enjoy

Introducing the Grammar of Interactive Graphics with VegaLite

Vega-Lite is a JavaScript library that extended the Grammar of Graphics to a Grammar of Interactive Graphics. It uses Vega as a backend, and you need to write the plot specifications in JSON. Its grammar refers to mark as geometry, channel as aesthetic, and encoding as mapping. The grammar provides statistics such as density, inside transformations, and interactivity mainly through selection.

You can use Vega-Lite from Julia thanks to the VegaLite package. Its @vlplot macro allows you to write the specification in Julia. In the @vlplot macro, the first positional argument indicates the mark to use, and the keyword arguments indicate channels and encodings. Let’s look at some examples of the syntax in action:

  1. Create a new Pluto notebook and execute the following code in the first cell:
    begin
        using Pkg
        Pkg.activate(temp=true)
        Pkg.add(...
lock icon The rest of the chapter is locked
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $19.99/month. Cancel anytime