Displaying 20 results from an estimated 20000 matches similar to: "Segment out of the Graph"
2011 Aug 24
2
Append a value to a vector
This should be easy but it does not work
I have 3 vectors*(activeT,inactT, activeR)*,
the idea is that if the last value in inactT is higher than the last in
activeT
this value has to be append in active T
and the last value in another vector call activeR has to be repeated.
(at the bottom you can find the vectors)
I have done this:
activeT=round(as.numeric(activeT))
inactT=
2011 Aug 23
2
Sequence
Hello everyone,
I would like to generate a sequence
such as, starting from 5, every value is
40% of the value before+ all the preceeding values.
es:
this is the seq of all the value+40% of the preceding value:
5 7 10 14 19 27 38
53 74 103 145 202 283 397
556 778 1089 1525 2134 2988 4183
2002 Jan 18
3
readline() to vector
Hi!
I'm trying to use readline() to ask for xlim() and ylim() values
for a subsequent plot. I'm doing:
lim <- readline("Enter xlim and ylim values: ")
then would like to use the values in lim for a plot:
plot(etc, xlim=lim[1:2],ylim=lim[3:4])
The problem is that lim is a character,i.e.,
"10,20,-10,50"
or
"c(10,20,-10,50)"
depending on the input to
2009 Mar 12
3
Map using projection
Hi list,
I have a real problem with plotting US state map. When I try to plot the
northern state, there will be some blank space in the top of graph (see case
1 example), and when I plot southern states, there will be a blank space in
the bottom of plot (see case 2). I spent almost 2 days to figure out a
solution, but could not. Would you help me if you know what the problem is?
Regards,
Alireza
2007 May 30
3
separate y-limits in xYplot panels
Hello,
I would like to get the scales of y-axes dependent only on the data points in a particular panel. Have attached a test example below.
When using 'relation="free"', it does not make the scales 'free', however when using 'relation="sliced"', I get a warning "Explicitly specified limits ignored in: limitsFromLimitlist(have.lim = have.ylim, lim
2008 Jun 30
1
Lattice : Single reference line/label at 0.05
r-friends--
I am trying to make a lattice plot with a single label at 0.05. A reference line at y=0.05 as well... This is what I have so far. The label reads 0.0 and there is a grid instead of a single reference line. Can someone help please?
Troy
x<-18:35
(pv<-1/(x-17))
xydf<-data.frame(x, pv)
print(xyplot(pv~x, data=xydf, type=c('p', 'g'),
ylim=c(0,1),
2013 Nov 16
1
Problema con el titulo de la leyenda en grafico con xyplot
Estimados, tengo un grafico al que debo anexar la leyenda en el costado
derecho. Mi problema es que el titulo de la leyenda debe decir
"Concentration (mM)" el que es muy largo y la ultima M sale cortada. No
puedo abreviar la palabra porque justamente me rechazaron el grafico por
que estaba abreviada esa palabra.
Aqui pego el codigo con el que se hacen los graficos y anexo un archivo
2003 Sep 09
1
How limits are set in a scales list
I have a lattice plot that has 4 pages with 4 columns and 8 rows per
page. I wish to have the rows use a separate x-axis since their
ranges are quite different, but I wish to have those same limits used
on each page.
By setting an element of the scales list to something like x = list(limits =
lim.list$CFU, lim.list$CFU, lim.list$CFU, lim.list$CFU,
2013 Aug 09
1
Agrupar los terminos de la leyenda
Bueno, una pequeña vuelta de tuerca más usando ggplot.. Aunque no quedó tan limpio como el de Carlos (gran resolucion) tambien te sirve.
Un saludo
library(ggplot2)
dec.df <- mat[mat$sol=="dec",]
lim.df <- mat[mat$sol=="lim",]
dol.df <- mat[mat$sol=="dol",]
dec.dr<-qplot(dia,V5,sol,data=dec.df,color=con2,geom=c("line"),facets=.~sol)
lim.dr
2011 May 12
2
Exporting interactive 3D plots with axes and labels
Hi,
I have a question about exporting interactive 3D plots. I use the following code to plot a contour of a trivariate normal distribution:
library(mvtnorm)
library(rgl)
library(misc3d)
n=25
x=seq(-3,3,length=n)
X=cbind(rep(x,each=n**2),rep(rep(x,each=n),n),rep(x,n**2))
p=array(dmvnorm(X,sigma=diag(3)*0.5+0.5),c(n,n,n))
contour3d(p,x,x,x,level=mean(p))
lim=c(-3,3)
2012 Oct 03
5
error bars on line plot with error bars using ggplot
I'm new to this and struggling away with ggplot. I need to plot some line graphs for about 4 series. I have the values to plot and also the value of the standard error of the value. Is it possible to plot the standard error bars when the value are already calculated as opposed to letting R do the analysis to calculate the SE bars?
Any simple example would be most appreciated.
Thanks
J
2008 Mar 05
1
Axes in polymars
Hi All,
I can't quite figure out how to change the parameters of the x and y
axes when I plot a polymars object. I want to add a scatterplot of the
data points, but the polymars plot seems to automatically set the
parameters to fit the polymars line. I've tried using plot(poly,1,fig=
c(x1,x2,y1,y2)) but have no luck. Any thoughts?
Thanks,
Ryan
2005 Nov 15
2
y-axis in histograms
Dear R- list,
I have some data to present with histograms. Therefore I used hist(...).
I have few values with almost 80% of
the frequencies (totaly 800) and some other values with low frequencies
( totaly 5 -10 )
that I want to emphasize. Therefore I want to "cut" the y-axis on 100,
but I
don't know how to deal with this.
Thanks in advance,
Michael Graber
2005 Nov 18
2
Adding points to wireframe
Hi,
I am using function wireframe from package lattice to draw a 3D surface.
I would like to add a few points on the surface. I read in a post from
Deepayan Sarkar that "To do this in a wireframe plot you would probably
use the panel function panel.3dscatter". Does someone have an example?
When calling panel.3dscatter with only x, y and z arguments I get
"argument
2011 Aug 15
1
lattice: How to get log base for each axis inside panel function?
Hello!
I'd like to have a function to draw correct grid while using log axis with xyplot from lattice package. Right now I have the following code inside of my panel function:
lim <- current.panel.limits()
v <- latticeExtra:::logTicks(2^lim$xlim, loc=1)
h <- latticeExtra:::logTicks(2^lim$ylim, loc=1)
panel.abline(h=log2(h), v=log2(v), col="LightGray")
Is there an easy way
2009 Mar 02
1
plotting on map
Hi list,
I want to plot state Texas using map function. I wrote the following code to
plot the grid boundary for Texas:
################################
library(maps)
require("mapproj")
longlatLimit<-c(-106.65, -93.53 , 25.93 , 36.49)
par(plt=c(0,1,0,1),cex=1,cex.main=1) #Set plotting parameters
map(projection="azequalarea",
2010 Nov 20
2
How to do a probability density based filtering in 2D?
Hello,
This sounds like a problem to which many solutions should exist, but I
did not manage to find one.
Basically, given a list of datapoints, I'd like to keep those within
the X% percentile highest density.
That would be equivalent to retain only points within a given line of
a contour plot.
Thanks to anybody who could let me know which function I could use!
Best,
Emmanuel
2005 May 04
1
Questions about the intersection area under two kernel densities
Hi there,
I am working on a project which needs the value of the interaction area under two distributions( eatimated by kernel density estimators).
For example:
x<-rnorm(100,0,1)
y<-rnorm(100,0.2,1)
density(x) # This produces the summary of dependent variable and independent variable.
How can I get the individual values of variables and reform a curve to calculate the area under
2005 Oct 14
2
Help with lattice, regressions and respective lines
# Dear R list,
#
# I'm needing help with lattice, regression and respective lines.
# My data is below:
bra = gl(2, 24, label = c('c', 's'))
em = rep(gl(3, 8, label = c('po', 'pov', 'ce')), 2)
tem = rep(c(0, 0, 30, 30, 60, 60, 90, 90), 6)
tem2 = tem^2
r = rep(1:2, 24)
y = c(40.58, 44.85, 32.55, 35.68, 64.86, 51.95, 42.52, 52.21,
2012 Mar 08
6
how to modify the tickment of x-axis
hi
I plot a series of observation data every minutes in a day as the
attachment below
plot(wnd,type='l',lty=1,col='red',lwd=1,xlab=xxlab,ylab=yylab,ylim=YY)
In the figure, the x-axis tickment is the number of data How can I change
it
fore example 1h 2h 3h 4h and so on ?
--
TANG Jie
Email: totangjie at gmail.com
Tel: 0086-2154896104
Shanghai Typhoon Institute,China