Re: [R] 4D stacked column chart, Excel -> R

From: hadley wickham <h.wickham_at_gmail.com>
Date: Tue 28 Feb 2006 - 05:18:00 EST

A stacked barchart is a bad idea. A 3d barchart is a very bad idea. A stacked 3d barchart is a very very bad idea.

Why? Because it is very difficult to compare numbers. In a stacked bar chart you can only really compare the total, and the number in the lowest bar. In a 3d barchart you can only compare values in the same row (distorting perspective + occlusion).

If you want to display you data in a interpretible way, I would suggest a dotchart, carefully broken down to emphasise the comparisons you want.

Hadley

On 2/27/06, waeltlmi@fh-albsig.de <waeltlmi@fh-albsig.de> wrote:
> Hi All.
>
> I'd like to programm a 4 dimensional chart in R.
> Acctually I wanted to solve that problem in Excel cause I had the data there.
> Here is a link of my actual problem description (there are some chart pictures as well)....
> http://www.mrexcel.com/board2/viewtopic.php?t=187336&highlight=stacked+column
> because I still couldn't solve that problem I came to R.
>
> The chart should be actually a 3D chart of the type 3D Column Chart with following achsis:
> X Achsis: driven kilometre in 10000 blocks
> Y Achsis: Production month
> Z Achsis: number
> I need to show another month in that chart, the repair month.
> Each column should be a stacked column with more colors, so that every color shows one repair month.
>
> I tried to do it with the scatterplot3d function after I saw this example (it is from uwe ligges book):
> install.packages("scatterplot3d")
> library("scatterplot3d")
> data(trees)
> s3d <- scatterplot3d(trees, type = "h", angle = 55, scale.y = 0.7, pch = 16, main = "trees")
> my.lm <- with(trees, lm(Volume ~ Girth + Height) )
> s3d$plane3d(my.lm, lty.box = "solid" )
>
> Normally I just have to group the ranges which show the km in 10000 blocks and group the points as well,
> but I didn't come that far. even the scatterplot3d funtion didn't work for my data (gwx and x is my data table).
> x <- gw.faelle(gwx)
> k3d <- scatterplot3d(x, type = "h", angle = 55, scale.y = 0.7, pch = 16, main = "GWK" )
> Error in segments(x, z, x, z2, col = col, cex = cex.symbols, ...) :
> invalid color specification
>
> Do you have an idea how I can accomplish this task? Is it at allpossible to do that with scatterplot and some low level functions orshall I look at other packages and functions?
>
> Thanks in advance for any help and ideas!
>
> Best regards,
> Michael
>
>
> --
> HS Albstadt-Sigmaringen WebMail (http://webmail.hs-albsig.de)
>
> --
> HS Albstadt-Sigmaringen WebMail (http://webmail.hs-albsig.de)
>
>
>
> [[alternative HTML version deleted]]
>
>
>
> ______________________________________________
> R-help@stat.math.ethz.ch mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
>
>



R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html Received on Tue Feb 28 05:27:05 2006

This archive was generated by hypermail 2.1.8 : Fri 03 Mar 2006 - 03:42:45 EST