similar to: Plotting a raster image

Displaying 20 results from an estimated 300 matches similar to: "Plotting a raster image"

2011 Jun 09
2
scatterplot3d - help assign colors based on multiple conditions
Hi I am relatively new to R and am trying to figure out to plot 3d scatter plot using defined colors based on x-axis and y-axis values. Right now in the code below, I assign colors based on certain values in the names of the x-axis. Now if I want to extend the condition to assign a color based on the names of both x-axis and y-axis values, what should I be doing? Any help or ideas would be
2013 Jun 10
1
Selecting divergent colors
Hi, I was trying to make a density plot with 13 samples. To distinguish each sample, it would be good if each color is as different as possible from the other colors. I could use the built in function, but that does not do more than 8 colors and then goes back to recycling the cols. If I use a palette, then it is really difficult to distinguish between the colors. So, is there a way that I can
2011 Mar 15
1
How to read only specified columns from a data file
R-help, I'm trying to read a data file with plenty of columns. I just need the first 5 but it doe not work by doing something like: > mycols <- rep(NULL, 430) ; mycols[c(1:4)] <- NA > read.table(myfile, skip=2, colClasses=mycols) Any suggestions? Thanks in advance
2011 Oct 19
2
Simple color strip
Hi, I was trying to get an image/pdf of a sequence of colors in the order given. For example: myCols <- c('#0000BF','#0000BF','#0000FF','#0000FF','#0000BF','#0000FF') I'd like to make a strip of colors as they appear in the order above and save it as a pdf file. Is there a function in the base package (or some other package) to do this?
2004 Nov 20
2
subset on data frame
I have a data frame. And I'd like to subset according to rownames. subset(mydataframe, rownames(mydataframe) == myrow, select = mycols) it turned out that "myrow" cannot be a vector. But I have multiple rows to pick. Is there a way to get around this problem?? Thank you for your help!! Lei Jiang Department of Chemsitry University of Washington Box 351700 Seattle, WA 98195
2004 Dec 03
1
How to wrap or split labels on plot
Dear R gurus, I want to wrap labels that are too long for a plot. I have looked at strsplit(), substr(), nchar(), and strwrap(). I think it's some combination but I'm having difficulty trying to figure out the right combo. I think I need to create some new matrix containing the labels already split, though I'm not sure if maybe there is a quick and dirty way to address this
2012 Mar 26
2
trellis plot
Hi everyone, I am just trying to figure out how to do a xyplot where in addition to dots and lines I can change dots' colors according to an individual variable (e.g., marital disruption across time, a dummy 0/1). When I use "groups" specification (see below), I get two different lines for each individual based on groups, and what I want is to get one line connecting dots, and
2009 Mar 11
0
Working up examples of barplots with customized marginal items
Hello, everybody: I'm back to share a long piece of example code. Because I had trouble understanding the role of par() and margins when customizing barplots, I have struggled with this example. In case you are a student wanting to place legends or textual markers in the outer regions of a barplot, you might run these examples. There are a few little things I don't quite understand.
2009 Sep 11
3
Barplot+Table
I am trying to automate a report that my company does every couple of years for the state of Maine. In the past we have used SPSS to run the data and then used complicated Excel template to make the tables/graphics which we then imported into Word. Since there are 256 tables/graphics for this report, this work flow is a little painful. I would like to automate the process and I think I can do
2005 Mar 30
5
2d plotting and colours
Hi! I am new to R just 3 days in it and i apologize if my questions seem very trivial and consumed your valuable time. I am coding in perl and i stumbled upon R regarding plotting good statistical graphs. I tried the kmean clustering for a large matrix ,say > 150 * 150 . I tried the example code given in the tutorial to perform 2d plot # i ranges from 2 to 10 cl <- kmeans(x, i, 20)
2013 Jun 25
1
Correct scaling of axis in persp3d plot
Hi, I want to format my axis in my persp3d plot. With my data, which I attached I created a persp3d plot with the following code, which I summarized from different code snippets I found: library(rugarch)library(rgl)library(fGarch)fd <-as.data.frame(modelfit,which ='density')color <-rgb(85,141,85,maxColorValue=255)x <-seq(-0.2,0.2,length=100)y <-c(1:2318)f
2012 Apr 18
2
Displaying data in Trellis
This is a question relating to the Trellis function in R. I have a set of socioeconomic data that I would like to display with the xyplot() function for several states. I will have a total of 6 plots, with the y-variable as "Age Group", and the x-variable as "Median Income". Suitability of the plots aside (this cannot be changed), I need to plot the points of one of the states
2009 Mar 14
1
multiple hypothesis testing
Dear all, Myself Vijaykumar Muley working as senior research fellow. By training I am a computational biologist with not a strong knowledge of statistics. I have done some analysis which is explained as follows, I have 10340 (X) profiles of binary vectors with same length(N=845), I will call then "gene profiles" for example... v1 v2 v3 v4.....vN a 1 0 1 0 1 b 0
2012 Apr 09
3
Gradients in bar charts XXXX
Hello, I have a graphics-related question: I was wondering if anyone knows of a way to create a bar chart that is colored with a three-part gradient that changes at fixed y-values. Each bar needs to fade green-to-yellow at Y=.10 and from yellow-to-red at Y=.20. Is there an option in a package somewhere that offers an easy way to do this? Attached is a chart I macgyvered together in Excel using a
2010 Jul 15
2
replace negative numbers by smallest positive value in matrix
Hi Group, I have a matrix, and I would like to replace numbers less than 0 by the smallest minimum number. Below is an small matrix, and the loop I used. I would like to get suggestions on the "R way" to do this. Thanks, Juliet # example data set mymat <- structure(c(-0.503183609420937, 0.179063475173256, 0.130473004669938, -1.80825226960127, -0.794910626384209, 1.03857280868547,
2017 Jan 21
2
problema con grafico lattice ....
Hola, Por si lo quieres con colores rellenando cada punto: #---------------- library(data.table) library(lattice) dat <- read.table("pba.csv", header=TRUE, dec=",", as.is=TRUE) row.names(dat) <- NULL dat <- as.data.table(dat) dat$mycol <- ifelse(dat$sol =="ControlAE", "red", dat$sol) dat$mycol <- ifelse(dat$mycol
2012 Jul 29
1
Zoo panel function
I would really like some help with understanding the panel function, in zoo. Thank you. R 15.1 and zoo 1.7-7. library(zoo) x = seq(0,3*pi,length.out=100) y = sin(x) zobj = zoo(y, x) ########################################################### ## EXAMPLE 1 - GLOBAL ARGUMENT ## This panel function works ## But, it relies on mycol, which is a global variable
2004 Nov 16
2
Barplot difficulties
Hello. I am an R newbie struggling to learn and use R . I have read many portions of the R Reference Manual, as well as the FAQs. Given that I learn something new each time, I know I might be missing something obvious. But I appeal to your good nature to help me through this initial problem. I have attached a pdf file to demonstrate what I desire and have listed what my data looks like in
2010 Sep 23
4
Simple categorical scatter plot
New to R. I am trying to create a simple xy plot wherein the line segment color is determined by a categorical column The following does not change colors for me, probably because I don't quite have a handle on either functions or value mapping syntax. ---------- time <- c(1, 2, 3, 7,10,11,14,16,20) pressure <- c(0,10,20,20,50,18,60,65,90) status <- c(0, 0, 1, 1, 1, 0, 3, 3,
2007 Feb 04
3
Reference to dataframe and contents
This is probably easy for experienced users but I could not find a solution. I have several R scripts that process several columns of a dataframe (several dataframes and columns actually, but simplified for my question). References such as: myDF$myCol are all over. I like to automate this for other dataframes and columns by defining a reference only once in the beginning of the script. One