Semantic differential: Labels for secondary axis
The group you are posting to is a
Usenet group . Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
From:
igreg <zooro... @gmx.net>
Date: Tue, 20 Mar 2012 15:18:50 -0700 (PDT)
Local: Tues, Mar 20 2012 6:18 pm
Subject: Semantic differential: Labels for secondary axis
dear ggploters
i would like to plot a semantic differential with ggplot2.
http://en.wikipedia.org/wiki/Semantic_differential
my example:
library (ggplot2)
library (scales)
library (grid)
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))
df <- df[order(brands) ,]
pl <- ggplot(df, aes(x=positive, y=values, colour=brands))
pl <- pl + geom_line(aes(group=brands))
pl <- pl + geom_point(size=4)
pl <- pl + opts(legend.position = "bottom")
pl <- pl + coord_flip ()
pl
question:
how to label the axis on the right side with the "negativ"
concepts... ? the concepts should appear in the same font/size etc.
any ideas?
thanks, greg
You must
Sign in before you can post messages.
You do not have the permission required to post.
From:
Kohske Takahashi <takahashi.koh... @gmail.com>
Date: Wed, 21 Mar 2012 14:34:52 +0900
Local: Wed, Mar 21 2012 1:34 am
Subject: Re: Semantic differential: Labels for secondary axis
In the future version you may do like:
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 <zooro... @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 <takahashi.koh
... @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
You must
Sign in before you can post messages.
You do not have the permission required to post.
From:
igreg <zooro... @gmx.net>
Date: Wed, 21 Mar 2012 03:45:54 -0700 (PDT)
Local: Wed, Mar 21 2012 6:45 am
Subject: Re: Semantic differential: Labels for secondary axis
Kohske! you are my hero :-)
that's exactly what I need!
i will try to install the dev version...
and hope to see your developments soon in the next release version of
ggplot2...
thank you. greg
You must
Sign in before you can post messages.
You do not have the permission required to post.
From:
Timothy Bates <timothy.c.ba... @gmail.com>
Date: Wed, 21 Mar 2012 12:59:55 +0000
Local: Wed, Mar 21 2012 8:59 am
Subject: dev_tools (was Re: Semantic differential: Labels for secondary axis)
hi Kohske,
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)
On 21 Mar 2012, at 5:34 AM, Kohske Takahashi <takahashi.koh... @gmail.com> wrote:
> In the future version you may do like:
> 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 <zooro... @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 <takahashi.koh... @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
> -- > 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 ggplot2@googlegroups.com > To unsubscribe: email ggplot2+unsubscribe@googlegroups.com > More options: http://groups.google.com/group/ggplot2 > <plot.png>
You must
Sign in before you can post messages.
You do not have the permission required to post.
From:
"R. Michael Weylandt" <michael.weyla... @gmail.com>
Date: Wed, 21 Mar 2012 09:13:26 -0400
Local: Wed, Mar 21 2012 9:13 am
Subject: Re: dev_tools (was Re: Semantic differential: Labels for secondary axis)
I'd guess that was a typo and Koshke meant devtools which is on CRAN.
Michael
On Wed, Mar 21, 2012 at 8:59 AM, Timothy Bates
<timothy.c.ba
... @gmail.com> wrote:
> hi Kohske,
> 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)
> On 21 Mar 2012, at 5:34 AM, Kohske Takahashi <takahashi.koh... @gmail.com> wrote:
>> In the future version you may do like:
>> 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 <zooro... @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 <takahashi.koh... @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
>> -- >> 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 ggplot2@googlegroups.com >> To unsubscribe: email ggplot2+unsubscribe@googlegroups.com >> More options: http://groups.google.com/group/ggplot2 >> <plot.png>
> -- > 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 ggplot2@googlegroups.com > To unsubscribe: email ggplot2+unsubscribe@googlegroups.com > More options: http://groups.google.com/group/ggplot2
You must
Sign in before you can post messages.
You do not have the permission required to post.
From:
Ian Fiske <ianfi... @gmail.com>
Date: Mon, 19 Nov 2012 08:34:41 -0800 (PST)
Local: Mon, Nov 19 2012 11:34 am
Subject: Re: dev_tools (was Re: Semantic differential: Labels for secondary axis)
I am trying to work through this post and https://groups.google.com/forum/?fromgroups=#!topic/ggplot2-dev/JkJU5... in order to get a secondary y-axis (for a linear conversion of the left y-axis). However, the dev mode install cannot find the zip fie for the feature branch me:
d> install_github("ggplot2", "kohske", "feature/pguide")
Installing github repo(s) ggplot2/feature/pguide from kohske
Installing ggplot2.zip from https://api.github.com/repos/kohske/ggplot2/zipball/feature/pguide
Error: client error: (404) Not Found
Any ideas are appreciated,
Ian
On Wednesday, March 21, 2012 9:13:26 AM UTC-4, Michael Weylandt wrote:
> I'd guess that was a typo and Koshke meant devtools which is on CRAN.
> Michael
> On Wed, Mar 21, 2012 at 8:59 AM, Timothy Bates
> <timothy... @gmail.com <javascript:>> wrote:
> > hi Kohske,
> > 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)
> > On 21 Mar 2012, at 5:34 AM, Kohske Takahashi <takahash... @gmail.com<javascript:>> > wrote:
> >> In the future version you may do like:
> >> 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 <javascript:>>:
> >>> 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 <javascript:>>
> >> Research Center for Advanced Science and Technology,
> >> The University of Tokyo, Japan.
> >> http://www.fennel.rcast.u-tokyo.ac.jp/profilee_ktakahashi.html
> >> --
> >> 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 <javascript:>
> >> To unsubscribe: email ggplot2+u...@googlegroups.com <javascript:>
> >> More options: http://groups.google.com/group/ggplot2
> >> <plot.png>
> > --
> > 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 <javascript:>
> > To unsubscribe: email ggplot2+u...@googlegroups.com <javascript:>
> > More options: http://groups.google.com/group/ggplot2
You must
Sign in before you can post messages.
You do not have the permission required to post.