Account Options

  1. Sign in
The old Google Groups will be going away soon, but your browser is incompatible with the new version.
Google Groups Home
« Groups Home
Semantic differential: Labels for secondary axis
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  6 messages - Collapse all  -  Translate all to Translated (View all originals)
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:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
igreg  
View profile  
 More options Mar 20 2012, 6:18 pm
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.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Kohske Takahashi  
View profile  
 More options Mar 21 2012, 1:34 am
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

  plot.png
71K Download

 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
igreg  
View profile  
 More options Mar 21 2012, 6:45 am
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.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Discussion subject changed to "dev_tools (was Re: Semantic differential: Labels for secondary axis)" by Timothy Bates
Timothy Bates  
View profile  
 More options Mar 21 2012, 8:59 am
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:


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
R. Michael Weylandt  
View profile  
 More options Mar 21 2012, 9:13 am
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


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Ian Fiske  
View profile  
 More options Nov 19 2012, 11:34 am
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


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
End of messages
« Back to Discussions « Newer topic     Older topic »