Displaying 20 results from an estimated 200 matches similar to: "Plotrix Trick"
2010 Mar 09
3
Fine Tuning Plotrix
Dear All,
Please see the code snippet at the end of the email.
I am using the color2D.matplot in Plotrix to plot a matrix.
It works great, but there are a few things I cannot figure out
(1) the value of cex.axis in the code snippet does not seem to affect
the final pdf at all (at least on my system, Ubuntu 9.10, plotrix and
Cairo installed from cran). How do I specify the size of the axis ticks
2011 Mar 27
3
comparing heatmaps
Dear all,
I've been trying to find how to compare tow different heatmaps but I'm having trouble getting the colors bar to be the same. I'm doing something like the following:
library(gplots)
dat<-cor(matrix(rnorm(100, m=10), nrow=10))
mat<-cor(matrix(rnorm(100), nrow=10))
dev.new()
heatmap.2(mat, Rowv=NA, Colv=NA, col=redgreen(75), symm=TRUE, trace="none",
2005 Jul 22
1
sequence()
Hi
Function sequence() repeatedly concatenates
its output, and this is slow.
It is possible to improve on the performance of sequence by
defining
myseq <- function(x){unlist(sapply(x,function(i){1:i}))}
The following session compares the performance of
myseq(), and sequence(), at least on my G5:
> identical(sequence(1:50),myseq(1:50))
[1] TRUE
> system.time(ignore <-
2005 Jul 22
1
sequence()
Hi
Function sequence() repeatedly concatenates
its output, and this is slow.
It is possible to improve on the performance of sequence by
defining
myseq <- function(x){unlist(sapply(x,function(i){1:i}))}
The following session compares the performance of
myseq(), and sequence(), at least on my G5:
> identical(sequence(1:50),myseq(1:50))
[1] TRUE
> system.time(ignore <-
2011 Dec 12
2
Color2D.matplot uniform color range
Hi all.
I am having a problem using color2D.matplot
I am trying to visualize several different matrices under two color ranges.
One color range corresponds to values less than 1 and the second color range
for values greater than 1. However, the minimum value of each matrix differs
and is automatically set to have the smallest value in the color range.
Similarly, the maximum value of each matrix
2006 Nov 15
3
how to get empty sequence for certain bounds
Hi,
I have encountered this problem quite a few times and thought I would
ask.
Let's say that I have two endpoints, a and b, which are integers. If
a <= b, I would like to get a:b, but if a > b, then numeric(0), for
example:
myseq(3,5) => 3:5
myseq(3,3) => 3
myseq(3,2) => numeric(0)
The operator : just gives decreasing sequences in the latter case, and
I could not coax seq
2005 Nov 17
1
Predicting and Plotting "hypothetical" values of factors
Last Friday, I noticed that it is difficult to work with regression
models in which there are factors. It is easier to do the old fashioned
thing of coding up "dummy" variables with 0-1 values. The predict
function's newdata argument is not suited to insertion of hypothetical
values for the factor, whereas it has no trouble with numeric variables.
For example, if one uses a
2011 Jul 21
1
How to set Color scale for color2D.matplot()
Hello, everyone.
I am trying to show the correlation matrix using
color2D.matplot(). And I want to map (0,1) to (dark red to dark green).
But by default color2D.matplot() will map(min element of given matrix,
max element of given matrix) to (dark red to dark green).
Can anyone help me with this issue?
Thanks a lot!
Youcheng Lin
____________
[[alternative HTML version deleted]]
2010 Mar 06
1
color2D.matplot not giving colors
I am using color2D.matplot to plot a matrix about 400 by 200.
The values in the matrix are 0:5 and NA. The resulting plot is not color, but shaded b/w. I tried to figure out how to add colors, I would like something like c(blue, green, red, cyan, green)
#example
motifx <- matrix(NA, nrow=100,ncol=20)
motifx[,1:5] <- 1
motifx[,6:10] <- 2
motifx[,11:15] <- 3
motifx[,15:19] <- 4
2010 Apr 23
2
3D Plot
Hi guys of the R-Help-Team!<br /><br />First of all - you do a great job!<br
/>I've found a lot of your mails in the internet. So I thought it would be a
good idea to ask you a question about R.<br /><br />R is new to me, so sorry,
if the question is too simple :)<br /><br />I have a matrix.<br />I can make a
2D Heatmap of this matrix.<br
2011 Feb 07
1
color2d.maplot error
Dear all
I am using color2D.maplot to map some matrixes to plot. everything works fine. It seems that when my matrix contains only the same value color2D.maplot returns the following error:
color2D.matplot(estimatedsr,redrange=c(0,1),greenrange=c(0,.5),bluerange=c(0,.5),xlab="x",ylab="y",main=sprintf('Estimated'),show.legend=TRUE,show.values=TRUE)
Error in rgb(reds,
2008 Sep 16
2
question in value-based color in image()
Hello,
I have a matrix A with value varying from -1 to 1. I hope to use scaled
color based on its value to produce an image of this matrix.
Suppose I hope to label those data in [-1,-0.5] with blue, label those
[-0.5,0.8] with light blue (tone is proportional to its value, e.g.
rgb(1-tone, 1-tone, 1) where tone=abs(A)/0.5), and label those [0.8,1] with
white.
How can I use image() and rgb() to
2013 Nov 01
1
Package(s) for making waffle plot-like figures?
Dear all,
I am trying to make a series of waffle plot-like figures for my data to
visualize the ratios of amino acid residues at each position. For each one
of 37 positions, there may be one to four different amino acid residues. So
the data consist of the positions, what residues are there, and the ratios
of residues. The ratios of residues at a position add up to 100, or close
to 100 (more on
2010 Nov 04
3
Plotting a grid of directly specified colours
Dear R-help,
Could any of you direct me to a function for plotting a grid of colours,
directly specified by a matrix of hex colour codes? In other words I'm
looking for a heatmap() or image()-like function to which I can specify the
colour of each grid location directly, rather than providing a numerical
matrix and a 1D-colour scale (heatmap, image, levelplots,NeatMap...). I'm
surprised
2009 May 13
4
plotting a grid with color on a map
Hi all,
I have posted similar questions regarding this topic, but I just can't seem
to get over the hump and find a straightforward way to do this. I have
attached my file as a reference.
Basically, the attached file is a 5 degree by 5 degree grid of the the world
(2592 cells), most of them are NA's. I just want to be able to plot this
grid over a world map and color code the cells. For
2012 Oct 04
3
Problem with colors in contour plot
Dear R users,
I have a 51 by 51 matrix of p-values (named as pvalue_MA). I want to
present graphically this matrix in a plot (filled contour plot) where both
axes represent probabilities. I have also added a grid in this plot. I want
to highlight in white the cells of the grid that represent p-values smaller
than the (common) significance threshold, 0.05. The code from this plot is
colored in
2017 Oct 12
1
Recurrence plots in R using different colours
Hello,
I am an absolutely beginner with regards to R, so forgive me for my
potentially very stupid questions.
I have been attempting to create recurrence plots using R. The data I am
using is based on a mutually exclusive and exhaustive coding scheme with
over 40 individual codes which can be assigned to 6 higher order categories.
When I carry out the usual rqa command, my plot is pretty much
2008 Aug 06
2
Attempting to make a custom color spectrum to use in heatmap.2
Hello there! I'd just like to say in advance, "Thank you," for any help
and/or advice.
My problem is as follows:
I have a dataset that is made up of percentages. I've assigned my
"error" percentages a value of '-100', my "non-existent" percentages a
value of '0', and all my other percentages are normal values that range
from the high
2003 Sep 08
2
Re: clustering polypeptide sequences
Hi Peter,
You didn't give a very specific example, but it seems to me that what
you wish to do is not really complicated. I suppose you have created a
table of sequences vs. say hyprophobicity, charge, etc..., something like...
seq hydroph arom
b0001 0.104762 0.000000
b0002 0.035122 0.065854
b0003 0.024193 0.070968
b0004 -0.096729 0.084112
b0005 -0.973469 0.091837
b0006
2010 Feb 07
3
specifying colors in a heatmap/image -like plot
Hi,
I have searched for a solution but I failed to find an answer. I am hoping
you may be able to help me.
I have a data set where I have observations for a number of units (n =~40)
over a period of time (t =~100) and I have a variable (Z) that codes a
categorical variable for each observation. I want to produce a 2D plot where
time is on the x-axis and units are on the y-axis. Then each block