Displaying 20 results from an estimated 30000 matches similar to: "plotting two curves: Why same hight?"
2004 Aug 02
4
How to add a common title (or xlab, ylab) for multi-plots in the same window?
Dear R people,
I am using par(mfrow=c()) to plot multi-figures in the same window. And I like
to put a common title (and xlab, ylab) for all of plots. I have already left
some margin by resetting omi values in par() and hided all (xlab, ylab) for
each sub-plot. Could anyone tell me how to do that?
Thanks a lot,
Frank
2007 Aug 05
1
Selectively shading areas under two density curves
Dear Listers,
I am drawing a plot of two density curves, for male and female incomes. I would
like to shade/hatch/color (whatever) the areas under the curves which are
distinctive for each gender. This is the code I have tried so far:
m <- density(topmal.d$y, bw = "sj")
f <- density(topfem.d$y, bw = "sj")
par(mfrow = c(1,1))
plot(x = c(0,400), y = c(0,0.02), type =
2011 Jul 13
1
Plotting parametrized curves (2D or 3D)
The curve() function plots an expression in x over an interval [from,to]. I
am looking for a function that would allow me to plot a parametrized curve
t -> x(t) where x is a vector in 2 or 3 dimensions.
For example (cos(t), sin(t)) (a2DÂ circle) or (cos(t), sin(t), t) (a 3D
helix). It seems that neither curve(), plot(), nor persp() are helpful for
that particular problem. I bet I?m not the
2009 Jul 30
1
Plotting two overlapping curves
Hi. Sorry if this question might have already been asked... I'm trying to
plot two curves on the same X-Y coordinate. The par(mfrow) command allows me
to plot the two curves on the same window however on different coordinate
systems. Is there a way to force the two curves into the same coordinate
system? Anyways, thanks in advance!
--
View this message in context:
2012 Nov 26
1
Plotting an adjusted survival curve
First a statistical issue: The survfit routine will produce predicted survival curves for
any requested combination of the covariates in the original model. This is not the same
thing as an "adjusted" survival curve. Confusion on this is prevalent, however. True
adjustment requires a population average over the confounding factors and is closely
related to the standardized
2011 Feb 01
4
How to Plot Two Curves Into One Page
I have a R script that contain these lines for plotting:
plot(foo,lwd=2,lty=3,col="red", main="");
plot(bar,lwd=2,lty=3,col="blue");
legend(0.6,0.6,c('Default','Probabilistic'), col=c('red','blue'),lwd=3);
But it generate 1 file (Rplot.pdf) with two pages. Each page for 1 plot.
Is there a way I can put them together in to one page?
2008 Nov 10
1
Combing xyplot and curve() plot via print
All,
I'm trying to put an xyplot and a plot produced via curve() on the same
page. It seems that mfrow and layout don't work, and now I'm trying print
but that does not work either. Any suggestions much appreciated.
Cheers,
David
p.11 = xyplot(1:10 ~ 1:10)
curve(sin, 0,3, ylim=c(-3,3), ylab="sin and cos", lty = 1)
curve(cos, 0,3, ylim=c(-3,3), lty = 5, add=TRUE)
2011 Jul 27
3
?plot: Add an example on how to plot functions to the help of `plot`.
Dear R folks,
currently the section Examples contains the following as an example on
how to plot a ?normal? function.
plot(sin, -pi, 2*pi)
Since it does not contain the argument for the function it would be
helpful to add for example the following.
## plots the graph of f(x) = x**2 with f(x) ? [1, 10]
curve(x**2, 1, 10)
## plots the graph of f(x) =
2007 Apr 05
1
Plotting multiple curves with lattice graphs
Hi List,
I would like to plot multiple curves (parametric
density curves) in one plot.
For example:
# parameters for three normal density curves
parms =
data.frame(ID=c(1,2,3),mu=c(50,55,60),sigma=c(10,12,15))
# I can easily draw three normal density curves using
curve():
curve(dnorm(x,mean=parms$mu[1],sd=parms$sigma[1]),from=0,
to=150, ylab="density", col="red")
2001 Sep 08
1
multiple fitted curves plot
Dear Rusers,
How would I plot several (24) fitted curves (nonlinear least squares)
within a single plot? To get the parameters I use:
resff <- list()
for (s in levels(PairID)) {
resff[[s]] <- nls(Photo ~ SSasymp(Ci, Asym, lrc, c0),
subset = (PairID == s))
}
Is it also possible to plot two different groups (male, female) of curves
in the same plot, with different style lines?
2011 Mar 29
1
plotting several ROC curves on the same graph
Hello
I am trying to make a graph of 10 different lines built each from 4
different
segments and to add a darker line that will represent the average of all
graphs
- all in the same plot.Actually each line is a ROC plot
The code I'm using for plotting one line is as follows:
logit.roc.plot <- function(r, title="ROC curve") {
old.par <- par(no.readonly = TRUE);
2012 Jan 24
1
Plotting coxph survival curves
Hi,
I am attempting to plot survival curves estimated by cox proportional
hazards regression model. The formula for the model is this:
F.cox.weight <- coxph(Surv(Lifespan, Status) ~ MS + Weight + Laid + MS:Laid
+ Weight:Laid, data = LongF)
MS = Mating status (mated/virgin)
Weight = adult female weight, continuous covariate
Laid = number of eggs laid by each female, continuous covariate
I
2009 Apr 13
2
I want to use Sweave, but only sometimes
Does anybody have a workable system to run an Rnw document through
R-Sweave when necessary, but to just run it through LaTeX if no new R
calculations are needed? I.e., the figures already exist, I do not
need R to do more work for me, so I send the document straight to
LaTeX.
I want to leave open the option that I might need to run the document
through Sweave in the future, so I don't want
2005 Jun 22
1
analyzing suvival data using splines (a.k.a., piecewise log-hazard-ratio models)
I'm looking for software that makes plots such as fig 4 (a)-(e), fig 5 anf fig 7
of
Gray, Robert, "Flexible Methods for Analyzing Survival Data Using Splines, with
Applications to Breast Cancer Prognosis," 1992, J Am Stat Assoc, pp 942-51.
In other words, I'm looking for software that takes survival data and a
continuous
covariate as input and computes a curve giving log hazard
2010 Jun 05
2
how to use 'points' function to plot two curves with errbar
Dear R Users,
I am using R on windows.
how to use 'points' function to plot two curves with errbar
I am doing like:
x.val <- as.integer(names(co2mean))
errbar(x.val, co2mean, co2mean + co2sd, co2mean - co2sd, xaxt='n', col=1,
xlab=NA,ylab=NA)# obs error bar
lines(x.val, co2mean, col=1, lwd=2)
errbar(x.val, co2tm3.month.mean, co2tm3.month.mean + co2sd.tm3,
co2tm3.month.mean -
2003 Jul 22
3
curves with shaded areas?
Hi,
I want to make a plot with abline where the area below or above the
curve is shaded. I can't find any documentation on that. Can anybody
help me with that?
thanks, Juffi
2012 Mar 26
2
many curves to the same plot
Dear all,
I would like to plot under the same plot
many curves like
mycdf<-ecdf(runif(100))
plot(mycdf)
curve(mycdf,from=-1,to=1)
mycdf<-ecdf(runif(200)+3)
plot(mycdf)
curve(mycdf,from=-1,to=1)
as you can see each new call to curve redraws (erases) the window. How I can have an effect like
plot(mycdf)
lines(mycdf2)
lines(mycdf3)
I would like to thank you in advance for your help
2020 Sep 29
5
2 KM curves on the same plot
Hello,
Can anyone suggest a simple way to generate a Kaplan-Meier plot with 2 survfit objects, just like this one:?
https://drive.google.com/file/d/1fEcpdIdE2xYtA6LBQN9ck3JkL6-goabX/view?usp=sharing
Suppose I have 2 survfit objects: fit1 is for the curve on the left (survtime has been truncated to the cutoff line: year 5), fit2 is for the curve on the right (minimum survival time is at the
2007 Apr 28
1
Hmisc curve label size & cex
R-Masters,
I need to produce high resolution line plots and place labels on the
curves. It seems that cex must be high relative to the other cex
values in order to produce sufficiently large & legible tick labels
at high resolutions. But high cex values cause the curve labels to
become gigantic when using Hmisc. I've struggled and searched the
archives, but cannot find a way of
2004 Jun 01
3
Parametric Curves
Hi everybody!
I'm trying to plot a parametric curve (three dimensions) using R but I
didn't obtain good results. Somebody have already done something like that?
Please help me!
Talita Perciano Costa Leite
Graduanda em Ci??ncia da Computa????o
Universidade Federal de Alagoas - UFAL
Departamento de Tecnologia da Informa????o - TCI
Constru????o de Conhecimento por Agrupamento de Dados -