Wednesday, 12 October 2011

R - GGplot with white background

I wanted to draw a graph without lines and backgrounds. The relevant code is:

opts(panel.grid.minor = theme_blank(), panel.grid.major = theme_blank(), panel.background = theme_blank())


Example:

s = seq(-2*pi, 2*pi, length.out = 1000)

dat = data.frame(x = s)

ggplot(dat) +
geom_line(aes(x = x, y = sin(1*x)), size = 2, color = "red") +
geom_line(aes(x = x, y = sin(1.1*x)), size = 2, color = "red", linetype="dashed") +
opts(
panel.grid.minor = theme_blank(),
panel.grid.major = theme_blank(),
panel.background = theme_blank()
)

Thursday, 6 October 2011

Android voice search

Android voice search works much better if you change
Settings -> Voice recognizer settings -> Language 

From English (Australia) to English (US).

For example, "map brisbane" actually brings up a map rather than just doing google search.

See http://www.google.com/support/mobile/bin/answer.py?hl=en&answer=168603 for commands.