Scale.x_continuous

Map numerical data to x positions in cartesian coordinates.

Arguments

Note

minvalue and maxvalue here are soft bounds, Gadfly may choose to ignore them when constructing an optimal plot. Use Coord.cartesian to enforce a hard bound.

Variations

A number of transformed continuous scales are provided.

Aesthetics Acted On

x, xmin, xmax, xintercept

Examples

# Transform both dimensions
plot(x=rand(10), y=rand(10), Scale.x_log)
x e-2.0 e-1.5 e-1.0 e-0.5 e0.0 0.0 0.5 1.0 y
# Force the viewport
plot(x=rand(10), y=rand(10), Scale.x_continuous(minvalue=-10, maxvalue=10))
x -10 -5 0 5 10 0.0 0.2 0.4 0.6 0.8 1.0 y
# Use scientific notation
plot(x=rand(10), y=rand(10), Scale.x_continuous(format=:scientific))
x 0 2.0×10⁻¹ 4.0×10⁻¹ 6.0×10⁻¹ 8.0×10⁻¹ 0.0 0.2 0.4 0.6 0.8 y
# Use manual formatting
plot(x=rand(10), y=rand(10), Scale.x_continuous(labels=x -> @sprintf("%0.4f", x)))
x 0.0000 0.2000 0.4000 0.6000 0.8000 1.0000 0.0 0.2 0.4 0.6 0.8 y