Hi all, Using filled.contour... foo <- matrix(seq(0.1, 0.9, 0.1), ncol = 3) filled.contour(foo) how can I set the key axis to give percentages? And is there a way to automatically label the key axis except for placing text there? Thanks Haiko Haiko Lietz GESIS - Leibniz Institute for the Social Sciences Department of Computational Social Science Unter Sachsenhausen 6-8, D-50667 K?ln Tel: + 49 (0) 221 / 476 94 -223 eMail: haiko.lietz at gesis.org<mailto:haiko.lietz at gesis.org> Web: http://www.gesis.org<http://www.gesis.org/>
filled.contour key axis
5 messages · Lietz, Haiko, Jim Lemon, Jeff Newmiller
On Mon, 18 Aug 2014 08:51:57 AM Lietz, Haiko wrote:
Hi all, Using filled.contour... foo <- matrix(seq(0.1, 0.9, 0.1), ncol = 3) filled.contour(foo) how can I set the key axis to give percentages? And is there a way to automatically label the key axis except for
placing
text there? Thanks Haiko
Hi Haiko,
Try this:
filled.contour(foo,
plot.axes={axis(1);
axis(2,at=seq(0,1,by=0.2),labels=seq(0,100,by=20))},
key.axes=
{axis(4,at=seq(0,1,by=0.2),labels=seq(0,100,by=20))})
Jim
4 days later
Hi Jim, all, Thx, I was hoping for percentage scores, such that R puts numbers with "%" there. And by "automatically labeling" I meant giving the axis a title, sorry for mixing that up. I havn't found an option in the parameters for filled.contour. Haiko
Von: Jim Lemon [jim at bitwrit.com.au]
Gesendet: Montag, 18. August 2014 14:41
An: r-help at r-project.org
Cc: Lietz, Haiko
Betreff: Re: [R] filled.contour key axis
On Mon, 18 Aug 2014 08:51:57 AM Lietz, Haiko wrote:
> Hi all,
>
> Using filled.contour...
>
> foo <- matrix(seq(0.1, 0.9, 0.1), ncol = 3)
> filled.contour(foo)
>
> how can I set the key axis to give percentages?
>
> And is there a way to automatically label the key axis except for
placing
> text there?
>
> Thanks
>
> Haiko
Hi Haiko,
Try this:
filled.contour(foo,
plot.axes={axis(1);
axis(2,at=seq(0,1,by=0.2),labels=seq(0,100,by=20))},
key.axes=
{axis(4,at=seq(0,1,by=0.2),labels=seq(0,100,by=20))})
Jim
You seem to be thinking of Excel. R does not dress up numbers for you... if you want them represented in a particular way, you need to format them into a character string. There are plenty of options for doing that.
---------------------------------------------------------------------------
Jeff Newmiller The ..... ..... Go Live...
DCN:<jdnewmil at dcn.davis.ca.us> Basics: ##.#. ##.#. Live Go...
Live: OO#.. Dead: OO#.. Playing
Research Engineer (Solar/Batteries O.O#. #.O#. with
/Software/Embedded Controllers) .OO#. .OO#. rocks...1k
---------------------------------------------------------------------------
Sent from my phone. Please excuse my brevity.
On August 22, 2014 10:36:23 AM PDT, "Lietz, Haiko" <Haiko.Lietz at gesis.org> wrote:
Hi Jim, all, Thx, I was hoping for percentage scores, such that R puts numbers with "%" there. And by "automatically labeling" I meant giving the axis a title, sorry for mixing that up. I havn't found an option in the parameters for filled.contour. Haiko
________________________________________
Von: Jim Lemon [jim at bitwrit.com.au]
Gesendet: Montag, 18. August 2014 14:41
An: r-help at r-project.org
Cc: Lietz, Haiko
Betreff: Re: [R] filled.contour key axis
On Mon, 18 Aug 2014 08:51:57 AM Lietz, Haiko wrote:
Hi all,
Using filled.contour...
foo <- matrix(seq(0.1, 0.9, 0.1), ncol = 3)
filled.contour(foo)
how can I set the key axis to give percentages?
And is there a way to automatically label the key axis except for
placing
text there?
Thanks
Haiko
Hi Haiko,
Try this:
filled.contour(foo,
plot.axes={axis(1);
axis(2,at=seq(0,1,by=0.2),labels=seq(0,100,by=20))},
key.axes=
{axis(4,at=seq(0,1,by=0.2),labels=seq(0,100,by=20))})
Jim
______________________________________________
R-help at r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide
http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.
On Fri, 22 Aug 2014 05:36:23 PM Lietz, Haiko wrote:
Hi Jim, all, Thx, I was hoping for percentage scores, such that R puts numbers
with "%"
there. And by "automatically labeling" I meant giving the axis a title, sorry for mixing that up. I havn't found an option in the parameters for filled.contour. Haiko
Hi Haiko,
I think what Jeff meant was:
filled.contour(foo,
plot.axes={axis(1);
axis(2,at=seq(0,1,by=0.2),
labels=paste(seq(0,100,by=20),"%"))},
key.axes=
{axis(4,at=seq(0,1,by=0.2),
labels=paste(seq(0,100,by=20),"%"))})
Even Excel can't read your mind, although it sometimes thinks it can.
Jim