Skip to content

Latest commit

 

History

History
50 lines (37 loc) · 1 KB

geom_point.md

File metadata and controls

50 lines (37 loc) · 1 KB

title: point author: Daniel Jones part: Geometry order: 1008 ...

The point geometry is used to draw various types of scatterplots.

Aesthetics

  • x: X-axis position.
  • y: Y-axis position.
  • color (optional): Point color (categorial or continuous).

Examples

using RDatasets
using Gadfly

Gadfly.prepare_display()
Gadfly.set_default_plot_size(14cm, 8cm)
plot(dataset("datasets", "iris"), x="SepalLength", y="SepalWidth", Geom.point)
# Binding categorial data to the color aesthetic
plot(dataset("datasets", "iris"), x="SepalLength", y="SepalWidth",
     color="Species", Geom.point)
# Binding continuous data to the color aesthetic
plot(dataset("datasets", "iris"), x="SepalLength", y="SepalWidth",
     color="PetalLength", Geom.point)
# Binding categorial data to x
plot(dataset("lattice", "singer"), x="VoicePart", y="Height", Geom.point)