Displaying 20 results from an estimated 54 matches for "yrang".
Did you mean:
yang
2009 Mar 06
1
help to use ppp in spatial analysis
...area without problems and the scale is adequate to visual analysis of points ploted. But if i try to use ppp function to create a point pattern the result appears in rectangle area with a poor scale, dificulting in this case the analysis of the points. I think that is probably because of xrange and yrange parameter of ppp function, that was calculated based on max and min values of both x and y, but i am not sure:
latitude <- dataset$V2
longitude <- dataset$V3
xrange <-c(min(longitude), max(longitude))
yrange <-c(min(latitude), max(latitude))
area <- ppp(longitude/10000, latitude/1...
2011 Nov 28
1
plotting multiple lines on single graph ggplot2
Hello everyone
I have some data of the following type.
100 200 300 400 500
1.1 1.2 1.3 1.4 1.5
600 700 800 900 1000
1.5 1.7 1.9 2.0 2.4
With plot() and points functions I can plot these 4 lines of data. But
I dont know how to do it with qplot or ggplot functions. The scenario
is something like this: the hundreds should appear on x-axis and the
fractional values of y axis.
Thanks alot.
MEMON
2013 Jul 16
1
Masking oceans using polypath
...ple code:
library(mapdata)
image(x=110:155, y =-40:-10, z = outer(1:45, 1:30, "+"),
xlab = "lon", ylab = "lat")
outline <- map("worldHires", plot=FALSE) # returns a list of x/y coords
xrange <- range(outline$x, na.rm=TRUE) # get bounding box
yrange <- range(outline$y, na.rm=TRUE)
xbox <- xrange + c(-2, 2)
ybox <- yrange + c(-2, 2)
# create the grid path in the current device
polypath(c(outline$x, NA, c(xbox, rev(xbox))),
c(outline$y, NA, rep(ybox, each=2)),
col="light blue", rule="evenodd")
As y...
2009 Apr 08
0
Customize Legend in Juxtaposed Barplot
...aul/LVAC/General.csv")
## This Data is split into three data frames for Elementary,Middle and
High Schools
png(file="PTA.png")
x <- table(General$PTA.Support, General$Grade.Level)
#x <- table(x, exclude=NULL)
#names(x) <- r ("Yes","No")
yrange <- range(x,na.rm=TRUE)*1.2
if (yrange[1]>0) yrange[1] <- 0
if (yrange[2]<0) yrange[2] <- 0
bplot <- barplot(x,col=rainbow(if(is.matrix(x)) dim(x) else
length(x)),beside=TRUE,legend.text=TRUE,ylim=yrange,
main ="Barplot of PTA Support in Grade Lev...
2011 Apr 08
1
asking about contour plot with R
...hope you can help me (don't worry if you
can't):
Using "draw.contour" I get the contour but I want to place it in a
cartesian-coordinate system where x = "Componente 1" range between -1 y 1
and y = "Componente 2" range between 0 and 3, regardless of xrange or
yrange.
Of course, xrange and yrange are important to obtain an adequate contour
plot but I want to see that contour in the cartesian coordinate system I
told you before.
so I put ylim = c(0,3) and xlim = c(-1,1) but R ignores those sentences
and gives me a graphic using xrange and yrange as limits
ca...
2007 Sep 27
1
windows device transparency issue
...quot;Not Placebo"))
xdens <- tapply(x, trtp.f, density, na.rm=TRUE)
ydens <- tapply(y, trtp.f, density, na.rm=TRUE)
topx <- max(unlist(lapply(xdens, function(x) max(x$y))))
topy <- max(unlist(lapply(ydens, function(x) max(x$y))))
xrange <- range(x, na.rm=TRUE)
yrange <- range(y, na.rm=TRUE)
nf <- layout(matrix(c(2,0,1,3),2,2,byrow=TRUE), c(3,1), c(1,3), TRUE)
par(mar=c(4,4,0,0), oma=c(0,0,0,0))
getcolors <- rainbow(length(levels(trtp.f)), alpha=.5)
plot(x, y, xlim=xrange, ylim=yrange,xlab="X value", ylab="Y value", pch...
2012 Jan 19
1
Legend problem in line charts
...d
# Create Line Chart
for (i in 1:length(refid)) {
# convert factor to numeric for convenience
refid1 <- subset(Orange1, REFID == refid[i])
refid1$ACTTRTnum <- as.numeric(refid1$ACTTRT)
nACTTRTs <- max(refid1$ACTTRTnum)
# get the range for the x and y axis
xrange <- range(refid1$TIME1)
yrange <- range(refid1$BASCHGA)
# set up the plot
pdf (paste("pga", i, ".pdf", sep=''))
print(plot(xrange, yrange, type="n", xlab="TIME1 (WK)",
ylab="BASCHGA (mm)" ))
colors <- rainbow(nACTTRTs)
linetype <- c(1:nACTTRTs)
plotchar <...
2008 Apr 15
4
heavy graphs
Dear R community, I am creating large graphs with hundreds of
thousands of datapoints. My usual way for output was pdf, but now I am
getting file sizes of >30Mb that do not open well (or at all) in Adobe. Is
there a way to reduce the resolution or get rid of overlaying datapoints?
Any other idea is also warmly welcome!
Thank you and wishing you a good day!
Georg.
**********************
2006 Feb 10
1
the proper way to use panel functions in lattice package?
Hi,
I was trying to stack a topographic map readed in from esri shapefile with a
contour map and a vector map. However, the plotMap(maptools) and
contourplot(lattice) do not seem to work well on top of each other. Here is
part of my code.
xrange<-range(225000:350000)
yrange<-range(2685000:2810000)
basemap <- read.shape("Twn25_town_dxf_Polygon.shp")
plot.Map(basemap,xlim=xrange,ylim=yrange,fg=0,ol=8,xlab="",ylab="")
contourplot(var1.pred~x+y, spcgrid, aspect = "xy",label.style="align")
I...
2012 Feb 03
1
incomplete final line found on <name of my sourced function file>
...00","#BC8F8F",
"#C00000","#696969","#473C8B","#8B4500", "#FF7F00","#9370DB",
"#800000","#104E8B","#228B22")[20:1]
myagg<-aggregate(indata[invars],by=indata[datesvar],FUN=myfunction)
yrange=range(pretty(as.matrix(myagg[2:length(myagg)])))
if(fixedy==0){
ymin<-yrange[1]
ymax<-yrange[2]} else {
ymin<-0
ymax<-yrange[2]}
ydistance<-ymax-ymin
if(ydistance>0.1 & ydistance<=1){mystep<-0.1} else {
if(ydistance>1 & ydistance<=10)...
2010 Sep 21
5
Combined plot: Scatter + density plot
...o.readonly = TRUE) # save default, for resetting...
x <- pmin(3, pmax(-3, rnorm(50)))
y <- pmin(3, pmax(-3, rnorm(50)))
xhist <- hist(x, breaks=seq(-3,3,0.5), plot=FALSE)
yhist <- hist(y, breaks=seq(-3,3,0.5), plot=FALSE)
top <- max(c(xhist$counts, yhist$counts))
xrange <- c(-3,3)
yrange <- c(-3,3)
nf <- layout(matrix(c(2,0,1,3),2,2,byrow=TRUE), c(3,1), c(1,3), TRUE)
par(mar=c(3,3,1,1))
plot(x, y, xlim=xrange, ylim=yrange, xlab="", ylab="")
par(mar=c(0,3,1,1))
barplot(xhist$counts, axes=FALSE, ylim=c(0, top), space=0)
par(mar=c(3,0,1,1))
barplot(yhist$cou...
2009 Sep 17
1
Beginner Q- dates in the xrange?
Hi all- terribly beginner question here, but I can't figure out how to put
dates as the values for my x range in a plot. Example:
xrange <- results$current
yrange <- results$DIFF
plot(xrange, yrange, type="n", xlab="Date", ylab="Differential")
lines(results$DIFF, type="l", lwd=1.5, col="red")
Where xrange is:
> xrange
[1] "2010-04-12" "2010-04-14" "2010-04-15" "20...
2014 Dec 17
3
Problema con el subset
...(file="xxxx.csv", header=T, sep=";", dec=",")
df <-na.omit(df)
dfgrupo<-subset(df,df$parametroslaboratorio=="Aflatoxinas ByG")
niveles <- as.numeric(dfgrupo$param)
ntrees <- max(niveles)
xrange <- range(as.Date(dfgrupo$fecha))
yrange <- range(dfgrupo$z)
plot(xrange, yrange, type = "n", xlab = "Fecha del interlaboratorio",
ylab = "Z-score")
colors <- rainbow(ntrees)
ltipo <- c(1:ntrees)
char <- seq(18, 18 + ntrees, 1)
# Añadir las lineas al grafico
for (i in...
2013 Mar 05
2
multiple plots and looping assistance requested
...\\w)(\\w)(\\w)(\\w)$", "", x,
perl=TRUE)
columnsneed <- trytablecompare[-c(1:2, 2193:2196), c(1, 16, 18)]
sites <- columnsneed[1]
for(i in sites) {
pdf(paste0("output for ", sites,".pdf"))
xrange <- range("station_id_Timeseries:endofsubset$i")
yrange <- range("load_00600_W$endofsubset")
plot(x, y1, xlab="Year, Season", ylab="Total Flux (kg/season)")
lines(x, y1)
par(new=T)
xrange <- range("station_id_Timeseries:endofsubset$i")
yrange <- range("load_00600_F$endofsubset")
plot(x, y2, xla...
2009 Jun 25
1
How do I define the method for gcheckboxgroup in gWidgets?
...;, "y = x^2", "y = x^0.5", "y = x^3")
which.y <- 2 # inital value, to be changed later by the widget
# Define a function for the widget handlers
update.Plot <- function(h,...) {
plot(df[,1], df[,svalue(which.y)], type = "l",
ylim = c(0, svalue(yrange)), main = "Interactive Selection & Scaling",
xlab = "x values", ylab = "y values")
}
report.which <- function(h, ...) { print(svalue(h$obj), index = TRUE) }
# Define the actions & type of widget, along with returned values.
# Must be done before...
1999 Nov 08
2
range
I'm just beginning with R, and i've got a little problem, I would like
to have my own xrange and yrange on the graph when I plot a matrix, and
not the one R creates automatically.
Thank you for your help
Emilie Levivier (from Jussieu Paris)
-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Se...
2010 Jan 03
2
plot question
...ble(file, header=TRUE, sep="\t", row.names="datum") #
# Not sure if I got the row.names correct, I may need to use as.character (I believe I did use #that in the interactive session).
attach(glucose)
summary(glucose)
ncol <- length(names(glucose))
xrange <- range(1, ncol)
yrange <- range(0, max(!is.na(glucose[1:ncol])))
nrecs <- nrow(glucose)
colors <- rainbow(nrecs)
linetype <- c(1:nrecs)
plot(xrange, yrange, type="n", xlab="Measurement moment", ylab="Glucose (mmol/liter)")
for (i in 1: nrecs) {
daily_values <- glucose[i,]...
2010 Jul 07
0
subscripts for panel.superpose in lattice
...tation and examples, but I cannot figure
out how to make xyplot plug subscripts to a panel... call. Could you
have a look? It would be greatly appreciated.
Thank you,
Laszlo
scatter_contrast <- function(depvar,bins,cutvar,cutvarname = NULL,
yvarlab = NULL,xvarlab =
NULL,nbins=20,maxbins=100,yrange=c(0,99999),plottitle=NULL,legendtitle=NULL)
{
library('lattice')
library('grid')
trellis.par.set(
plot.symbol = list(cex = 1.5,col=rgb(26,71,111,max=255)),
superpose.symbol = list(cex = rep(1,
times=7),pch=c(15:21),col=c(rgb(26,71,111,max=255),
rgb(144,53,59,max=255),rg...
2011 Sep 23
1
spatstat => owin + image
Dear Community
I am at my wits end and seek advice.
My wish is to plot coordinates (x,y in WGS84_UMTS for the ones interested)
of sampling points.
This I can do by the standard spatstat prodcedure via owin. I then try to
add an image, which is
a map/satellite photo in the background.
Firstly
Problem: With the current code, I can not get the edges of the image to
match the boarders of the plot
2004 Feb 08
2
substitute, eval, quote and functions
Hi,
i am working with large data frames with many dependend variables. I
want to write some functions that will allow me to quickly select
variables from the frame and plot them in various colors depending on
factor columns, possibly selecting rows according to factor conditions.
In order to do this in a nice function, i need to understand how to work
with a column name in the body of a