Book Image

Interactive Visualization and Plotting with Julia

By : Diego Javier Zea
Book Image

Interactive Visualization and Plotting with Julia

By: Diego Javier Zea

Overview of this book

The Julia programming language offers a fresh perspective into the data visualization field. Interactive Visualization and Plotting with Julia begins by introducing the Julia language and the Plots package. The book then gives a quick overview of the Julia plotting ecosystem to help you choose the best library for your task. In particular, you will discover the many ways to create interactive visualizations with its packages. You’ll also leverage Pluto notebooks to gain interactivity and use them intensively through this book. You’ll find out how to create animations, a handy skill for communication and teaching. Then, the book shows how to solve data analysis problems using DataFrames and various plotting packages based on the grammar of graphics. Furthermore, you’ll discover how to create the most common statistical plots for data exploration. Also, you’ll learn to visualize geographically distributed data, graphs and networks, and biological data. Lastly, this book will go deeper into plot customizations with Plots, Makie, and Gadfly—focusing on the former—teaching you to create plot themes, arrange multiple plots into a single figure, and build new plot types. By the end of this Julia book, you’ll be able to create interactive and publication-quality static plots for data analysis and exploration tasks using Julia.
Table of Contents (19 chapters)
1
Section 1 – Getting Started
6
Section 2 – Advanced Plot Types
12
Section 3 – Mastering Plot Customization

Working with themes

In this chapter, we will work with plot themes using Plots, Makie, and Gadfly. These packages define themes by using the default value for each attribute. In fact, for them, a theme is a set of default attribute values we can reuse. The attributes we can determine using themes change from package to package. Still, usually, we can set colors and fonts for all of them. When looking for plot attributes to customize, you will find it helpful to look at Chapter 10, The Anatomy of a Plot, and Chapter 12, Customizing Plot Attributes – Axes, Legends, and Colors.

There are many reasons we could find it interesting to change the package’s default theme; one classic example is to match the style of our IDE. Sometimes, it could be helpful to do it just to fit a personal or professional brand style. In other cases, we could find it beneficial to make our plot style closer to one from another library. Let’s imagine we are using Julia to create the figures...