Displaying 20 results from an estimated 134 matches for "ylabel".
Did you mean:
label
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( !...
2010 Jun 07
1
Patch for legend.position={left,top,bottom} in ggplot2
...- ggplot2-orig2 2010-06-07 13:14:35.000000000 +0200
+++ ggplot2 2010-06-07 15:22:33.000000000 +0200
@@ -7003,27 +7003,27 @@
)
} else if (position == "left") {
viewports <- vpList(
- vp("panels", 2, 3),
- vp("legend_box", 2, 1),
- vp("ylabel", 2, 2),
- vp("xlabel", 3, 3),
- vp("title", 1, 3)
+ vp("panels", 3, 4),
+ vp("legend_box", 3, 2),
+ vp("ylabel", 3, 3),
+ vp("xlabel", 4, 4),
+ vp("title", 2, 4)
)
} else if (posit...
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
...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 12
241 1344 12
242 1375 11
243 1359 12
but when I try to plot the data I keep getting this error:
> plot(temp,output)
Error in xy.coords(x, y, xlabel, ylabel, log) :
x and y lengths differ
any advice on how to over come this error would be greatly appreciated.
Cheers, Robbie.
[[alternative HTML version deleted]]
2008 Apr 22
1
plot(x) in 2.7.0 (with y=NULL) proposed code correction
...lwd) box(...)
localWindow <- function(..., col, bg, pch, cex, lty, lwd)
plot.window(...)
localTitle <- function(..., col, bg, pch, cex, lty, lwd) title(...)
if (!is.null(y)) {
## normal plot x against y
xlabel <- if (!missing(x)) deparse(substitute(x))
ylabel <- deparse(substitute(y))
xy <- xy.coords(x, y, xlabel, ylabel, log)
xlab <- if (is.null(xlab)) xy$xlab else xlab
ylab <- if (is.null(ylab)) xy$ylab else ylab
xlim <- if (is.null(xlim)) range(xy$x[is.finite(xy$x)]) else
xlim
ylim <- if (is.n...
2002 Jun 13
2
text and expressions in labels
...ssion 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 = paste(yield1, yield2, yield3)
boxplot(yield.kgha.st~env,data=lsmeans1,
boxwex=0.3,
main='Chinese Hybrids',
ylim=c(0,5300),
sub='',
ylab=ylabel,
xlab='')
any help appreciated,
Josh
-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-...
2007 Aug 08
1
Help using gPath
...01::
geom_boxplot.gTree.291:: (GRID.segments.285, GRID.segments.286,
geom_bar.rect.288, geom_bar.rect.290)
geom_boxplot.gTree.299:: (GRID.segments.293, GRID.segments.294,
geom_bar.rect.296, geom_bar.rect.298)
geom_jitter.points.303
geom_jitter.points.305
guide.rect.357
guide.rect.358
ylabel.text.382
xlabel.text.380
title
Could someone be so kind and create the proper call to grid.gedit() to
access a couple of different aspects of this graph?
I tried:
grid.gedit(gPath("ylabel.text.382","labels"), gp=gpar(fontsize=16)) # error
I'd like to change the margins o...
2010 Mar 08
1
(box-) plot annotation: italic within paste?
...Acrobeles <-c(65.1,0.0,0.0,0.0,0.0,0.0)
Acrobeloides <-c(0.0,9.8,76.7,51.1,93.9,43.9)
Alaimus <-c(0.0,4.9,0.0,0.0,0.0,6.3)
Aphelenchoides <-c(126.5,29.3,76.7,134.1,176.7,87.9)
x<-data.frame(Acrobeles,Acrobeloides,Alaimus,Aphelenchoides)
predictor <- colnames(x)
ylabel <-"Numerical abundance"
mainlabel1 <-"Boxplot for"
mainlabel2 <-"sp."
cexalabel <-1.8 # axis label
cexmlabel <-1.6 # main label
par(oma=c(6,6,3,3),mar = c(6, 4, 4, 2) + 0.1,mfrow=c(2,2))
for (i in 1:ncol(x)){
boxplot(x[,i],
main=paste(mainl...
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, xlabel, ylabel, log)
3: plot.default(hist.default(1:10, plot = F))
2: plot(hist.default(1:10, plot = F))
1: plot(hist.default(1:10, plot = F))
gives an error.
It seems that instead of th...
2011 Jul 25
1
Trouble with line of best fit
...t 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 game" #No problems with the scatterplot
plot(x=range, y=graph, main=title, xlab=xlabel, ylab=ylabel, ylim=c(0,20))
abline(lm(range~graph))
I checked several websites, the abline(lm(/x-variable/~/y-variable/)) format
*should* work. But here is what happens:...
2008 Mar 09
2
[patch] add=TRUE in plot.default()
...ylab = NULL,
ann = par("ann"), axes = TRUE, frame.plot = axes,
- panel.first = NULL, panel.last = NULL, asp = NA, ...)
+ panel.first = NULL, panel.last = NULL, asp = NA, add=FALSE, ...)
{
+ xlabel <- if (!missing(x)) deparse(substitute(x))
+ ylabel <- if (!missing(y)) deparse(substitute(y))
+ if (add) {
+ log <- paste(ifelse(unlist(par("xlog", "ylog")), c("x", "y"), ""),
+ collapse="")
+ xy <- xy.coords(x, y, xlabel, ylabel, log=log)
+ plot.xy(xy, type, ...)
+ retur...
2009 Aug 07
3
How do I plot a line followed by two forecast points?
..."NA" "NA" "NA" "NA" "NA" "NA" "20"
# Add the forecast plot to the original plot
> par(new=TRUE)
> plot(fcastDates,fcast,yaxt="n",xaxt="n",col="red")
Warning message:
In xy.coords(x, y, xlabel, ylabel, log) : NAs introduced by coercion
# The second forecast
> fcastDates2=seq.Date(from=as.Date(fcastDates[length(fcastDates)]),length=12,by="month");
> fcastDates2
[1] "1993-12-01" "1994-01-01" "1994-02-01" "1994-03-01" "1994-04-01"...
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=va...
2008 Sep 04
1
Building a time series.
...(1, 10)
Frequency = 10
xt0 xt1
1.0 0 1
1.1 0 1
1.2 0 1
1.3 0 1
1.4 0 1
1.5 0 1
1.6 0 1
1.7 0 1
1.8 0 1
1.9 0 1
> spectrum(xt2)
Error in plot.window(...) : need finite 'ylim' values
In addition: Warning messages:
1: In xy.coords(x, y, xlabel, ylabel, log = log) :
10 y values <= 0 omitted from logarithmic plot
2: In min(x) : no non-missing arguments to min; returning Inf
3: In max(x) : no non-missing arguments to max; returning -Inf
4: In xy.coords(x, y, xlabel, ylabel, log) :
5 y values <= 0 omitted from logarithmic plot
I would exp...
2008 Jan 26
2
scatterplot3d with categorical data
...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", ylab="ylabel", zlab="zlabel",
xlim=c(1,3), ylim=c(1,3),
lab=c(3,3),
x.ticklabs=c("Low","Medium","High"), y.ticklabs=c("Green","Blue","Black"),
main="My Bar Plot")
But I still get x ticks at 1, 1.5, 2, 2.5, 3 on bot...
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", ylab = "f(x)
= 1/x", lwd = 2, col ="red")
abline(h=0, lty=2, col = "blue")
abline(v=0, lt...
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? Thanks Ruben
2010 Jan 09
2
Plotting numeric values against non numeric items
...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 coercion
2: In min(x) : no non-missing arguments to min; returning Inf
3: In max(x) : no non-missing arguments to max; returning -Inf"
Any help would be much appreciated. Thanks in advance.
--
View this message in context: http://n4.nabble.com/Plotting-numeric-valu...
2007 Nov 26
2
Filling in a Zero Matrix
...C-9", "D-9", "E-9","A-12","B-12", "C-12", "D-12", "E-12")
#add data
for (i in 1:length(pct)) {
OGS(mci(i),sample(i))<- pct(i);
}
What I want is to have colum1 from original data to be the xlabel, column 2 to be the ylabel and the 3rd colum to be the values in the matrix
Any help is appreciated.
Kind Regards
Amit Patel
___________________________________________________________
now.
[[alternative HTML version deleted]]
2009 Jun 11
2
Tables without names
...t; 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:
> plot(unname(table(2:3)))
Error in xy.coords(x, y, xlabel, ylabel, log) :
'x' and 'y' lengths differ
but in melt, they act as though they have names 1:n:
> melt(unname(table(2:3)))
indicies value
1 1 1
2 2 1
(By the way, is the spelling error built into too much code to be
corrected?)...