similar to: how to index statements provided as function args?

Displaying 20 results from an estimated 30000 matches similar to: "how to index statements provided as function args?"

2004 Nov 04
1
Labelling contour lines
I am using contour to draw contour lines onto a photo (jpeg) of a leaf on a white background. I have two problems: 1) The contour gets plotted at right angles to the jpeg image. I guess this is a problem of referencing the start and end points of the image matrix but I can't see how to over come this other than loading in a second image that has been rotated 90 degrees and plotting the
2004 Jan 31
1
about contour - get contour coordinates - exclude area display
Dear all, I wonder about what could actually be possible with the function "contour": 1/ - the definition of contour lines is most often meaningless when the contours are drawn in areas where no real data points exist. It can however happen that irregular distributions lead to more or less irregular clouds of data points. Interpolations (eg: loess regression, GLM, etc...) are however
2010 Aug 06
1
[R-SIG-Mac] Question about line type in contour() function (R 2.11.1)
On 05/08/2010 8:46 PM, David B. Thompson, Ph.D., P.E., D.WRE, CFM wrote: > On Aug 5, 2010, at 5:20 PM, Duncan Murdoch wrote: > >> On 05/08/2010 7:18 PM, David B. Thompson, Ph.D., P.E., D.WRE, CFM wrote: >>> I'm running R 2.11.1 (MacBook Pro and OS X 10.6.4) and am trying to set a line type in the contour() function. What I did was: >>> >>>> >
2009 Aug 19
1
Lattice: Drawing a single contour line with a negative value fails
Hi everybody, I want to add a single contourline to a levelplot. While everything works fine if the value at which the line should be drawn is positive, there is an error if the value is negative: library(lattice) my.panel <- function(..., at, contour=FALSE, labels=NULL) { panel.levelplot(..., at=at, contour=contour, labels=labels) panel.contourplot(..., contour=TRUE,
2012 Jul 02
2
Heat Maps
Hello Everyone I am new to R I have drawn indifference curves using the program below (Contour Plot) u <- function(x, y) x^0.5 + y^0.5 x <- seq(0, 1000, by=1) y <- seq(0, 1000, by=1) a <- c(10, 20, 30) contour(x, y, outer(x, y, u),levels=a,col="blue") Now can any body please tell me how to draw Heat maps and that too on the same indifference curve plot (contour)
2009 Nov 19
2
plot filled.contour over continent map
Dear all, As a newbie in R I would like to do the following (simple?) thing: to plot a filled.contour plot over a map showing country boundaries (e.g. for Europe) What i do is: map('worldHires',xlim=c(-10,40),ylim=c(35,70),boundary = TRUE,border=0.1) map.axes() filled.contour(mslp, zlim=c(1000,1020),color.palette = colorRampPalette(c("blue", "white",
2013 Nov 16
1
contour plot axis correspondence
I am struggling with a contour plot. I want to place a cross over the minimum. alas, I don't seem to be able to map axes appropriately. here is what I mean: N <- 1000 rm <- rnorm(N, mean=0.0, sd=0.4) rx <- rnorm(N, mean=0.0, sd=0.4) rt <- rnorm(N, mean=0.0, sd=0.4) exploss <- function(hdgM,hdgX) { ## this could be any function that is not vectorized losscosts <-
2000 Jan 17
1
lwd patches for "contour"
I found it useful to have contour be able to do line widths ... hope that the guts haven't changed an enormous amount in the current development version ... the patches are relatively trivial, mostly going by analogy with lty and col (although in my ignorance it took me a while to figure out what UNPROTECT(2) was and why it should be changed to UNPROTECT(3) ... hope this is useful. Ben
2011 Jan 19
2
spacing of color key in filled.contour
Hi all I'm plotting colored contour maps using filled.contour. My levels are very unevenly spaced, with, say, high resolution in the small numbers but ranges that can be an order of magnitude or two larger in absolute value compared to where the action takes place. Aside from transforming the data, is there a way to control the color spacing in the key to the right of the map? Right now I
2019 Mar 15
1
Could we make filled.contour() more suitable for PDF viewers?
Note that I sent this to r-devel, yesterday. However, it didn't appear on the mailing list. So, I'm resending it. Today, I plotted the following: > filled.contour (,,z, color.palette=terrain.colors) It looked OK, in R. However, when I created a PDF document, the plot (and other similar plots) had grid (and other) lines in it, that shouldn't be there. Note that this problem is more
2013 Jan 28
1
Adding 95% contours around scatterplot points with ggplot2
Hi all, I have been looking for means of add a contour around some points in a scatterplot as a means of representing the center of density for of the data. I'm imagining something like a 95% confidence estimate drawn around the data. So far I have found some code for drawing polygons around the data. These look nice, but in some cases the polygons are strongly influenced by outlying points.
2012 Mar 03
2
contour for plotting confidence interval on scatter plot of bivariate normal distribution
Dear all, I created a bivariate normal distribution: set.seed(138813) n<-100 x<-rnorm(n); y<-rnorm(n) and plotted a scatterplot of it: plot(x,y) Now I'd like to add the 2D-standard deviation. I found a thread regarding plotting arbitrary confidence boundaries from Pascal H?nggi http://www.mail-archive.com/r-help at r-project.org/msg24013.html which cites the even older thread
2010 Oct 11
2
filled.contour: colour key decoupled from main plot?
Dear R colleagues, I am trying to plot some geophysical data as a filled contour on a continent map and so far the guidance from the R-help archives has been invaluable. The only bit that still eludes me is the colour key (legend) coming with filled.contour: I prefer to generate my own colour palette, mainly based on the quantiles of tenths of the data in order to capture the whole range (of
2003 Jun 13
1
Lattice levelplots and (partial) failure on some devices ----Long
Dear Community, (win XP home, sp1; R1.7 -- patched version, binary download, version of lattice obtained with patched version; the following applies to 1.6.2 as well.) The following message was originally composed to seek help. However I have 'hacked' a solution to the following behavior, but none the less someone might find this interesting. To reproduce my 'problem' you
2006 Feb 12
1
contour lines for levelplot
Hi, I would like to add contour lines to a (trellis/lattice-) levelplot. Sure, there is the "contour=TRUE" argument, but this uses "cuts=..." (which is usually chosen very high for my plots. I guess cuts=99 is the best you can do (?)) for plotting the contour lines. Furthermore, I do not like the numbering of the contour lines this way. Therefore, I tried to add a
2002 Dec 14
1
adding contour lines to a filled.contour
Hi all, Does anybody know how to add contour lines to a filled contour plot? I want to draw a single contour around values that are above a certain level (e.g., significant). The problem I'm having is that since the filled.contour command actually draws two plots (data and the key), adding contour lines paints them over both plots. Any suggestions? Thanks, Andy #~~~~~~~~~~~~~~~~~~~
2009 Nov 22
1
contour(): lines & labels in different colours?
Greetings, All! I want to draw contour lines in red, using contour(), but also have the contour labels (for the level-values) in black so that they will stand out against a coloured background already generated using filled.contour() (the background shades from green at low levels of "risk" to red at high levels). In any case, contour labels in red are already somewhat inconspicuous
2003 Jul 27
1
contourplot:how to get it to label all contours like 'contour'
Hi, one of the nice things about contour is that it labels all contour lines. contourplot only labels each particular elevation a single time. i.e., if there are two contour lines corresponding to z = 45, it will only label one of them. is there a way to get contourplot to automatically label all the contour lines, even those that are repeated? i ask because i want to plot contour plots *w/
2004 Feb 18
3
persp and lines()
R-sters: I'm interested in keeping data plotted in persp to preserve the wireframe look, I'd just like to change one of the lines drawn (in either the x or y direction) into a different color so that it stands out. Or is there some way to add a line (say, via lines(), or abline()) to a persp() plot at the designated x or y that would follow the z surface contour? I could add a line
2010 Nov 23
6
Filled contour plot showing labeled isolines?
Is it possible to create a contour plot with the isolines labeled. I know you can do this with Matlab. Argh! I tried creating a filled contour plot, then using par(new=T), followed by overlaying the contour plot on top. However, the placement of the filled contour plot and the contour plot do not align correctly. Any suggestions would be appreciated. Thanks, Jon -- View this message in