Displaying 20 results from an estimated 500 matches similar to: "legend in multiple plot"
2009 Sep 22
2
barplot with chopped bars
Dear R users,
I want to make a barplot with bars that can be non-continuous. An example
will be the presence and absence of some events over time, e.g. a bunch of
people that are either in the office or not in the office, for some period
of time. I want to visualize this in a bar plot like this:
Person 1: ********* ******** *******
Person 2: ********* ***** **********
2009 Nov 03
3
Weird operator behaviour
Hi,
I have a dataset called 'fish'. fish$Species returns extract 1. When I use
fish$Species != c("CRA","PHC"), i.e. I want all species except "CRA" and
"PHC", I get extract 2 which is blatantly wrong. Can anyone see what I'm
doing wrong?
Regards,
James
EXTRACT 1
> fish$Species
[1] ALB ALB ALB ALB ALB ALB ALB ALB ALB ALB ALB ALB ALB
2000 Sep 07
3
plot with two y axes
I'm trying to make a transition from S-plus under Windows to R under
Linux. My immediate aim is to produce a scatter plot with two y-axes
with different scales. That can be done in S-plus with a command of the
following form:
guiPlot( PlotType="Scatter", DataSet="execon",
Columns="years,hstart,ship", AxisType="Multiple Y" ),
where years, hstart, and
2000 Oct 03
1
captions for than one figure
Hi,
I would like to have four plots plotted in the one figure and under each plot
the caption (a) ... (d). Using mtext I can get so far:
> plot(1:10, exp(1:10), log = "y", xlab = "xlab")
> mtext("(a)",side=1,line=4.5)
> plot(1:10, exp(1:10), log = "y", xlab = "xlab")
> mtext("(b)",side=1,line=4.5)
> plot(1:10,
2009 Apr 30
1
Overlaying graphs from different datasets with ggplot
Dear R-users,
I recently began using the ggplot2 package and I am still in the process of
getting used to it.
My goal would be to plot on the same grid a number of curves derived from
two distinct datasets. The first dataset (called molten.data) looks like
this :
Column names : Perc, Week, Weight
P10 21 333.3554
P90 21 486.0480
P10 22 452.6347
P90 22 563.8263
P10 23 575.0960
P90
2013 Nov 03
1
WISHLIST: on.exit(..., add=TRUE, where="first") to address common use cases
Before trying to submit a patch(*) to on.exit(), I'd like to check
whether there is an interest in enhancing on.exit(..., add=TRUE) such
that it is possible to specify whether the added expression should be
added before or after already recorded expression. The default is now
to add it after, but it would often be useful to add it before
previously recorded expressions.
EXAMPLE:
foo <-
2012 Apr 27
3
kiteChart to show real values with scalebar
Dear R-users
I hope someone could help me on this problem.
I want to create a multiple kiteChart showing the real values with a
scalebar on each indicating the scale .
Here are some sample data to show what I want to achieve.
Y <- read.table(textConnection("Sample1 Sample2
60 20
150 50
300
2009 Apr 26
7
Bumps chart in R
Hi there,
I would like to make a 'bumps chart' like the ones described e.g.
here: http://junkcharts.typepad.com/junk_charts/bumps_chart/
Purpose: I'd like to plot the proportion of people in select countries
living for less then one USD pr day in 1994 and 2004 respectively. I
have already constructed a barplot - but I think a bumps chart would
be better
# The barplot and data
2012 May 12
2
range segment exclusion using range endpoints
Hello,
I'm posting this again (with some small edits). I didn't get any replies
last time...hoping for some this time. :)
Currently I'm only coming up with brute force solutions to this issue
(loops). I'm wondering if anyone has a better way to do this. Thank you for
your help in advance!
The problem: I have endpoints of one x range (x_rng) and an unknown number
of s ranges
2012 Apr 30
1
Hmisc::pstamp, mfcol, and spacing
I am trying to make a nice 2x1 plot and add a timestamp with comment.
The pstamp function from Hmisc works nicely when mfcol=c(1,1),
but when mfcol=c(2,1), the stamp winds up in the wrong place:
> require('Hmisc')
> opar <- par(mfcol=c(2,1))
> plot(1:10)
> title(main="MAIN Title")
> plot(1:20)
> title(main="Another Title")
> pstamp("normal
2006 Dec 15
1
:job_key acting weird?
Hi all
I''m experiencing something strange with a :job_key, it took me a very
long time to find out a worker wasn''t doing it''s job because of the
name of my job_key. The first one I tried was :make_kohier, and with
that name (and lot''s of other ones) I can''t get the worker to work. I
do get my key in return, but the job doesn''t start
2003 Jan 22
1
self-split plot on multiple device
Hello!
I would plot more than 10 (this number is always different)
graphics on a figure with layout like 'mfrow=c(4,2)'.
There is some existing function able to open the right number of
device if number of graphics is done or I have to build it myself
with some 'IF.....ELSE.....'?
Thanks.
A.S.
----------------------------
1999 Dec 09
0
setting par(fig) resets par(mfrow), par(mfcol)
Can we add a note to the documentation that setting par(fig) resets
par(mfrow) and par(mfcol) to c(1,1)?
Or are mfrow and mfcol now deprecated in favor of all the split screen
stuff? (I was spending the morning trying to write some code that plotted
multiple subplots within whatever plot region was active at the moment; I
was able to set and reset fig successfully, but got very confused as to
2010 May 13
3
Multiple plots; single x(y) labels
Hi All,
Can anyone please help me with getting a single x and y-axis label while
plotting muliple plots. Here is the code:
par(mfcol=c(2,2))
plot(x <- sort(rnorm(7)), type = "s", main = "", ylab="", xlab="")
plot(x <- sort(rnorm(27)), type = "s", main = "", ylab="", xlab="")
plot(x <- sort(rnorm(47)), type =
2001 Sep 23
1
plot and lm (2)
Thanks for your reply Nassar.
What I really want is to overlay (like add=TRUE) the plots 1 and 2. With
plots "at the same screen" I meant overlaid and not one beside the other,
i.e., only one plot with all the points (1 to 10) in blue (or any other
color), the points 5 to 9 in red and a regression line from points 5 to 9.
Best regards,
Antonio Olinto
----- Original Message -----
2009 May 01
2
Reccomendation for graphics package
Hello,
What would you recommend for producing publication-quality plots with R?
Built-in graphics, trellis, ggplot2, or something else?
Basic requirements:
- I need to draw line-, box-, density-plots, bar-charts and histograms
- error bars on bar- and box-plots
- easy tiling of multiple plots on a single "page"
Basic R plotting with mfrow and mfcol parameters is not satisfactory
2006 Apr 28
4
par(mfror=c(1,2))
dear list,
i have a problem using the par function.
in one graphic device i want to have two plots so i tried to use
par(mfror=c(1,2)).
of course it worked out, but the height now is twice the length of the width
for each single plot.
what i actually wanted is something like par(mfrow=c(2,2)) where only the
top (or bottom)
two plots are drawn with entire length proportions of 1 to 2 ( height 1,
2007 Jan 02
3
graphical parameters: margins
Hi all,
Please, while using image() which is the graphical parameter which control the space between ylab and the y axis? I do need to write a number of relatively long y labels and I am not able the control, if possible, this space.
See the effect I need to avoid...
http://nvx.environmentalchange.net/@rrodriguez/images/overlapping.jpg
Thanks for your help,
Ricardo
--
Ricardo Rodr?guez
Your
2005 Jul 13
1
unexpected par('pin') behaviour
hi everybody,
I noticed the following: in one of my scripts 'layout' is used to
generate a (approx. square) grid of variable dimensions (depending on
no. of input files). if the no. of subplots (grid cells) becomes
moderately large (say > 9) I use a construct like
###layout grid computation and set up occurs here###
...
opar <- par(no.readonly = T);
2007 Oct 30
0
Plotting question: how to plot SNP location data?
Hello,
I would like to plot specific SNPs with their exact locations on a
chromosome. Based on my genotyping results I would like to separate
these SNPs in three different categories: 1, 2 and 3 and use different
colours to represent these categories. The script below generates the
sample data. I can plot these with the image function using the
following:
val <- 1:3
samp <- sample(val,