Displaying 20 results from an estimated 3000 matches similar to: "Plot window - save as Postscript question"
2005 May 04
1
Plotting means and confidence intervals by group factor using lattice graphics?
Dear R graphics gurus,
Another question about lattice graphics. This time I would like to plot
means and confidence intervals by group factor in a lattice graph. I can
not find any working lattice examples. Maybe a custom panel function is
the answer, but that is a bit beyond me for now.
The individual plots within the lattice graph could look like this:
# Example with confidence intervals
2007 Aug 30
1
Barplot2 using for loop, how to adjust margins?
Hi R-users,
I inted to make multiple plots using for loop. The question is how can
I adjust the left hand side margin of the plot according to the
names.arg argument in barplot2. In every plot I have different
annotations in the y axis and they vary in length. Now when I have
fixed margins
opar <- par(mar=c(3,15,0,2)...
I get the same margins in all of the plots. That leaves lots of white
2004 Nov 24
1
reshaping of data for barplot2
Dear All,
I have the following data coming out from
s <- with(final,
summarize(norm, llist(gtt,fdiab),
function(norm) {
n <- sum(!is.na(norm))
s <- sum(norm, na.rm=T)
binconf(s, n)
}, type='matrix')
)
ie
gtt fdiab norm.norm norm.norm2 norm.norm3
18
2003 Apr 16
2
barplot2
Hello,
I get a nice looking barplot using the barplot2 function in the gregmisc
package:
body2 <- barplot2(hh3, beside = TRUE,
col = c("mistyrose", "lightcyan"),
....
cex.names = 1.0, plot.ci = TRUE, ci.l = cil, ci.u = ciu,
plot.grid = TRUE)
box()
However, obviously I lose the collors when converting from ps to a pdf
(outside of R)
2011 Jun 21
2
par code help
I am making a barplot using barplot2 from gplots where each bar
represents a specific tree species. I have formatted the species names
on the x-axis so that the genus name is above the species name and
have then rotated the labels 45 degrees to save room. This is my code:
>columncolor<-c("grey20", "grey20", "grey20", "grey70",
2008 Jun 30
2
Plotting question: Problem with strwidth in 2.7.1
R users,
I have a problem with function strwidth in 2.7.1. I'm trying to set
the plot margins in a way that horizontal
column labels will fit to the graph. tmp.t is a list of data.frame
objects. This code works well in 2.6.0.
...snip..
library(gplots)
for (i in names(tmp.t)) {
bmp(filename=paste(i, "_", Sys.Date(), ".bmp", sep=""),
width=1038,
2012 May 09
5
Dotchart showing mean and median by group
Given this example
mean.values<-colMeans(VADeaths)
mean.values<-apply(VADeaths, 2, mean)
median.values<-apply(VADeaths, 2, median)
dotchart(VADeaths, gdata=mean.values)
dotchart(VADeaths, gdata=median.values)
is it possible to ?combine? a single dotchart showing both the mean and the
median for each single group (with different plotting symbols)?
?is it that possible with the use of
2001 Jan 18
2
dotplot: character size of labels
Dear R users,
using dotplot (R1.2.0, WinNT4.0), I am trying to change the character size
of the labels of the points:
> # example
> data(VADeaths)
> dotplot(VADeaths, main = "Death Rates in Virginia - 1940")
> # I'd like to have smaller character size of the labels (for age and
population groups)
> ?dotplot
> # for argument "cex", this says:
2008 Apr 18
1
Vertical bars with barchart
Hallo,
What is the right way to get vertical bars in
a barchart?
For instance
barchart(VADeaths,
key=simpleKey(colnames(VADeaths),points=F,rectangles=T))
gives what I need,
only I would like the bars to be vertical.
But
barchart(VADeaths,horizontal=F,
key=simpleKey(colnames(VADeaths),points=F,rectangles=T))
does not give what I need,
and I do not understand how to change the
2009 Sep 15
2
Viewing Function Code
Hi All,
I'd like to see the function code behind the barplots2() function in the
gplots package, however i come across a bit of a stumbling block of a hidden
function, can anyone help?
> library(gplots)
> methods(barplot2)
[1] barplot2.default*
Non-visible functions are asterisked
> barplot2
function (height, ...)
UseMethod("barplot2")
<environment:
2005 Nov 14
1
bug/feature with barplot?
I have found a bug/feature with barplot that at least to me shows
undesireable behaviour. When using barplot and plotting fewer
groups/levels/factors(I am unsure what they are called) than the number
of colors stated in a col statement, the colors wrap around such that
the colors are not fixed to one group. This is mostly problematic when
I make R figures using scripts, since I sometimes have
2009 Nov 21
2
Fw: Re: title problem
It seems that there is a problem in
displaying subtitle in general, independently from
multi-plot display. when I do
plot (c(1,2,3), c(9,8,7), type = "l")
title(main = "Main title", sub ="Sub title",cex.main=2,
cex.sub = 2)
subtitle doesn't get displayed
> --- On Sat, 11/21/09, David Winsemius <dwinsemius at comcast.net>
> wrote:
>
2004 Nov 26
2
barplot(2?) with CI from a zero reference line
Dear R Users, (and dear Marc)
First of all many thanks for the answers to my previous questions.
I would like to barplot the mean percent change of a variate with it's
CI. Bars should start from the zero reference line to height (in
barplot2).
Is there a way to tweak barplot2, for example, to do that ?
I have tried to see what the function was but unlike other functions was
not able to
2006 Jan 18
6
some EPS rotated in journal preview
I am trying to send a manuscript to a journal.
One of the figures build by R is in the right orientation and 4 are rotated clockwise 90 deg in the preview.
I used the right click save to PS option and I used the command line
postscript("c:/temp/fig04.eps",bg="transparent",onefile = TRUE ,pointsize=20,paper = "letter",height=8,width=8,horizontal=FALSE,family =
2006 Oct 16
1
plots: layout + subtitles
Hello,
I want to create a figure that consists of a collection of 16 graphs on
4 rows. I am using
nf <- layout(matrix(seq(1,16), 4,4, byrow=TRUE), respect=TRUE)
boxplot(...
to create the layout of my 16 graphs. It works really well. However, I'd
like to add sub-titles that would apply to each row of 4 graphs. More
specifically, I'd like to have something like:
subtitle 1
2007 Oct 31
2
ylim in barplot2 function?
Hi list,
I'm using barplot2 form the gplots package to plot a few numbers (I want to add SD bars later).
However, I would like the y-axis not to start from 0 but 500. When I add the parameters YLIM, something goes wrong. The graph is not 'cut off' at 500. Instead the bars seems to sink trough the bottom of the graph.
Because its a little hard to explain, here is a self-containing
2006 Mar 01
1
Width of bars in barplot2
I'm using barplot2 to plot some data. Is there any way to determine
the width of the bars in the generated plot? I know that barplot2
returns a list of the coordinates of the center of each bar, but since
there is some white space between each bar, I don't know how to get
the width of each bar.
Jamie
2001 Feb 05
1
Bar widths in barplots don't change
Is the width= parameter in barplot() supposed to work? I couldn't get it to
work in my plot, and even in the example,
data(VADeaths, package = "base")
barplot(VADeaths, width=rep(0.1, 4))
the plot looks identical regardless of what I put in for the width. I looked at
the source for barplot() and it looks like it SHOULD work (but what do I know).
Am I doing something wrong?
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);
2004 May 07
1
x-axis tick mark labels running vertically
I'm plotting obesity rates (y-axis) vs Public Health Unit (x-axis) for the
province of Ontario and would like to have the Public Health Unit names appear
vertically rather than the default, horizontally.
I'm actually using the 'barplot2' function in the {gregmisc} library ... I
haven't been able to find a solution in either the barplot2 options or the
general plotting