similar to: Filled triangles in lattice graphics?

Displaying 20 results from an estimated 3000 matches similar to: "Filled triangles in lattice graphics?"

2006 Jun 08
2
Plotting female and male signs
Dear R-users, Just like other users (as seen from previous posts on the list), I would like to use female and male signs in plots. I found B. Ripley's post about using Unicode characters. However, it doesn't works for me. > text(locator(1),"\u2640") produces the following error: Error: invalid \uxxxx sequence But I can specify other Unicode characters as long I
2006 May 23
2
Environment problems
Dear list readers, Can someone of you explain this behavior. Here's a toy example: Start by constructing a function tmp >fix(tmp) In the default editor enter this one-liner: hist(rnorm(10)) close the editor and run environment on the function. > environment(tmp) <environment: R_GlobalEnv> Open the editor and remove the last parenthesis, this will make the editor choke.
2002 Jul 29
2
Bug or feature in xyplot?
Hi, Can someone of you tell me why these two simple examples works as "expected", plot(c(1,1,2,2)~c(1,2,1,2),col=c(1,2,3,4),pch=c(1,2,3,4)) coplot(c(1,1,2,2)~c(1,2,1,2)|c("A","A","B","B"),col=c(1,2,3,4),pch=c(1,2,3,4 )) but when I try it with xyplot in the lattice package it fails.
2001 Oct 25
2
How to save boot objects?
Hi, I have problem with saving and later sourcing boot objects. A short familiar example... R : Copyright 2001, The R Development Core Team Version 1.3.1 (2001-08-31) ... > library(boot) > data(city) > ratio <- function(d, w) + sum(d$x * w)/sum(d$u * w) > boot.res<-boot(city, ratio, R=999, stype="w") > dump("boot.res","boot.res.R") > Save
2002 Nov 21
1
Distance between points and a polygon?
Dear R users, I know that this could easily be solved within a GIS-package, but sometimes it's more convenient to use R. So here's my question anyway... Does anyone of you know about any R-functions/code that calculates the distance between a number points and a polygon or polyline? I have looked thru the different libraries that deals with spatial statistics but haven't found
2003 Apr 18
1
Problem with eigen() and LAPACK
Hi all, when testing the new improvements in the new 1.7.0-version I stumbled over the following: >eigen(matrix(c(0,.3,2,.9),2,2)) Error in eigen(matrix(c(0,.3,2,.9),2,2)) : LAPACK routine DGEEV gave error code -13 >eigen(matrix(c(0,.3,2,.9),2,2),EISPACK=TRUE) $values [1] 1.3458236 -0.4458236 $vectors [,1] [,2] [1,] -1.1436890 -0.9760443 [2,] -0.7696018
2007 Mar 22
2
unexpected behavior of trellis calls inside a user-defined function
I am making a battery of levelplots and wireframes for several fitted models. I wrote a function that takes the fitted model object as the sole argument and produces these plots. Various strange behavior ensued, but I have identified one very concrete issue (illustrated below): when my figure-drawing function includes the addition of points/lines to trellis plots, some of the
2009 Aug 24
1
How to generate more triangles in sequences?
Hi everyone, I want to plot some pattern. For example, I have some coding as below, plot(0:11,type="n") polygon(c(6,8,10), c(7,3,5),bor=6) polygon(c(2,4,6), c(5,3,7),bor=6) polygon(c(6,10,8), c(7,9,11),bor=6) polygon(c(2,6,4), c(9,7,11),bor=6) This coding will give me four triangles, but how to generate more triangles in sequences so that not need to mention the coordinate for each
2009 Dec 20
1
How to put text outside an xyplot?
Dear R-users, I have a plot created with the code below. I tried to put some text to the right of the color key. I worked with grid.text and also viewport(), but couldn't achieve this. I know this should be simple, but I just couldn't figure out how to do it. How does this work? Cheers, Marius library(lattice) library(grid) myvec=1:10 data=data.frame(x=myvec,y=myvec)
2004 Aug 31
1
add single contour line to levelplot
Hello, I want to add a single contour line to a levelplot but can't figure out how to do it 'on-the-fly'. When I include the last line in the code below, I get the following error: Error in NextMethod("[") : Argument "subscripts" is missing, with no default Any tips on how to fix this are greatly appreciated! Ian Jonsen
2006 Feb 11
2
how do I "relate" tables in R?
Hi all, I'm new to the list...pretty new at learning to code in R... Is there a way to relate 2 different arrays in R? Hypothetical example: data1 ID z 1 100 2 250 3 75 4 12 5 89 data2 ID z 1 1 1 1 2 3 4 3 4 5 5 5 etc. Goal is to fill column z in data2 with appropriate z-values from data1 that correspond to a given ID. I'm looking for something akin to a
2009 Apr 30
1
Hmisc: xYplot and panel.lines
Using the Hmisc package, I tried to create an xYplot (single panel only) and was confused to find that I could not add anything else to the plot (abline, lines, etc.). Thankfully, [1] points out panel functions. This works as expected for panel.abline, but as soon as I'm using panel.lines (or llines or lpoints) from the "lattice" package (version 0.17-17 with R 2.8.1), it
2006 Feb 11
2
aggregate vs tapply; is there a middle ground?
Dear all, I'm wanting to do a series of comparisons among 4 categorical variables: a <- aggregate(y, list(var1, var2, var3, var4), sum) This gets me a very nice 2-dimensional data frame with one column per variable, BUT, as help for aggregate says, <<empty subsets are removed>>. I don't see in help(aggregate) how I can change this. In contrast, a <- tapply(y,
2010 Apr 12
1
lattice garphs: combining multiple scatterplots and adding legend
Dear List members, its me again, fighting with lattice graphics. I am trying to plot a world map, add some points on different locations with different colors and add a legend, but did not succeed yet with the legend. Here is my code: library(fields) # Data for demonstration data_x = c(0,50,60) data_y = c(0,0,0) cols???= c(1,2,3) data(world.dat) #print map all=xyplot(world.dat$y? ~
2011 Aug 22
1
lattice to ggplot2 conversion help
Hi, I am interested in ggplot2 and I found this lattice code very interesting (http://addictedtor.free.fr/graphiques/graphcode.php?graph=48). Code: library(lattice) lattice.options(default.theme = canonical.theme(color = FALSE)) tmp <- expand.grid(geology = c("Sand","Clay","Silt","Rock"), species = c("ArisDiff",
2007 Dec 25
1
both lines and plot characters in a lattice plot key
Hello, I have two short questions concerning a key (legend) in a lattice plot. I have points represented by two different plot characters (crosses and circles) and they are colored from light to dark gray. I would like to have 3 parts in my legend showing the two different plot characters in the first two lines and the last line should consist of a line segment for explaining the
2008 Feb 21
2
triangle.plot - change the axes orientation
Hello, I need to chenge axes orirentation in triangle plot. (function triangle.plot in ade4 package) I want to plot elasticities of some species in demographic triangle, where axes values commnly increace "clockwise". If some better imangination is needed, see http://www.open.ac.uk/science/biosci/personalpages/j.silvertown/pdfs/Silvertown%20et%20al.%201993.pdf I am sorry if I just
2006 Apr 03
2
Ternary or Triangular Plots (soil texture triangle plot)?
Hi, I am trying to create a triangular plot to show the 'composition' of a set of items with three variables (historically the percent sand, silt and clay in soil). So far I have tried the 'soil texture triangle plot' in the package plotrix and the 'ternary or triangular plots' in the package cwhtool (cwhmisc). Both have strengths and weaknesses, but neither has a
2007 Jun 18
4
triangle contour plots
Suppose I have three numbers p1, p2, p3 with 0 <= p1,p2,p3 <= 1 and p1+p2+p3=1, and a function f=f(p1,p2,p3) = f(p1,p2,1-p1-p2). How to draw a contour plot of f() on the p1+p2+p3=1 plane, that is, an equilateral triangle? Functions triplot(), triangle.plot(), and ternaryplot() give only scatterplots, AFAICS -- Robin Hankin Uncertainty Analyst National Oceanography Centre,
2011 Jun 04
1
library(SenoMineR)- Triangle Test Query
Dear R Group I was trying to use the triangle.test function in SensoMineR and strangely i encounter a error in the output of preference matrix from the analysis. To illustrate, pl see the following dataframe of a design with the response and preference collected as shown below: design<-structure(list(`Product X` = c(3, 1, 4, 2, 4, 2, 1, 3, 4, 2, 4, 2, 1, 3, 4, 2, 4, 2, 3, 1), `Product Y` =