similar to: help simplifying complex graphic arguments to a function

Displaying 20 results from an estimated 10000 matches similar to: "help simplifying complex graphic arguments to a function"

2010 Dec 07
2
tableGrob and properties of a cell
Hello there, could you please help to modify gpar() properties of a cell inside tableGrob() output. In the following example I want to have different color for one out of 4 cells require(gridExtra) z<-matrix(1:4,2,2) grid.draw(tableGrob(z)) The only way I found for now how to do it is to do something like this downViewport(current.vpTree()$children[[1]]$children[[6]]$name)
2012 Nov 30
3
(no subject)
Hello R usuer, The code given below superimposes a pie diagram on another plot containing some points. However, I would like to center the pie diagram on the xy location on the plot, but not on the center. is there any way to re-center pic diagram. Any suggestion or better alternative are highly appreciated. Thank you in advance for your help. Regards, Bibke library(visualFields) library(car)
2009 Sep 19
1
matrix operations on grobs and grid units
Dear list, As a minimal test of a more complex grid layout, I'm trying to find a clean and efficient way to arrange text grobs in a rectangular layout. The labels may be expressions, or text with a fontsize different of the default, which means that the cell sizes should probably be calculated using grobWidth() and grobHeight() as opposed to simpler stringWidth() and stringHeight().
2011 Jun 02
1
Plotting Data Table
Hi all, So my question is pretty simple, but unfortunately I have not been able to find a good answer after extensive google searches. I am trying to plot an "attractive" data table in R, such as: http://t2.gstatic.com/images?q=tbn:ANd9GcRjfTbTEUWlnb73wtUkY1mbQblWA-2EKEgvTLXGzkqUSpH4mWrk Such data tables are easily done in Excel, but I am trying to automate the entire process in R.
2011 Jan 16
1
grid.table with head of two rows
Hi all, I try to print a table with the grid.draw(tableGrob(...)) function applied to an ftable object. The output only give me a table without colnames either rownames, but with edit.grid() I can add only one of them. And this is the problem, I have a table with a two rows head, like this: 45 o mas Entre 25
2012 Apr 25
1
FW: Combined grouped and stacked bargraph
Dear R list, It appears that my request from yesterday got a bit garbled. I have tried to rephrase and retype it - please let me know if you can help me - I am having some trouble drawing a bar-graph with two groups, both of which are stacked. I would like to plot the conservation status according to two classifications (i.e. my groups - IUCN status and national status), and for each of those
2012 Apr 24
2
Combined grouped and stacked bargraph
Dear R list, I am having some trouble drawing a bar-graph with two groups, both of which are stacked. A sample of my data (IUCN and national conservation status for marine and terrestrial species) look like this: Status IUCN Terrestrial IUCN Marine National CS Terrestrial National CS Marine NE 168 69 16 69 LC 41 6 148 6 NT 5 4 7 4 VU 4 2 7 2 EN 4 2 4 2 CR 1
2011 Nov 24
1
pairs(), expression in label and color in text.panel
Hello, I'd like to add custom labels to my pair() plot. These labels include math expression but they aren't correctly displayed... Further, I want that the boxes for the text.panel (diagonal) have an other background color (grey80). Is that generally possible? If yes how do I have to set it? What I've so far is: panel.cor <- function(x, y, digits=2, prefix="",
2012 Mar 12
3
A question on histogram - area much less than 1
Hello, I have problem running the histogram function "hist". The area under the histogram is much lower than 1. Could anyone tell me what the problem is? Thanks, (The total number of observation is 992 (close to 1000), so the probability that 0<Y1<35 is approximately 0.277) miao rm(list=ls()) par(mfrow=c(1, 1)) Y <- cbind(matrix(35*0.5,1,277), matrix(35*1.5, 1, 146),
2009 Jan 24
2
ggplot2 - how to change location / position of wind rose axis labels?
Dear R users, First just want to say thank you to all for developing such a wonderful software and packages. I need to produce a wind rose plot. Tried with packages circular and plotrix and couldn't quite get what I want. Moved to package ggplot2 and it's going great. However stuck in how to move axis labels. I am using the wind rose from the help to learn how to do what I need (code
2009 Mar 27
3
color vectors other than gray()
I'm trying to create a graph where different cells of a grid (a shapefile) will be painted with a color share scale, where the most easy way is to use gray(). Can I somehow get a vector (gradient) of colors, a vector of colors with other methods but gray()? I'm doing this until now quad_N_sp <-
2010 Apr 04
4
ggplot2 geom_rect(): What am I missing here
Hi R fans, As a newbie following the five-hour rule (after hitting my head against the wall for five hours, post to this list), I am appealing for some help understanding geom_rect() in ggplot2. What I want to do is very simple. I want to generate a plot of rectangles. Each one represents a business cycle. The x-values will be pairs representing the start and end of each cycle. The y-values
2013 Jun 18
1
eigen(symmetric=TRUE) for complex matrices
R-3.0.1 rev 62743, binary downloaded from CRAN just now; macosx 10.8.3 Hello, eigen(symmetric=TRUE) behaves strangely when given complex matrices. The following two lines define 'A', a 100x100 (real) symmetric matrix which theoretical considerations [Bochner's theorem] show to be positive definite: jj <- matrix(0,100,100) A <- exp(-0.1*(row(jj)-col(jj))^2) A's being
2020 May 19
2
Graphic parameters with length zero in grid cause R to crash
Hi, I found in grid package, if the graphic parameters have zero length, R crashes. In the following code, I only tested `grid.rect()` and the `fill` parameter, but I think it should be similar as other grid graphic functions. In `gpar()` function, the graphic parameters are not allowed to have zero length, but we can make them with zero length by first generating a `gpar` object and then
2011 Apr 27
3
MASS fitdistr with plyr or data.table?
I am trying to extract the shape and scale parameters of a wind speed distribution for different sites. I can do this in a clunky way, but I was hoping to find a way using data.table or plyr. However, when I try I am met with the following: set.seed(144) weib.dist<-rweibull(10000,shape=3,scale=8) weib.test<-data.table(cbind(1:10,weib.dist))
2009 Jun 23
2
curvedarrow (some graphics problem)
Hi there, I just wonder how to draw this kind of picture... http://www.nabble.com/file/p24158796/b.jpg http://www.nabble.com/file/p24158796/a.jpg and this is what i have done %%%%% library(shape) library(diagram) curve(sin(x),bty="n",-8,8,yaxt="n",ylab="",xaxt="n",type="n",xlab="") axis(1,labels=F,at=seq(-8,8,1))
2010 Nov 05
3
table with values as dots in increasing sizes
I was just thinking of a way to present data and if it is possible in R. I have a data frame that looks as follows (this is just mockup data). df location,"species1","species2","species3","species4","species5" "loc1",0.44,0.28,0.37,-0.24,0.41 "loc2",0.54,0.62,0.34,0.52,0.71 "loc3",-0.33,0.75,-0.34,0.48,0.61 location
2002 Mar 21
2
Formatting the output of pairs()
Would anyone be able to give me some ideas on how to go about changing the output of pairs()? What I want to do is : * plot each value as a point (instead of those hollow circles) * remove the gap between each scatter plot * make the frame around each scatter plot pale grey Thanks for you time, Hadley -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- r-help
2012 Oct 05
1
svyhist
Hello, I was trying to draw histograms of age at death and got the following 2 error messages: 1) Error in tapply(1:NROW(x), list(factor(strata)), function(index) { : arguments must have same length 2) Error in findInterval(mm[, i], gx) : 'vec' contains NAs In addition: Warning messages: 1: In min(x) : no non-missing arguments to min; returning Inf 2: In max(x) :
2011 Nov 18
1
How to fill irregular polygons with patterns?
Hi, I'm looking the best way to fill irregular polygons with patterns, Something like the function grid.pattern do, but my case is with irregular polygons. Whit this script I can get it, but I'm looking for an "elegant" solution.. library(grid) grid.polygon(x=c(0.2, 0.8, 0.6, 0.6, 0.8, 0.2), y=c(0.2, 0.2, 0.3, 0.5, 0.7,0.7), gp=gpar(fill="grey",