Skip to content

Latest commit

 

History

History
38 lines (30 loc) · 676 Bytes

geom_path.md

File metadata and controls

38 lines (30 loc) · 676 Bytes

title: path author: David Chudzicki part: Geometry order: 1015 ...

Draw lines between points in the order they appear in the data. This is Geom.line(preserve_order=true).

Aesthetics

  • x: X-axis position.
  • y: Y-axis position.
  • color (optional): Group categorically by color.

Examples

using Gadfly

Gadfly.prepare_display()
Gadfly.set_default_plot_size(14cm, 8cm)

Here's a random walk in 2D:

n = 500
srand(1234)
xjumps = rand(n)-.5
yjumps = rand(n)-.5
plot(x=cumsum(xjumps),y=cumsum(yjumps),Geom.path())

Here's a spiral:

t = [0:0.2:8pi]
plot(x=t.*cos(t), y=t.*sin(t), Geom.path)