Displaying 20 results from an estimated 20000 matches similar to: "Plot 1:1 relationship"
2012 Dec 13
2
abline of an lm fit not correct
Hello fellow
R-users,
I’m stuck
with something i think is pretty stupid, but i can’t find out where i’m wrong,
and it’s turning me crazy!
I am doing
a very simple linear regression with Northing/Easting data, then I plot the
data as well as the regression line :
> plot(x=Dataset$EASTING,
y=Dataset$NORTHING)
> fit <- lm(formula = NORTHING ~ EASTING,
data = Dataset)
> abline(fit)
2010 Dec 13
3
curve
Hi All,
I generated 5000 samples using the following script
test<- rnorm(5000,1000,100)
test1 <- subset(test, subset=(test > 1100))
d <- density(test)
plot(d, main="Density of production")
abline(v=mean(test1)
I wanted to do the following but faced difficulties
1. to shade or color (blue) the curve using the criterion that any
2012 Jul 10
2
how can I show the xlab and ylab information while using layout
hi R-users:
I want to draw three plot into one figure by layout and the script has
been shown below.
But I find R does not show the xlab and ylab information completely as
shown the figure attached.
How can I midify the script.? thank you .
xxlab<-paste(cpmd," (",ro,"%)",sep=" ")
yylab<-paste(rfmd," (",co,"%)",sep=" ")
2010 Mar 20
1
abline on heatmap
Hi,
Is there a way I can draw an abline on a heatmap? I try the abline function, but don't get the line. My sample code is:
mat <- matrix(sample(1:100,40),nrow=5)
heatmap(mat,col=greenred(75),trace="none",
dendrogram = "column",labCol = NULL)
abline(h=5,v=4)
thanks!
[[alternative HTML version deleted]]
2012 Apr 27
2
get plot axis rounding method
Hello,
Does anyone know how to get the rounding method used for the axis tick
numbers/values in plot()?
I'm using mtext() to plot the values used to plot vertical and horizontal
lines (using abline()) and I'd like these vertical and horizontal line
values to be rounded like the axis tick values are rounded.
In other words, I want numbers plotted with mtext() to be rounded in the
same
2011 Oct 24
1
Different symbols for select points
Dear R users,
I hope you can help me as you have done before.
I was wondering if I can make some of the points on my graph a different colour and symbol? Some of my soil samples are enriched and I wanted them to be shown with a red triangle and the samples which are not enriched I wanted to show with a blue square. I can't seem to find a way of doing this if there is a way?
My script:
2014 Jun 24
2
Making several plots using a loop function
Hi all,
When making a bunch of plots using a loop function, how to add title to
reflect different plots.
Specifically, for the code below, I generated 9 plots. I would like to add
a title to each plot.
For example, the titles will be respectively, plot1, plot 2, … plot 9.
Thank you very much!
Hanna
par(mfrow=c(3,3), pty="s", pch=16, col="blue")
for ( i in 1:9) {
lm1
2011 Sep 20
3
Problem with legend
HI,
This code is part of a code I used to do a linear regression:
>points(var1~var2,data=Regress,pch=21,bg="grey")
>reg11<-lm(var1~var2,data=Regress)
>abline(lm(var1~var2,data=Regress),lty=2,lwd=2,col="grey")
>legend("topleft",legend=
>c("NDII from composite",
>"y= 0.0007x - 0.1156",expression(paste(r^2 ==
2007 Jun 04
3
Extracting lists in the dataframe $ format
I'm new to R and am trying to extract the factors of a dataframe using numeric indices (e.g. df[1]) that are input to a function definition instead of the other types of references (e.g. df$out). df[1] is a list(?) whose class is "dataframe". These indexed lists can be printed successfuly but are not agreeable to the plot() and lm() functions shown below as are their df$out
2013 Mar 12
1
Fine control of plot
Hi everyone.
I'm trying to create a graph where I could plot some lines on the right side. Here an example:
layout(matrix(c(1,2), 1, 2, byrow = TRUE), widths=c(6,2), heights=c(1,1))
x = 1:100y = rnorm(x)+xplot(x,y)
reg = lm(y~x)abline(reg, col = "red")
plot(1, type="n", axes=F, xlab="", ylab="", xlim = c(-1,1), ylim = c(min(y),
2009 Oct 07
3
graphics
Dear Sir,
I am using the following cos which creates a 3 panel figure on one image. However the legend function i am using only allows the legend to be placed within the axes of one of the graphs.
The plots however do not allow for a logend to be places within the axes do to the location of points on the graph. I can add the legend later using imaging software such as paint but i lose
2017 Dec 04
3
problem with the behaviour of dashed lines in R plots
dear R users,
I am performing a linear regression with lm, and I would like to plot
the regressor in dashed lines. I know that the lty=2 option is the way
out, but it has a very strange behaviour: the line starts dashed but
then the spaces between each dash becomes very tiny and so the line
become somehow continuous for the human eye. Do you know how to fix that
problem, in order to have a
2012 Dec 18
3
Regression line does not show on scatterplot
Hello,
I have done a scatterplot and now would like to add its regression line but it does not show.
Below, the code I have used.
lm3 <- lm(data$S_pH_KCl2.5_BCx~data$B_OleicoPF_BCx_per)
plot(data$S_pH_KCl2.5_BCx, data$B_OleicoPF_BCx_per)
abline(lm3)
I have been able to do the complete operation using the software STATISTICA but it would be great to do it with R.
If you require more details
2011 Jul 29
3
help with plot.rpart
? data=read.table("http://statcourse.com/research/boston.csv", , sep=",",
header = TRUE)
? library(rpart)
? fit=rpart (MV~ CRIM+ZN+INDUS+CHAS+NOX+RM+AGE+DIS+RAD+TAX+ PT+B+LSTAT)
Please: Show me the tree.
Mark
-------- Original Message --------
Subject: Re: [R] help with rpart
From: "Stephen Milborrow" <[1]milbo at sonic.net>
2012 Mar 15
2
How to add grid lines at specific position to a plot?
How to add grid lines at specific position to a plot?
Hi all,
[Disclaimer: I have done extensive and intensive searching on Google and
asked around but couldn't find a solution to this problem.
Please help me instead of just pointing out how simple and stupid my
question is. God bless good folks! Thanks!]
This is a headache for me and I have been struggling with this for a while.
With an
2010 Jan 04
1
Plot graph
Hi;
I want to obtain this graphic.
http://n4.nabble.com/file/n998283/plot.gif
Instead whith my code :
par(mfrow=c(1,7),mar=c(0,0,0,0))
plot(EntreesMoyennesMensuelles2003, type="l",main="2003",col="yellow")
plot(EntreesMoyennesMensuelles2004, type="l",main="2004",col="red")
plot(EntreesMoyennesMensuelles2005,
2018 Mar 17
3
length of 'dimnames' [2] not equal to array extent- For Correlation Plot
Hi Sarah,
Thank you for your help.
I tried using CR1<-as.matrix(CR1) but gives error Error in corrplot(CR1,
method = "circle") : The matrix is not in [-1, 1]!. I am using a corrplot
library.
Please find the reproducible example:
dput(head(CR1,10))
structure(c(26L, 46L, 39L, 38L, 47L, 59L, 56L, 61L, 43L, 60L,
78L, 63L, 2L, 58L, 8L, 1L, 1L, 9L, 11L, 2L, 1037500L, 46747L,
346300L,
2005 Jun 02
4
plot/lm/abline
Hi,
when I run
> plot.default(z1, z2, xlab = "x", ylab = "y", main = "xxxx", pch = "+")
> abline(lm(z1 ~ z2))
then the plot is plotted perfectly (scatterplot), however, the lm()
function doesnt appear on the plot. What could be wrong?
(Yesterday it worked perfectly, with the lm() line.)
Running R 2 on OS X.
Mathias Hunsk??r Furevik
Norway
2013 Mar 11
2
vertical lines in R plot
Dear All,
May I seek your suggestion on a simple issue. I want to draw vertical lines
at some positions in the following R plot. To be more specific, I wish to
draw vertical lines at d=c(5.0,5.5,6) and they should go till
p=c(0.12,0.60,0.20) . I haven't found any way out, though made several
attempts. Please run the following commands first if you are interested in!
2018 Mar 17
0
length of 'dimnames' [2] not equal to array extent- For Correlation Plot
That does clarify for me that you're missing a step: I didn't clearly
follow your description at first.
corrplot expects a correlation matrix, not your original data. You need to
use cor() first.
That's pretty clear in the documentation. See for instance the examples:
data(mtcars)
M <- cor(mtcars)
corrplot(M)
Sarah
On Sat, Mar 17, 2018 at 12:00 PM Shivi Bhatia <shivipmp82 at