Guide.xticks

Formats the tick marks and labels for the x-axis

Arguments

Examples

ticks = [0.1, 0.3, 0.5]
plot(x=rand(10), y=rand(10), Geom.line, Guide.xticks(ticks=ticks))
x 0.1 0.3 0.5 0.0 0.5 1.0 y
plot(x=rand(10), y=rand(10), Geom.line, Guide.xticks(ticks=ticks, label=false))
x 0.0 0.5 1.0 y
plot(x=rand(10), y=rand(10), Geom.line, Guide.xticks(ticks=ticks, orientation=:vertical))
x 0.1 0.3 0.5 0.0 0.2 0.4 0.6 0.8 1.0 y

Range types can also be used

plot(x=rand(1:10, 10), y=rand(1:10, 10), Geom.line, Guide.xticks(ticks=[1:9;]))
x 1 2 3 4 5 6 7 8 9 0.0 2.5 5.0 7.5 10.0 y
Note

The ; in ticks=[1:9;] is required to flatten the 1:9 range type into [1, 2, 3, ...]. Alternatively, collect can be used in the following manner ticks=collect(1:9).