Re: [R] how to plot this?

2007-06-26 Thread Jim Lemon
Weiwei Shi wrote:
> Hi, there:
> 
> Suppose I have a couple of data.frames and each one has five columns
> (one for x-axis, two for y-axis and two for std of y's.) There is
> another dimensions (besides x and y) which is continuous. My question
> is, how to plot such series of data frames in one plot (thus,
> 3-dimensional plot) AND multiple 2-D plots. I am not familar with R's
> plotting utilities.
> 
Hi Weiwei,

Maybe color2D.matplot for the 2D plots, setting par(mfrow...) 
appropriately. I have just uploaded a new version of plotrix in which 
color2D.matplot will handle NAs appropriately, doing such things as 
upper or lower triangles of matrices. Look for version 2.2-2 when it 
pops up on CRAN.

Jim

__
R-help@stat.math.ethz.ch 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.


Re: [R] how to plot this?

2007-06-25 Thread hadley wickham
On 6/25/07, jim holtman <[EMAIL PROTECTED]> wrote:
> You might want to check out this link to the type of graphs that R can
> produce and find one you like; the code will be with it.
>
> http://addictedtor.free.fr/graphiques/allgraph.php

Or for examples using the ggplot2 package:

http://had.co.nz/ggplot2

Hadley

__
R-help@stat.math.ethz.ch 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.


Re: [R] how to plot this?

2007-06-25 Thread jim holtman
You might want to check out this link to the type of graphs that R can
produce and find one you like; the code will be with it.

http://addictedtor.free.fr/graphiques/allgraph.php


On 6/25/07, Weiwei Shi <[EMAIL PROTECTED]> wrote:
>
> Hi, there:
>
> Suppose I have a couple of data.frames and each one has five columns
> (one for x-axis, two for y-axis and two for std of y's.) There is
> another dimensions (besides x and y) which is continuous. My question
> is, how to plot such series of data frames in one plot (thus,
> 3-dimensional plot) AND multiple 2-D plots. I am not familar with R's
> plotting utilities.
>
> Thanks.
>
> --
> Weiwei Shi, Ph.D
> Research Scientist
> GeneGO, Inc.
>
> "Did you always know?"
> "No, I did not. But I believed..."
> ---Matrix III
>
> __
> R-help@stat.math.ethz.ch 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.
>



-- 
Jim Holtman
Cincinnati, OH
+1 513 646 9390

What is the problem you are trying to solve?

[[alternative HTML version deleted]]

__
R-help@stat.math.ethz.ch 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.


Re: [R] how to plot this?

2007-06-25 Thread jim holtman
You might want to check out this link to the type of graphs that R can
produce and find one you like; the code will be with it.

http://addictedtor.free.fr/graphiques/allgraph.php


On 6/25/07, Weiwei Shi <[EMAIL PROTECTED]> wrote:
>
> Hi, there:
>
> Suppose I have a couple of data.frames and each one has five columns
> (one for x-axis, two for y-axis and two for std of y's.) There is
> another dimensions (besides x and y) which is continuous. My question
> is, how to plot such series of data frames in one plot (thus,
> 3-dimensional plot) AND multiple 2-D plots. I am not familar with R's
> plotting utilities.
>
> Thanks.
>
> --
> Weiwei Shi, Ph.D
> Research Scientist
> GeneGO, Inc.
>
> "Did you always know?"
> "No, I did not. But I believed..."
> ---Matrix III
>
> __
> R-help@stat.math.ethz.ch 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.
>



-- 
Jim Holtman
Cincinnati, OH
+1 513 646 9390

What is the problem you are trying to solve?

[[alternative HTML version deleted]]

__
R-help@stat.math.ethz.ch 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.


RE: [R] How to plot this

2004-11-16 Thread Mulholland, Tom
If this is a quick and dirty process you want rather than learning all the 
capabilities that are in R then I would copy the density curve (or the bits you 
like) into your favourite image editor, and use it's capabilities to pretty it 
up.

However there are a number of options. Firstly you have chosen to plot 
density(y). When I looked at the help for density it gives the values returned 
by density. If you want a custom plot maybe you should try

dcurve <- density(y)

you could then directly access the $x and $y components as you would in any plot

For instance plot(density(y)) gives you the grey line. However 
plot(dcurve$x,dcurve$y,type = "l") gives you a different type of plot.

As for arrowheads one could create an appropriate "polygon" to stick at each 
end. Which for a one off might be a bit of overkill. Sometime in all of this 
you'll also probably encounter clipping, in which case par(xpd = TRUE) will 
often help. Just remember to turn if off or you may find unwanted graphics 
appearing later on.

For putting the labels where you want you could use "mtext." This gives you 
control over where you want to place the text.

A word of caution. If you are going to start prettying up you plots to very 
specific standards make sure that you are working on the final device from 
which you wish to take the final copy. Each of the devices have their own 
capabilities which are often not related to R but rather to their own 
environment. That is you can't get a plot looking perfect in a window and 
assume that the same code sent to a postscript device will produce identical 
results. 

R can give you very good graphics, often straight out of the box, but like any 
publishing process it can be a bit fiddly.

Tom Mulholland
Senior Demographer
Department for Planning and Infrastructure
Perth, WA, Australia.




-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
Sent: Wednesday, 17 November 2004 2:39 PM
To: [EMAIL PROTECTED]
Subject: [R] How to plot this


Hi there,

 

I produced a plot using the following codes:

 

y<-rnorm(1000, 2, 0)

x0<-c(0, 0)

y0<-c(0, 0)

y1<-c(0, 1)

x1<-c(0, 4)

plot(density(y), ylab="Abundance of species", xlab="Environmental
gradient", main=" ", 

   xlim=c(0, 4), ylim=c(0, 1), lty=2, col=4, xaxt="n", yaxt="n",
frame.plot=F)

lines(x0, y1) # add an axis

lines(x1, y0) # add an axis

arrows(3.95, 0, 4, 0,  angle = 15, length = 0.1)

arrows(0, 0.98, 0, 1,  angle = 15, length = 0.1)

 

Please help me to remove the grey horizontal line and put the axis
labels closer to the axes. And also appreciate any suggestions on how to
make those arrows look nicer, e.g. a filled small arrow for each axis,
like what from points(0, 1,   pch=17), but a slightly narrowed one.
Thanks.

 

Regards,

 

Jin Li



Jin Li, PhD

Climate Impacts Modeller

CSIRO Sustainable Ecosystems

Atherton, QLD 4883, Australia



 


[[alternative HTML version deleted]]

__
[EMAIL PROTECTED] mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html

__
[EMAIL PROTECTED] mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html