Displaying 20 results from an estimated 500 matches similar to: "Sweave and multiple graphs"
2005 Apr 29
2
Automating plot labelling in custom function in lapply() ?
Dear List,
Consider the following example:
dat <- data.frame(var1 = rnorm(100), var2 = rnorm(100),
var3 = rnorm(100), var4 = rnorm(100))
oldpar <- par(mfrow = c(2,2), no.readonly = TRUE)
invisible(lapply(dat,
function(x) {
plot(density(x),
main = deparse(substitute(x))) }
)
)
2002 Jun 17
2
layout() and postscript()
HI,
I would like to know if it's possible to create a postscript file with
multiple graphs . I'm creating some graphs by the means of a loop and I want
to save each graph in the same file (splitting making the device by the
number of graphs).
Do I have to use the par(matrix()) option, the layout() function or the
split.screen() one ?
Thanks
Nolwenn
1998 May 24
1
R-beta: problem with graphics parameter "fin"
Hi,
I have the following problem (with R 0.61.3 an Linux, and a new and empty
workspace)
> oldpar<-par()
> par(oldpar)
Error: attempt to set invalid value for graphics parameter "fin".
> oldpar$fin
[1] 6.992034 6.990803
but now:
> oldpar$fin <- c(6.99,6.99)
> par(oldpar)
it works.
It seems, that if I set oldpar$fin to values greater than listed above
2004 Jul 30
6
How to put multiple plots in the same window? (not par(mfrow=))
Dear All,
I am sorry if this question has been asked before. Below is my Question:
I want to put several plots in the same window, but I don?t want the blank
space between plots (like par(mfrow=)) --- that makes the plots too small.
Could anyone tell me how to do it?
Thanks a lot.
Frank
2006 Oct 08
2
Size problem with two dotcharts side by side
Dear all,
I'm trying to produce two dotcharts side-by-side within a Sweave
document. When I'm compiling this example:
\documentclass{article}
\begin{document}
<<fig=T,width=8,height=4>>=
par(mfrow = c(1, 2), cex = 0.7)
for(i in 1:2) dotchart(1:10)
@
<<fig=T,width=8,height=4>>=
par(mfrow = c(1, 2), cex = 0.7)
for(i in 1:2) hist(1:10)
@
2016 Apr 21
2
clock24.plot/radial plot
Dear All,
I am trying to generate a circular/radial plot. The script below has a
result I am looking for:
testlen<-rnorm(24)*2+5
testpos<-0:23+rnorm(24)/4
clock24.plot(testlen,testpos,main="Test Clock24 (lines)",show.grid=FALSE,
line.col="green",lwd=3)
if(dev.interactive()) par(ask=TRUE)
# now do a 'daylight' plot
2010 Mar 09
3
Fine Tuning Plotrix
Dear All,
Please see the code snippet at the end of the email.
I am using the color2D.matplot in Plotrix to plot a matrix.
It works great, but there are a few things I cannot figure out
(1) the value of cex.axis in the code snippet does not seem to affect
the final pdf at all (at least on my system, Ubuntu 9.10, plotrix and
Cairo installed from cran). How do I specify the size of the axis ticks
2003 Jan 08
2
Problem with fontsize of pie-chart in postscript file
Hi all,
I've a problem with the size of the labels of my pie-charts when I try to
write them to a postscript file. I need to increase the default size, so I
change cex (see below). On screen this works fine, but cex doesn't seem to
affect the postscript-file. Any suggestions?
Thanks a lot,
Daniel
Copy/Past-example (will try to write to c:/temp!):
labels <- c("I",
2010 Jun 23
5
Plotrix Trick
Dear All,
I am using the plotrix library to plot some matrices.
I have a problem: some of my data are outliers, hence using a linear
color scale does not work very well (you would see too many cells having
a similar, indistinguishable color). See the code snipped at the end of
the email.
Plotting the logarithm of the data gets the job done, but my problem is
that I would like to write in every
2006 Dec 01
3
Make many barplot into one plot
Dear all,
## I have 4 tables like this:
satu <- array(c(5,15,20,68,29,54,84,119), dim=c(2,4),
dimnames=list(c("Negative", "Positive"), c("Black",
"Brown", "Red", "Blond")))
dua <- array(c(50,105,30,8,29,25,84,9), dim=c(2,4),
dimnames=list(c("Negative", "Positive"),
2016 Apr 22
2
clock24.plot/radial plot
Kind Experts,
Many thanks for your guide. I have tried to figure out something that
can help me plot my own data using the examples you referred me to. I
copied part of the code as:
set.seed(44)
N=500
events <- as.POSIXct("2011-01-01", tz="GMT") +
days(floor(365*runif(N))) +
hours(floor(24*rnorm(N))) + # using rnorm here
2011 Nov 17
1
Log-transform and specifying Gamma
Dear R help,
I am trying to work out if I am justified in log-transforming data and specifying Gamma in the same glm.
Does it have to be one or the other?
I have attached an R script and the datafile to show what I mean.
Also, I cannot find a mixed-model that allows Gamma errors (so I cannot find a way of including random effects).
What should I do?
Many thanks,
Pete
--------------
2006 May 12
4
Title of page with multiple plots
I want to place four plots on a page, and I would like to have all four
plots share a common title. I have tried the following code, but the
title is centered over the fourth graph and not centered across all four
plots. Does anyone have any suggestions?
R 2.1.1
windows xp
oldpar<-par(mfcol =c(1,4),ask=TRUE)
plot(p,varp)
plot(p,SEp)
plot(p,CVp)
plot(p,ppval)
title(paste("P and 95%CI
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
2016 Apr 22
0
clock24.plot/radial plot
I use ggplot2 for all my plotting needs where you can make plots circular
with the coord_polar. Maybe this will help you along:
http://rstudio-pubs-static.s3.amazonaws.com/3369_998f8b2d788e4a0384ae565c4280aa47.html
On Fri, 22 Apr 2016 at 08:31 Ogbos Okike <giftedlife2014 at gmail.com> wrote:
> Dear All,
> I am trying to generate a circular/radial plot. The script below has a
>
2007 Dec 27
1
warning on gamma option in par(args) or calling par(= new)?
Dear All,
I have the following function
tstpar <-
function(n = 200, want.pdf = FALSE, pdfFileName = NULL){
oldpar <- par(no.readonly = TRUE)
on.exit(par(oldpar))
steps <- seq(from = 1, to = 8, by = 1)
h <- 10; w <- 6
if(want.pdf){pdf(file = pdfFileName, onefile = TRUE,
paper = "letter", width = w, height = h)}
par(mfrow = c(4,2))
for(i
2012 Sep 06
1
Change margin size of complex barplot
Dear R-help members,
with the help of one of you the following R-Code was developed. No I have the (probably simple) problem that I want to increase font size of "text" and "ylab" names from 1 to 2. Unfortunately I'm not able to adjust the margin so, that the plot is appers complete (all names readable) on a 8:14 Inch scale plot.
Some times I get the error message that
2005 Sep 16
1
How to make two figures in one plot - package vcd
Dear all,
I have a problem to make figures with two columns in package vcd.
Here an example code I take from "\library\vcd\html\plot.loglm.html"
What I need, I want to make two figures in one plot.
How could I do that.
I have tried with
layout(rbind(c(1, 1, 2, 2)))
but the same result, two plot.
Best wishes, Muhammad Subianto
library(vcd)
oldpar <- par(mfrow=c(1, 2))
## mosaic
2008 Nov 13
1
Boxplots with different variables and different ranges in R
Dear all,
I am trying to make boxplots in one diagram but it is not working. Actually I have a large dataset, around 35 water quality variables with different units and of course in different ranges (some are orders of magnitude bigger than others). I want to produce one diagram with all the boxplots of the variables of my dataset.
I tried these series of commands:
>oldpar <-
2010 Mar 24
2
Multi-panel Pie Charts.
Hi All,
I'm trying to find out a way to plot multi-panel pie charts. It may not be
the best way to present data, but I would still need one.
1. Is anyone aware of some in-built script/function which can do this for
me. I'm aware of one given in Deepayan's book, but anything apart from this?
2. I tried using Deepayan's script on following data set but it doesn't seem
to work