Dear all, I have produced a barplot and wish to alter the axes a little. In place of the variable names appearing on the x-axis, I'd like to have the numbers 1986 to 1995. I have tried using the argument xlim=c(1986,1995) in the barplot command but receive: "Error in plot.window(xlim, ylim, log = log, ...) : invalid 'xlim' value" Also, on the y-axis, the values are currently displayed in the format e.g. 1.5e+07 - how do I go about converting such values into normal notation, e.g. 15000000 ? Many thanks, Steve _________________________________________________________________ [[elided Hotmail spam]]
A very reasonable request! Sorry for not doing this initially, but please find below the data I am trying to plot:> total_sumssums86 sums87 sums88 sums89 sums90 sums91 sums92 Sim_1986 17722203 16875889 18626582 18428415 17611182 17290016 16819289 X1986 15276602 14086272 15387747 15560882 14905453 14939493 13979001 sums93 sums94 sums95 Sim_1986 17657959 17803561 18016143 X1986 14814672 15003711 14464427 This is the command I've successfully managed to execute:> barplot(total_sums, beside=TRUE, col=(2:3), las=2)...however, I'm running into problems when trying to change the default x-axis tick marks from sumsXX to 1986:1995. I'm also trying to change the format of the y-axis values as mentioned in my previous post. Many thanks again, Steve _________________________________________________________________ [[elided Hotmail spam]]
> dput(total_sums)structure(c(17722202.6898231, 15276602.215475, 16875888.5155229, 14086271.625756, 18626581.9628846, 15387747.481166, 18428414.8535184, 15560882.404998, 17611181.5207881, 14905453.195546, 17290016.3934661, 14939493.120707, 16819288.8227961, 13979000.614402, 17657959.3656573, 14814672.426469, 17803561.0042762, 15003711.075902, 18016143.3425573, 14464426.596292), .Dim = c(2L, 10L), .Dimnames = list(c("Sim_1986", "X1986"), c("sums86", "sums87", "sums88", "sums89", "sums90", "sums91", "sums92", "sums93", "sums94", "sums95"))) Wasn't aware of dput - y'learn something new every day! Hope this helps, Steve