positive <- c("hot","good","wet")
negative <- c("cold","bad","dry")
Q <- gl(3, 4)
brands <- rep(c("Audi","Mercedes","BMW","Fiat"),3)
values <- c(5.5,4,6,3,4.5,2,6,3.2,4.7,3.9,2.8,1.9)
df <- data.frame (Q,brands,values)
ggplot(df, aes(values, Q, colour = brands, group = brands)) + geom_path() +
scale_y_discrete(guide = list(
guide_axis(label = positive),
guide_axis(position = "right", label = negative))) +
guides(colour = guide_legend())
This is under development.
If you want to use, try installing from github:
install.packages('dev_tools")
dev_mode()
install_github("ggplot2", "kohske", "feature/pguide")
Note that I cannot make sure if all things work.
kohske
2012年3月21日7:18 igreg <zoor...@gmx.net>:
>
> positive <- rep(c("hot","good","wet"),4)
> negative <- rep(c("cold","bad","dry"),4)
> brands <- rep(c("Audi","Mercedes","BMW","Fiat"),3)
> values <- c(5.5,4,6,3,4.5,2,6,3.2,4.7,3.9,2.8,1.9)
> df <- data.frame (cbind (positive,negative,brands,values))
--
--
Kohske Takahashi <takahash...@gmail.com>
Research Center for Advanced Science and Technology,
The University of Tokyo, Japan.
http://www.fennel.rcast.u-tokyo.ac.jp/profilee_ktakahashi.html
Is dev_tools itself available (OS X)?
install.packages('dev_tools')
Warning message:
In getDependencies(pkgs, dependencies, available, lib) :
package ‘dev_tools’ is not available (for R version 2.14.1)
> --
> You received this message because you are subscribed to the ggplot2 mailing list.
> Please provide a reproducible example: http://gist.github.com/270442
>
> To post: email ggp...@googlegroups.com
> To unsubscribe: email ggplot2+u...@googlegroups.com
> More options: http://groups.google.com/group/ggplot2
> <plot.png>
Michael