Skip to content

Latest commit

 

History

History
36 lines (26 loc) · 765 Bytes

scale_y_discrete.md

File metadata and controls

36 lines (26 loc) · 765 Bytes

title: y_discrete author: Daniel Jones part: Scale order: 2002 ...

Map data categorical to cartesian coordinates. Unlike Scale.y_continuous, each unique y value will be mapped to a equally spaced positions, regardless of value.

By default continuous scales are applied to numerical data. If data consists of numbers specifying categories, explititly adding Scale.y_discrete is the easiest way to get that data to plot appropriately.

Aesthetics Acted On

y, ymin, ymax, yintercept

Examples

using RDatasets
using Gadfly

Gadfly.prepare_display()
Gadfly.set_default_plot_size(12cm, 8cm)
srand(1234)
# Tread numerical y data as categories
plot(x=rand(10), y=rand(5), Scale.y_discrete)