Contour¶
Isolines of the Julia field at twelve automatically chosen levels, each coloured from the colormap by its level.
The figure above is live, drawn in the browser by the same engine that draws the viewer: drag it to pan, and click it to zoom with the wheel. Download the PDF for the vector figure that IronLAB exports, or read how to embed a figure of your own.
Source¶
The figure is built by the following code. Its data comes from the functions on the data helpers page.
use ironlab::prelude::*;
use crate::fields::*;
pub const TITLE: &str = "Contour";
pub const DESCRIPTION: &str = "Isolines of the Julia field at twelve automatically chosen levels, each coloured from \
the colormap by its level.";
pub fn figure() -> Figure {
let (x, y, z) = julia_grid(121);
let mut fig = Figure::new()
.size_mm(120.0, 100.0)
.title(r"Isolines of $\ln(1 + |z_3|)$")
.label("contour")
.label("basics")
.label("levels")
.parameter("dimensionality", "2D")
.parameter("artists", 1)
.parameter("data_points", 14_883)
.parameter("has_legend", false);
let mut ax = fig.axes(0, 0);
ax.contour(&x, &y, &z).levels(12).line_width(1.0);
ax.xlabel("$x$").ylabel("$y$");
fig
}
