Displaying 20 results from an estimated 6000 matches similar to: "Adding polygons to a barplot"
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 13
3
xfig boxplot (polygon) bug??
There appears to be a bug in the R xfig() driver.
When I run a simple example, eg
> data(InsectSprays)
> boxplot(count ~ spray, data = InsectSprays, col = "lightgray")
the boxplot is fine. Doing the same thing after
> xfig(file='test.fig')
and then opening in Xfig (ver3.2 patchlevel 2) on my Linux box produces boxplots
where the boxes, although correctly shaded in,
2001 Feb 13
3
xfig boxplot (polygon) bug??
There appears to be a bug in the R xfig() driver.
When I run a simple example, eg
> data(InsectSprays)
> boxplot(count ~ spray, data = InsectSprays, col = "lightgray")
the boxplot is fine. Doing the same thing after
> xfig(file='test.fig')
and then opening in Xfig (ver3.2 patchlevel 2) on my Linux box produces boxplots
where the boxes, although correctly shaded in,
2010 May 09
1
Plot polygon in 3D with rgl
Dear R-helpers, an rgl-ers in particular,
what is the easiest way to plot a section of a plane in 3D, that is
given by the xyz coordinates of the outline?
Suppose I have a polygon - which I know for sure is a set of
coordinates on the same plane. One method I found is to use surf.tri
from the geometry package, and then plot the triangles with
rgl.triangles. This method is not perfect though,
2006 Mar 03
1
R plots in PowerPoint
I have some plots that I generating using R (using trellis, plot, and
barplot2) that I want to include in a PowerPoint presentation I am
giving. My computer is running OS X. I find that presentations are
easier to read when there is light text on a dark background and would
like to generate plots that fit that style. The plots I am generating
are all grayscale. Is there an easy way to get R to
2008 Jul 27
1
Lattice wireframe: How to avoid drawing lines around polygons when using shade=TRUE
I am using wireframe from the lattice package, with the shade option set
to TRUE. When I output to PDF or Postscript, a line gets drawn around
each polygon of my surface which causes ugly Moir? effects and doesn't
make sense in my application (think the plot of Maunga Whau--gridlines
don't make sense). This does not happen when I display on the screen--
then I just get the surface as
2009 Aug 24
1
How to generate more triangles in sequences?
Hi everyone,
I want to plot some pattern. For example, I have some coding as below,
plot(0:11,type="n")
polygon(c(6,8,10), c(7,3,5),bor=6)
polygon(c(2,4,6), c(5,3,7),bor=6)
polygon(c(6,10,8), c(7,9,11),bor=6)
polygon(c(2,6,4), c(9,7,11),bor=6)
This coding will give me four triangles, but how to generate more triangles
in sequences so
that not need to mention the coordinate for each
2009 Jun 25
3
grid.polygon() + color gradient
Hi,
I wonder whether there is a way to generate a polygon (a triangle in
my case) with color gradient using grid.polygon() in package grid?
I tried something like
library(grid)
grid.polygon(x=c(0, 0.5, 1), y=c(0.5, 1, 0.5), gp=gpar(col=NA,
fill=colorRampPalette(c("green", "lightgray"),
space="Lab")(200)))
But am only
2006 Jul 10
2
Setting the colors of lines in a trellis plot...
With some help from those with expertise on this list, I managed to
produce a plot using trellis that looked like I wanted it to look.
Now, I need to take the same plot and make the lines on it color, but
I want to specify the color for the lines myself.
I've managed to make the key use the colors I want. I've managed to
make the symbols of the actual plot use the colors I want. But I
2005 Sep 01
4
Spacing and margins in plot
If I use the following command to plot points:
plot(c(1,2,2,3,3,3), type="p", pch=20, ylab="Y Label", xlab="X Label", xaxt="n")
there is a large amount of space between the label "X Label" and the
actual x-axis. If I change the xaxt="n" to xaxt="s", the label "X
Label" don't move at all. Is there a way to get
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)
2001 Jan 06
2
video compression using textured polygons?
I was just thinking last night, how about this:
For each frame, detect edges and divide the frame into a
bunch of non-overlapping polygons. Extract textures from
the first frame, then save changes in polygon vertex
coordinates only, unless the textures change too much in
which case new textures (which could be wavelet compressed)
would be stored.
Also, if the movements of the vertices would
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
2010 Apr 29
1
Request - adding recycled "lwd" parameter to polygon
Hello dear members of R-help and R-core mailing list,
I am not sure if this request is a "ticket" that should be filled somewhere
outside the mailing list. If so, I apologize for not doing and would like
to know where I should have filled it.
And to the subject matter:
I would like to use a command like this:
plot(c(1,8), 1:2, type="n")
polygon(1:7, c(2,1,2,NA,2,1,2),
2010 Apr 29
1
Request - adding recycled "lwd" parameter to polygon
Hello dear members of R-help and R-core mailing list,
I am not sure if this request is a "ticket" that should be filled somewhere
outside the mailing list. If so, I apologize for not doing and would like
to know where I should have filled it.
And to the subject matter:
I would like to use a command like this:
plot(c(1,8), 1:2, type="n")
polygon(1:7, c(2,1,2,NA,2,1,2),
2002 Mar 10
1
lattice library: xyplot and polygons
Dear R-Helpers,
Is there a way to draw shaded (filled) polygons in panel graphs produced
by xyplot ? I made different trials (see below) with polygon() and
grid.polygon() but polygons are not drawn (probably for the same reason
that prevents the use of lines, points, etc. in xyplot panels).
Thanks in advance,
Renaud
> Water
id label longitude latitude
515 21 Zone inondable
2004 Aug 27
1
Plotting irregular grid as image or persp
Hi,
I have an array of 2d node locations and an array triangles, and would
like to plot something like a image or persp.
An example of doing it with rgl is:
library(ncdf)
library(rgl)
# wget http://www.maplepark.com/~drf5n/extras/teapot.nc
teapot<-open.ncdf("teapot.nc")
z<-get.var.ncdf(teapot,"tris")
l<-get.var.ncdf(teapot,"locations")
2010 Apr 08
2
erasing an area of a graph
I have a case where the easiest way to draw a particular symbol would be
to draw something a little bigger, and then use polygon(... , col=0) to
erase the extra stuff. Just how to do this best when par('bg') =
'transparent' is, however, eluding me. I've looked through the archives
and the book R Graphics without quite seeing the light.
Help or pointers to help would be
2005 Jul 08
1
Overlying a Normal Dist in a Barplot
R-Users,
Hopefully someone can shed some light on these questions as I had
little luck searching the archives (although I probably missed something
in my search due to the search phrase). I estimated multinomial
probabilities for some count data (number successful offspring) ranging
from 0 to 8 (9 possible response categories). I constructed a barplot
(using barplot2) and I want to
2005 Apr 14
3
Wrapping long labels in barplot(2)
I am using barplot, and barplot2 in the gregmisc bundle, in the
following way:
barplot2(sort(xtabs(expend / 1000 ~ theme)),
col = c(mdg7, mdg8, mdg3, mdg1), horiz = T, las = 1,
xlab = "$ '000", plot.grid = T)
The problem is that the values of 'theme', which is a factor, are in
some cases rather long, so that I would like to wrap/split them at a
space once they