Skip to content

Commit

Permalink
add Mattriks' new geometry to updated docs
Browse files Browse the repository at this point in the history
  • Loading branch information
tlnagy committed Sep 1, 2016
1 parent 631e303 commit 6c55b86
Showing 1 changed file with 19 additions and 19 deletions.
38 changes: 19 additions & 19 deletions doc/geom_segment.md → docs/src/lib/geoms/geom_segment.md
Original file line number Diff line number Diff line change
@@ -1,36 +1,37 @@
---
title: segment
author: Mattriks
part: Geometry
order: 1019
...
# Geom.segment

```@meta
Author = "Mattriks"
```

Draw separate line segments/vectors/arrows.
Note that if you want arrows, then you need to provide a `Scale` object for both axes. See example below.

# Aesthetics
!!! note

If you want arrows, then you need to provide a `Scale` object for both axes. See example below.

## Aesthetics

* `x`: Start of line segment.
* `y`: Start of line segment.
* `xend`: End of line segment.
* `yend`: End of line segment.
* `color` (optional): Color of line segments.

# Arguments

* `arrow`: Default behavior for `Geom.segment` is to draw line segments without arrows.
`Geom.vector()` is `Geom.segment(arrow=true)`.
## Arguments

* `arrow`: Default behavior for `Geom.segment` is to draw line segments without arrows. `Geom.vector` is `Geom.segment(arrow=true)`.

# Examples

```{.julia hide="true" results="none"}
using RDatasets
using Gadfly
## Examples

Gadfly.set_default_plot_size(6.6inch, 6.6inch)
```@example 1
using RDatasets # hide
using Gadfly # hide
Gadfly.set_default_plot_size(14cm, 14cm) # hide
```

```julia
```@example 1
seals = RDatasets.dataset("ggplot2","seals")
seals[:Latb] = seals[:Lat] + seals[:DeltaLat]
seals[:Longb] = seals[:Long] + seals[:DeltaLong]
Expand All @@ -46,4 +47,3 @@ layer1 = layer(seals, x=:Long, y=:Lat, xend=:Longb, yend=:Latb, Geom.vector, col
plot(layer1, xsc, ysc, colsc, coord)
```

0 comments on commit 6c55b86

Please sign in to comment.