[R] Drawing paths through a grid

2010-06-17 Thread Rex C. Eastbourne
I would like to draw a set of points that are equally spaced in a 2-D grid. Then I would like to draw lines that illustrate different directed paths through subsets of points. Imagine that the points correspond to booths in a conference center, and I want to show the various paths people took to vi

Re: [R] Possible to write text inside a bar of a barplot?

2010-01-15 Thread Rex C. Eastbourne
Thanks for the replies! The answer is that barplot() returns the x coordinates of the bars. On Fri, Jan 15, 2010 at 12:01 PM, Rex C. Eastbourne < rex.eastbou...@gmail.com> wrote: > How can I write text inside a bar of a barplot? I tried using text(), but I > am only able to specify t

[R] Possible to write text inside a bar of a barplot?

2010-01-15 Thread Rex C. Eastbourne
How can I write text inside a bar of a barplot? I tried using text(), but I am only able to specify the numeric y-coordinate. The different columns of my barplot correspond to factors and not numbers, so I don't know how to access the horizontal positions of the bars. I tried fiddling with differen

Re: [R] Newbie mistakes saving images to files

2010-01-14 Thread Rex C. Eastbourne
Thanks Jim! I followed the instructions in the FAQ and wrapped print() around my function calls. The images are now properly generated. Rex On Thu, Jan 14, 2010 at 4:38 PM, jim holtman wrote: > If you are using lattice, check out FAQ 7.22 > > On Thu, Jan 14, 2010 at 5:15 PM, Rex C. E

[R] Newbie mistakes saving images to files

2010-01-14 Thread Rex C. Eastbourne
I am encountering problems using the png() function to save around 20 charts to separate files. My script is conceptually structured as follows: ### png("Image %03d.png") # the following are calls to user-defined functions I wrote that call plot, barchart, etc. with special arguments. myPlot("

Re: [R] Newbie mistakes saving images to files

2010-01-14 Thread Rex C. Eastbourne
On Thu, Jan 14, 2010 at 2:15 PM, Rex C. Eastbourne wrote: > I am encountering problems using the png() function to save around 20 > charts to separate files. > > My script is conceptually structured as follows: > > ### > png("Image %03d.png") > > # th

Re: [R] Barchart bar lengths not proportionate

2010-01-14 Thread Rex C. Eastbourne
("a","b"), x=1:4) > da$y <- c(1,5,6,3,2,0,6,0) > > barchart(y~x|A, data=da, horizontal=FALSE) > > barchart(y~x|A, data=da, horizontal=FALSE, > ylim=c(0, 1.05*max(da$y))) > > At your disposal. > Walmes. > > > > Rex C. Eastbourne wro

[R] Barchart bar lengths not proportionate

2010-01-14 Thread Rex C. Eastbourne
When I use barchart (with default formatting options), I get bars whose lengths/heights are not proportional to their value. For example: http://drop.io/wbagm6s/asset/capture-png Many of the values in this chart are 1; however, because the blue bars extend to the left of the "0" tick mark, those

Re: [R] Recommended visualization for hierarchical data

2010-01-12 Thread Rex C. Eastbourne
On Tue, Jan 12, 2010 at 8:58 PM, Simon Knapp wrote: > Not sure if there are any 'recommended' visualisations, but the following > is > a start (you will need to tune the scaling of the x-axis label and state > identifiers). > > In the plot produced, the widths of the 'columns' are proportional o

Re: [R] Recommended visualization for hierarchical data

2010-01-12 Thread Rex C. Eastbourne
On Tue, Jan 12, 2010 at 5:26 PM, Rex C. Eastbourne wrote: > Let's say I have data in the following schema that describes the number of > purchases a company has received from each County in the US: > > State | County | Purchases > --- >

[R] Recommended visualization for hierarchical data

2010-01-12 Thread Rex C. Eastbourne
Let's say I have data in the following schema that describes the number of purchases a company has received from each County in the US: State | County | Purchases --- NJ | Mercer | 550 CA | Orange | 23 I would like to visualize what states contribute the m