Displaying 20 results from an estimated 2000 matches similar to: "Panel Bar plots"
2005 Mar 09
3
function in order to plot the same graph to postscript and pdf
Hi,
I've written a function in order to plot the same graph in a postcript and in
a pdf file. Unfortunately, the second graph is always empty, i.e.:
plot.both <- function{myplot, filename}{
pdf(file=paste(filename, ".pdf", sep=""))
myplot
dev.off()
postscript(file=paste(filename, ".eps", sep=""))
myplot
dev.off()
}
yields in a
2008 Jan 24
1
png to html
hello,
to display my histogram from a png file to a html file I use this syntax
> myplot2 <- png(file=file.path(directory,"myplot2.png"), bg="transparent")
> plot(1:10)
> rect(1, 5, 3, 7, col="white")
> dev.off()
png:C:/Documents and Settings/melyakhlifi/Bureau/myplot.png
2
>
2006 Mar 01
1
Using read.table() with Excel data
Help
I apologize if this message posts twice, but I do not think my last
attempt went through.
I am trying to use the read.table() function to read in a massive
alphanumeric data set. I thought I might scan in each column
individually and do a cbind() to reconstitute the array in R, so that
maybe I could handle the numbers and the long lines of texts
separately(some columns in the Excel
2014 Jul 28
0
lattice, latticeExtra: Adding moving averages to double y plot
Hi lattice users,
I would like to add 5-year moving averages to my double y-plot. I have three factors needs to be plotted with moving averages in the same plot. One of these reads off y-axis 1 and two from y-axis 2. I have tried to use the rollmean function from the zoo-packages, but I fail in insering this into lattice (I am not an experienced lattice user). I want to keep the data points in
2008 Jan 31
0
Cross Site Sniper 0.2 (stable)
I''m pleased to announce the release of Cross Site Sniper 0.2.
Cross Site Sniper is one more addition to the ever growing list of tools
that attempt to provide a convenient and DRY method to protect Rails
sites from Cross Site Scripting (XSS) attacks. There are many plugins
and tools out there that attempt to address this issue, but none of them
met my requirements. So, I created
2011 Feb 15
0
Relationships between png resolution, axis.text$cex trellis setting, and paddings
Dear R-users,
I was wondering if somebody could shed some light on the relationships
existing between the resolution of a png device, the axis.text$cex trellis
setting, and the paddings of the actual graph. In the following code, I
create a custom trellis theme that set (among other thing) axis.text$cex to
1 instead of the default 0.8. Then a lattice graph is created and exported
to three png
2005 Oct 03
2
grob questions
If I run the following example from:
http://www.stat.auckland.ac.nz/~paul/grid/doc/grobs.pdf
> grid.newpage()
> pushViewport(viewport(w = 0.5, h = 0.5))
> myplot <- gTree(name = "myplot", children = gList(rectGrob(name = "box",
+ gp = gpar(col = "grey")), xaxisGrob(name = "xaxis")))
> grid.draw(myplot)
>
2009 Sep 02
1
get function to return object "name"?
Dear list,
I've written a function that plots subjects. Something like:
myplot <- function(subject) { plot(subject) }
Subjects are vectors, e.g. ...
s1 <- c(200,200,190,180)
... and plotting them works fine, e.g. ...
myplot(s1)
Now I want to have "s1" etc appear in the plot title, but I don't know
how to refer to this generically (the object "name"? I tried
2009 May 04
1
ellipsis problem
Hi,
I'm confused about the use of ellipsis in function arguments. I'm trying
to write a wrapper for plot to automate the combination of plot() and
points() calls for a data.frame. Some arguments seem to get passed
through to the inner plot, while others cause an error:
Error in eval(expr, envir, enclos) :
..1 used in an incorrect context, no ... to look in
As a minimal example:
tmp
2009 Apr 04
2
help with formula and data= argument
Sorry for posting this twice, but I still have not solved this problem
and am hoping for some assistance.
I am attempting to write a function that is flexible enough to respond
to the user providing a formula (with a data= argument) or not (similar
to plot(x,y) versus plot(y~x,data=data)). I have found a method to work
with this in a simple case but am having trouble determining how to
2010 Apr 07
1
ggplot2, density barplot and geom_point layer
Hi,
Please consider the example below. How can I manage to overlay the points
the way I want in the second case?
Thanks, Joh
library(ggplot2)
# Modify data to match "real" case
myDiamonds <- diamonds
myDiamonds[["clarity"]] <- as.character(myDiamonds[["clarity"]])
myDiamonds[myDiamonds[["clarity"]]=="I1","clarity"] <- 1
2008 Aug 08
2
gridBase and new.page() / grid.newpage()
Hello all,
I'm trying to write a function using the gridBase package. I'd like
to push several base subplots to a larger plot constructed with grid.
However, I'm having trouble getting consistent results when running
the function when the plotting window (quartz) is closed, when it is
left open and the plot function is repeated to the same window, and
when the output is saved to a
2001 Jan 10
1
eval() bug in plot.formula() ?
I don't have time now to investigate myself,
and I'm not feeling like deciding myself if the following is a bug:
myplot <- function(dat, cex = 1.2, ...) {
if(!is.data.frame(dat <- as.data.frame(dat)))
stop("`dat' must be a data.frame")
if(any(is.na(match(c("x","y"), names(dat)))))
stop("`dat' must have a `x' and a
2000 Aug 17
1
Things I don't understand about the graphics interface
Using R-1.1.1 on RedHatLinux 6.2.
I've made some progress, succeeded in outputting bitmap, jpeg, and png
files. Yipee.
I did them with this command:
> dev2bitmap("whatever.bmp",res=300)
> dev.print(png, file="myplot.png", width=480, height=480)
> dev.print(jpeg, file="myplot.jpg", width=480, height=480)
> dev.print(pictex,
2009 Sep 14
2
How to set default plotting colors by treatment?
Dear R-helpers,
I have a number of dataframes that looks something like this:
mydfr <- data.frame(treatment=c(rep("A",3),rep("B",3)), Xmeas=1:6,
Ymeas=c(2,4,3,3,5,6))
# except with many more variables, which I plot all the time colored
by treatment to quickly check things:
with(mydfr, plot(Xmeas, Ymeas, pch=19, col=c("blue","red")[treatment]))
# I
2010 Dec 17
2
Nested layout()
Hello,
Is it possible to call a graphing function that uses layout() multiple times and layout those outputs ? Here's a minimal example :
myplot <- function()
{
layout(matrix(1:2, nrow=1), widths = c(1, 1))
plot(1:10)
plot(10:1)
}
layout(matrix(1:2), heights = c(1, 2))
myplot()
myplot()
--------------------------------------
Dario Strbenac
Research Assistant
Cancer Epigenetics
Garvan
2007 Jun 14
2
function with xyplot
Hi,
I'm a new user trying to switch from SAS, so sorry for the beginner's
question: Suppose I have a dataframe DF that contains variables X,Y,Z. I am
trying to write a function like this:
myplot <- function(varname){xyplot(varname ~ Y, group = Z, data = DF)}.
The problem is then how to enter X into my function. If I write myplot("X")
I get an error because the argument is a
2003 Aug 27
1
Exporting R graphs (review)
Hi guys,
Yesterday I posted my first couple of questions (see bottom of this
message) to this forum and I would like to thank you guys for all the
useful feedback I got. I just would like to make some comments:
1. Exporting R graphs as vector graphics:
The best answer came from Thomas Lumley <tlumley at u.washington.edu>
He suggested using the RSvgDevice package. As far as I know SVG
2004 Apr 29
1
Plot.lme error
Dear All;
Attempting to reproduce Figure 4.15 of MEMSS (p. 171) in R using
plot(Wafer, outer = ~ Wafer)
yields an error:
> plot(Wafer, outer = ~ Wafer)
Error in order(na.last, decreasing, ...) :
Argument lengths differ
The plot() produces the figure without problems for all versions of
Splus (4.5 to 6.2) on Windows. Noticing that the plot() differs slightly
between
2006 Apr 26
1
rake db_schema_dump make syntax error
rake migrate bug with datetime:
> rake db_schema_dump
produced a bad schema.rb that isn''t valid ruby, it has an invalid default, unless ruby
takes bare words:
t.column "date_available", :datetime, :default => Sun Jan 01 00:00:00 Arabic Standard
Time 2006, :null => false
I don''t think the Baghdad time zone should matter.
ruby 1.8.4, rails 1.1.2,