Displaying 20 results from an estimated 134 matches for "ylabels".
Did you mean:
labels
2008 Oct 27
1
Problem with script
...list[random_sq] - 1, y_list[random_sq]] == :
missing value where TRUE/FALSE needed
the script is this:
# ______________
# ----- Define a function for
plotting a matrix ----- #
myImagePlot <- function(x, ...){
min <- min(x)
max <- max(x)
yLabels <- rownames(x)
xLabels <- colnames(x)
title <-c()
# check for additional function
arguments
if( length(list(...)) ){
Lst <- list(...)
if( !is.null(Lst$zlim) ){
min <- Lst$zlim[1]
max <- Lst$zlim[2]
}
if( !i...
2010 Jun 07
1
Patch for legend.position={left,top,bottom} in ggplot2
Hi Hadley and everyone,
here's a patch for ggplot2 that fixes the behavior of
opts(legend.position={left,top,bottom}). If you try the following code
in an unmodified ggplot2
options(warn = -1)
suppressPackageStartupMessages(library("ggplot2"))
data <- data.frame(
x = c(1, 2, 3, 4, 5, 6),
y = c(2, 3, 4, 3, 4, 5),
colour = c(TRUE, TRUE, TRUE, FALSE, FALSE, FALSE))
2011 Jun 09
2
scatterplot3d - help assign colors based on multiple conditions
...o all the values whose first column and second column contain "Anterior_nares" and assign black to any other combination.
Thanks!
Karthik
library(scatterplot3d)
chd1=read.table(file="test.out", header=F, sep="\t")
col=as.vector(chd1[,1])
xlabels=as.vector(chd1[,1])
ylabels=as.vector(chd1[,2])
mycols<-c("red","blue","green","chocolate","orange", "brown")
col[grep("_Stool", xlabels) ]<-mycols[1]
#col[grep("_Stool", xlabels) && grep("_Stool", ylabels) ]<-mycols[1]...
2005 Oct 03
1
Error in xy.coords(x, y, xlabel, ylabel, log) : x and y lengths differ
I am currently trying to use R to construct a regression model to
explain output based on temperature. I have combined my output and temp
data into a notepad file. there is no problem with loading the data into
R.
> data.df
output temp
1 850 17
2 849 17
3 905 17
4 925 17
5 1043 19
6 1104 20
7 1097 18
8 979 19
9 926 18
10 1133 18
~~
~~
240 1124
2008 Apr 22
1
plot(x) in 2.7.0 (with y=NULL) proposed code correction
Hi all:
following the previous discussion, it looks like plot(x) with y=NULL
still does not work correctly. If one tries for example plot(1:5) it
works, but already for plot(runif(100)) it does not. I posted the
proposed correction for plot.POSIXct and plot.POSIXlt before. Please
voice your opinions whether the following fix for plot.default could be
reasonable? I include the full function and
2002 Jun 13
2
text and expressions in labels
All -
I'm a novice at R and I'm having difficulty combining text and an
expression in the same label.
I just trying to get Yield (kg ha-1) and have the -1 as superscript. What
I came up with doesn't work. I'm stuck at trying to concatenate it with
any other regular text.
yield1 = "Yield (kg ha"
yield2 = expression(^-1)
yield3 = ")"
ylabel =
2007 Aug 08
1
Help using gPath
Hi everyone,I'm trying to figure out how to use gPath and the documentation
is not very helpful :(
I have the following plot object:
plot-surrounds::
background
plot.gTree.378::
background
guide.gTree.355:: (background.rect.345, minor-horizontal.segments.347,
minor-vertical.segments.349, major-horizontal.segments.351,
major-vertical.segments.353)
guide.gTree.356::
2010 Mar 08
1
(box-) plot annotation: italic within paste?
Dear R users,
in the example below the name of the genus will be displayed in the main
titles using the variable predictor[i] and paste.
I would like to have the genus name in italic. However all my attempts
using expression and substitute failed.
Does anybody know a solution?
Thanks a lot in advance. bernd
Acrobeles <-c(65.1,0.0,0.0,0.0,0.0,0.0)
Acrobeloides
2004 May 06
1
plot(hist.default(1:10,plot=F)) error.
Hi!
How to find out which plot function is used when i call
plot(hist.default(1:10,plot=F)) and all works fine ?
The reason why I would like to know it is that after loading some self written R functions
> plot(hist.default(1:10,plot=F))
Error in xy.coords(x, y, xlabel, ylabel, log) :
x and y lengths differ
> traceback()
5: stop("x and y lengths differ")
4: xy.coords(x, y,
2011 Jul 25
1
Trouble with line of best fit
I don't usually do much with graphs in R, and this is my first time adding a
line of best fit. Hopefully this is an easy problem to solve.
I'm looking at a variable called soloKills along the range 5:28. Here are
all my commands, in script form:
range=5:28
graph=soloKills
title="Solo kill/death data"
xlabel="Number of deaths/1 game"
ylabel="Mean number of kills/1
2008 Mar 09
2
[patch] add=TRUE in plot.default()
Hi all,
As long as I've used R, add=TRUE hasn't worked in contexts like this:
f <- function(x) x^2
X <- seq(0, 1, by=1/4)
plot(f, col="blue")
plot(X, f(X), col="red", type="l", add=TRUE)
I attached a fix for version 2.6.2.
Cheers,
Andrew
-------------- next part --------------
diff --git a/src/library/graphics/R/plot.R
2009 Aug 07
3
How do I plot a line followed by two forecast points?
Good day all,
I'm trying to plot a continuous line plot, which is followed by two
forecast points eg. one forecast point is 12 months out, and another
24 months out from the last date of the line plot.
In my attempts so far, the second plot (the forecast points) is scaled
against a new axis scale, thus the two plots are not directly
comparable (I need the forecast points to be scaled
2013 Feb 14
2
Plot a Matrix as an Image with ggplot
Dear all,
I am trying to plot a matrix I have? as an image
str(matrixToPlot)
?num [1:21, 1:66] 0 0 0 0 0 0 0 0 0 0 .
?that contains only 0s and 1s,
where the xlabel will be Labeled as
str(xLabel)
?num [1:66] 1e+09 1e+09 1e+09 1e+09 1e+09 ...
and the yLabels will be labeled as
str(yLabel)
?num [1:21] -88 -87 -86 -85 -84 -83 -82 -81 -80 -79 ...
I have found on the internet that I can do something like that with ggplot2.
For example
you can run the following
library(reshape2)library(ggplot2)m =matrix(rnorm(20),5)ggplot(melt(m),aes(Var1,Var2,fill=val...
2008 Sep 04
1
Building a time series.
I have a need to build a time series and there are a couple of aspects about the time series object that are confusing me. First it seems that ts.union is not doing what I would expect. For example:
x0 <- rep(0,10)
x1 <- rep(1,10)
xt0 <- ts(x0, frequency=10)
xt1 <- ts(x1, frequency=10)
st2 <- ts.union(xt0, xt1)
> xt2
Time Series:
Start = c(1, 1)
End = c(1, 10)
Frequency = 10
2008 Jan 26
2
scatterplot3d with categorical data
Dear users,
I'm trying to produce a 3d bar plot but the x and y dimensions have categorical
data -- so I only want 3 points on each axis. So I try:
require(scatterplot3d)
mymat<-data.frame(
x=c(1,1,1,2,2,2,3,3,3),
y=c(1,2,3,1,2,3,1,2,3),
z=c(1,2,3,4,5,6,7,8,9))
scatterplot3d(mymat,
type="h", lwd=5, pch=" ",
xlab="xlabel",
2017 Sep 19
3
Graph f(x) = 1/x
Dear All: good morning
I am trying to graph the function y=f(x)=1/x over the interval (-5,5). But
I am getting an error message. Please see below.
I am getting the error message: *Error in xy.coords(x, y, xlabel, ylabel,
log) : *
* 'x' and 'y' lengths differ*
x
x <- seq(-5, 5, 0.01)
y < 1/x
plot(x,y, type='l', xlim=c(-5, 5), ylim=c(-5, 5), xlab = "x",
2004 Jul 13
2
help with as.function
HI, sorry but i don't understand how to make a function with as.function()
formula<-"2+3*x"
formu<-as.symbol(formula)
> formu
2+3*x
formul<-as.function(alist(x=,formu))
curve(formul,1,5,col="blue")
Error in xy.coords(x, y, xlabel, ylabel, log) :
x and y lengths differ
> typeof(formul)
[1] "closure"
and not plot the curve function, Why?
2010 Jan 09
2
Plotting numeric values against non numeric items
Hi i want do a line graph.
My y axis contains numeric values. My x axis contains non numeric
statements.
This is what i want the graph to look like.
When i try to plot this graph on R it comes up with the following error
message:
"Error in plot.window(...) : need finite 'xlim' values
In addition: Warning messages:
1: In xy.coords(x, y, xlabel, ylabel, log) : NAs introduced by
2007 Nov 26
2
Filling in a Zero Matrix
Hi
I am very new to R and statistical programming in general. I am trying to reorder data from a .csv file. I have managed to import the data and create a zero matrix. I am now trying to fill the matrix. There seems to be some problem with this section of my code. I have highlighted the dodgy code in red. Please help if possible.
######################################################
###########
2009 Jun 11
2
Tables without names
A table without names displays like a vector:
> unname(table(2:3))
[1] 1 1 1
and preserves the table class (as with unname in general):
> dput(unname(table(2:3)))
structure(c(1L, 1L), .Dim = 2L, class = "table")
Does that make sense? R is not consistent in its treatment of such unname'd
tables:
In plot, they are considered erroneous input:
>