Displaying 20 results from an estimated 30000 matches similar to: "treating a data symbol like a character"
2010 Feb 04
3
Legend symbol?
Hello,
I am creating a plot/image using different data and a couple fit lines
(see attached image). In the legend, I want the Default and Exponential
symbol to be a line. I am using the pch command, I tried to use "-" to
represent a line but does not work so I currently have set as a "1".
Any thoughts or suggestions would be greatly appreciated.
Below are the commands
2010 Sep 10
1
Greek letter included in a character vector
Hello,
In the past I have used "expression" to include greek letters in axis labels,
but this time I need to include the greek letter as part of a legend. Basically,
I need to create the following vector to rename the levels of a factor:
c("Interferon-gamma", "IL-10", "IL-5"), where "gamma" obviously needs to be
printed as the greek letter
2006 Nov 09
4
Plotting symbols with two positions?
Thanks a lot to Demitris for a prompt answer some minutes ago on another
tread (see below). To avoid excess mails on the list, I move onto next
question:
I have another small plotting problem that confuses me. I want to plot
results from a field trial series, using the numbers of the trials as
symbols in the plot.
pch = as.character(trial_no)
works fine, but truncates the trial number to the
2008 Jul 09
1
outlining symbol in legend with blackline
# I would like to outline the squares in the legend with a black line. Does
anyone know how to do this?
x.t <- structure(c(5987.387, 4354.516, 3685.789, 6478.592, 5924.315,
NA, 8386, 5559.468, NA, 4651.273, 3967.5, NA, 4339.167, 5053.56,
NA, 4631.978, 4808.694, NA, 5217.306, 4017.632, NA, 5846.903,
3969.883, NA, 3867.825, 3910.236, NA, 3886.434, 3782.094, NA,
3959.668, 3961.286, NA, 3848.853,
2008 Feb 25
1
Plotting series marked with a symbol on every nth data point, preferably in ggplot...
Hello!
I am working with signals and a plot of several signals on the same
axes can get quite messy. With lines that are very fractured,
distinction by only the linestyle is not very clear. If I add symbols
to the plot however, there are so many symbols, that they overplot and
the whole plot is unreadable once again. I am looking for advice on
how to make a plot with continuous lines and symbols
2010 Aug 30
3
Putting legend *outside* plotting area
Is there a simple way to put a legend outside the plot area for a simple
plot?
I found... (at http://www.harding.edu/fmccown/R/)
# Expand right side of clipping rect to make room for the legend
*par(xpd=T, mar=par()$mar+c(0,0,0,4))*
# Graph autos (transposing the matrix) using heat colors,
# put 10% of the space between each bar, and make labels
# smaller with horizontal y-axis labels
2009 Dec 18
2
Legend for two plots
Dear R users,
I am new to R and I couldn't figure out how to solve the following
problem:
I am trying to put a legend below two plots using the code below. The
legend appears in the second plot,
but I want the legend to appear below the two plots in the center of
the total chart. At the moment the
graphic looks like this: http://i48.tinypic.com/2h2fvhf.jpg
[code]
layout(matrix(1:2, nrow=1))
2011 Feb 10
1
Add different types of legend: line and points
Hello,
I plot box plot, and add a point to the box indicating mean. I also add some
range to the box width. I want to add legend for both the range (line) and
mean (point). However, I cannot add line legend and point legend together.
The code looks like the following.
(1) First, I tried the following code, however, it plot a line across the
point legend("*").
boxplot(count ~ spray,
2007 Feb 28
4
legend question
Hi to all,
I'm sorry for posting this question, I am sure I am missing something
important but after reading the documentation I cannot find where the
problem is.
I want to add a legend to a figure. If I use a simple example drawn
from the R Reference Manual such as, for instance:
x <- seq(-pi, pi, len = 65)
plot(x, sin(x), type="l", col = 2)
legend(x = -3, y = .9,
2008 Jan 23
3
How do I get a character and a symbol in a legend
In the following snippet
plot(1:10,1:10,type="n")
points(1:5,1:5,pch="+")
points(6:10,6:10,pch=20)
legend(5,5, c("A","B"), pch=c("+",20))
I want to get a legend with a "+" and a solid circle (pch=20).
However, what I get in the legend is "+" and "2". How can I get a "+"
and a solid circle?
thanks, Steve
2010 Feb 07
4
x-axis plot problem
Hi all,
I tried to have plot of many vector in one plot and i have got a nice plot
but i have problem with x-axis. I want to have month and year only(Jul.07
means July 2007) in x-axis without appearing other number behaind it.
I would appercit any help.
The R code:
F<-c(7.49,6.91,6.78,6.99,7.44,7.42)
M<-c(4.81,4.51,5.21,4.65,4.75,3.86)
P<-c(7.49,15.03,15.19,15.32,15.42,15.45)
2010 Sep 17
1
How to denote a line on the graph
Please give me some help, many thanks.
I graphed a expected CDF line of a binomial distribution on a graph,
And I have some observed points (observed CDF) from 4 groups fall on the
smooth CDF line.
I cannot really get the legend I want
legend ('topleft', c('a, 'b', 'c', 'd', 'expected CDF'), col=c(1,2,3,4),
pch=c(0,1,2, 3, '' ),
2012 Oct 03
2
Creating tiff with 1200 dpi
Hi all,
I am trying to create images in R suitable for journal publication. I'd
like to make an image that is 3.6" wide and 5.08" length, and 1200 dpi.
When I create a tiff file that is 800 dpi and 4x4", it works (although
doesn't look good).
But when I create a tiff that is the size and dpi I want, it doesn't
work. I get the following error:
Error in tiff(filename =
2008 May 14
1
lw in legend also changes thickness of characters in the legend??
Here's a simple example:
x <- 1:5
plot(x,x^2)
lines(x,x^2)
points(x,x,cex=2)
lines(x,x,lw=3)
legend("topleft",legend=c("y=x^2","y=x"),pch=1,pt.cex=1:2,lw=c(1,3))
The thickness of the circles in the legend changes with lw. If you change
the lw argument in legend to lw=c(1,1) then the thickness of the circles
goes back to normal. How can I make the above
2010 Apr 02
2
plot area: secondary y-axis does not display well
Dear useRs,
I'm having a slight problem with plotting on 2 axes. While the following
code works alright on screen, the saved output does not turn out as
desired i.e. the secondary y-axis does not display fully.
Just run the code and look at image output. Suggestions please...
thanks,
Muhammad
---
rm(list=ls())
x <- 1:100
y <- 200:300
par(mar=c(5,5,5,7)+0.1) # inner margin
2009 Apr 27
1
Passing Bablok
Hi,
is there any R-package providing a Passing Bablok regression procedure?
This Question seems to have occurred once or twice before, but I never saw
an answer to the previous inquiries.
Best regards
Benjamin Otto
======================================
Benjamin Otto
University Hospital Hamburg-Eppendorf
Institute For Clinical Chemistry
Martinistr. 52
D-20246 Hamburg
2009 Aug 25
3
math symbol + value of a variable in legend.
Hi R users:
I will like to have a legend with math symbols and also with
the value of a variable.
But I cannot obtain both at the same time (symbol + value of a
variable):
Here is a reproducible example:
m1<-5
m2<-12
plot(1:5,1:5,type="n")
legend("topleft",legend=c(paste(expression(mu),"=",m1),expression(paste(mu,"=",m2))),lty=1:2)
Thank you for
2009 Aug 25
3
math symbol + value of a variable in legend.
Hi R users:
I will like to have a legend with math symbols and also with
the value of a variable.
But I cannot obtain both at the same time (symbol + value of a
variable):
Here is a reproducible example:
m1<-5
m2<-12
plot(1:5,1:5,type="n")
legend("topleft",legend=c(paste(expression(mu),"=",m1),expression(paste(mu,"=",m2))),lty=1:2)
Thank you for
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 ==
2009 Nov 20
3
symbol in the plot
a graph question. Thanks a lot in advance.
I made two scatterplots on one graph (sigma vs. delta1, sigma vs. delta2)
(20 observations of delta1, delta2 and corresponding sigma) the x-axis is
sigma, the y-axis is either delta1 or delta2. I connected both scatterplots.
To seperate them, one curves is a line with circles, the other curve is a
line with squares on it.
I want to make a notation