Re: [R] asking about contour plot with R

From: Duncan Murdoch <murdoch.duncan_at_gmail.com>
Date: Fri, 08 Apr 2011 12:22:49 -0400

On 08/04/2011 9:16 AM, nferreri_at_fceia.unr.edu.ar wrote:
> I'm working in Rosario, Argentina, trying to plot some contours.
>
> I found the function "draw.contour" created by James Forester at
> R-bloggers. If you take a look at that function you'll see it's very
> useful!
>
> But I have a problem with it and James is trying to help me (but also
> asked me to seek for more help) I hope you can help me (don't worry if you
> can't):
>
> Using "draw.contour" I get the contour but I want to place it in a
> cartesian-coordinate system where x = "Componente 1" range between -1 y 1
> and y = "Componente 2" range between 0 and 3, regardless of xrange or
> yrange.
>
> Of course, xrange and yrange are important to obtain an adequate contour
> plot but I want to see that contour in the cartesian coordinate system I
> told you before.
>
> so I put ylim = c(0,3) and xlim = c(-1,1) but R ignores those sentences
> and gives me a graphic using xrange and yrange as limits
>
> can anyone help me? I hope you can understand my problem (and my poor
> english!!!). if you don't, tell me and i'll send you more information
>
> thank you very much!!!

My advice would be to use the contour() function, rather than "draw.contour". I would guess the latter was written to solve a particular problem, whereas contour() is the general purpose function in base R, and it does respect your requests for xlim and ylim.

Duncan Murdoch



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. Received on Fri 08 Apr 2011 - 16:28:59 GMT

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.2.0, at Fri 08 Apr 2011 - 16:40:28 GMT.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-help. Please read the posting guide before posting to the list.

list of date sections of archive