similar to: plotting order in a barchart.: two problems

Displaying 20 results from an estimated 30000 matches similar to: "plotting order in a barchart.: two problems"

2009 May 18
1
Barchart in lattice - wrong order of groups, data labels on top of each other, and a legend question
Hello! I have a question about my lattice barchart that I am trying to build in Section 3 below. I can't figure out a couple of things: 1. When I look at the dataframe "test" that I am trying to plot, it looks right to me (the group "Total" is always the first out of 5). However, in the chart it is the last. Why? 2. How can I make sure the value labels (on y) are not
2009 Mar 30
1
advice for alternative to barchart
hi folks, I was wondering if anybody could give me some advice. I've created a stacked barchart, with 'car model' along the x axis, 'number of cars' along the y axis. There are 45 individuals involved, each of which can own any number of cars, of any model (eg an individual could own two cars of one model, and another car of a different model). I've got a legend by the
2006 May 15
1
Trying to get values to display on horizontal barchart
Hello, R 2.3.0 Windows XP I have spent quite a bit of time trying to resolve my problem below, which included a R site search. The "vertical bars" syntax below produces a vertical bar chart with the values displayed above each bar. I want to cast this graphic horizontally, but I have not been able to arrive at a suitable outcome. The best I have been able to do, using the second block
2012 Nov 05
2
barchart con abline en lattice
Hola a todos: soy nueva en R así que es posible que la pregunta sea simple, pero no encuentro la solución. El caso, quiero hacer un gráfico de barras sencillito, pero con una linea horizontal que represente la media. Pues bien, si hago el gráfico sin aplicar la linea, no hay problema: ----- barchart(web[,2] ~ web[,1], col="#2C575D", ylab=colnames(web)[2],
2010 Jan 14
3
Barchart bar lengths not proportionate
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 bars appear to represent higher numeric values. Is there a way to make the length of the
2012 Nov 06
2
Fwd: barchart con abline en lattice
Perfecto! muchas gracias Carlos; la verdad que estuve un buen rato intentándolo, pero aún no comprendo la estructura de lattice, así que modificaba cosas un poco al tuntun. Tengo otra cuestión un poco más controvertida, no sé si este será el foro adecuado para proponerla o supondrá un debate innecesario.... Como os decía, acabo de iniciarme en R, y estoy explorando las opciones de visualización.
2002 Mar 27
2
Vertical bars with barchart()
I would like to create a barchart that has vertical instead of horizontal bars. My goal is something similar to Figure 6.10 (p. 166) in "The Basics of S and S-plus," except for the orientation of the bars. I don't think bwplot() or xyplot() will work. Any suggestions? Scott Waichler Hydrology Group/Environmental Technology Division Battelle Pacific Northwest National Laboratory
2006 Oct 28
1
What determines the order of rows in a lattice barchart?
Hi, What determines the order of the rows in a barchart? Cheers, Geoff. Here is my code, and the data follows. If I have z in alpha order, the barchart is in some order I can't determine. I originally tried rownames(twater)~twater$Cat, but the chart wasn't in rownames(twater) order either. library(lattice) twater<-read.csv("totalwater.csv",strip.white=T)
2008 Apr 18
1
Vertical bars with barchart
Hallo, What is the right way to get vertical bars in a barchart? For instance barchart(VADeaths, key=simpleKey(colnames(VADeaths),points=F,rectangles=T)) gives what I need, only I would like the bars to be vertical. But barchart(VADeaths,horizontal=F, key=simpleKey(colnames(VADeaths),points=F,rectangles=T)) does not give what I need, and I do not understand how to change the
2007 Jul 10
1
Lattice: vertical barchart
barchart(Titanic, stack=F) produces a very nice horizontal barchart. Each panel has four groups of two bars. barchart(Titanic, stack=F, horizontal=F) doesn't produce the results I would have expected, as it produces this warning message: Warning message: y should be numeric in: bwplot.formula(x = as.formula(form), data = list(Class = c(1, And it results in each panel having 22 groups of
2004 May 12
1
Barchart questions
I am attempting to produce a bar chart and am having some trouble with the panel.barchart command. The definition of X is that it's the "proper extent of the bar". Is that the maximum value? Or is it the labels for my vertical axis, since the axes seem to be switched for this command? Is there a better/different command I should be using for barcharts (i.e. barplot)? Thanks for your
2010 Feb 20
3
Error Bars in lattice- barcharts
Hello, I am attempting to write a script that adds error bars to a barchart. I basing my attempt heavily on the following thread: http://tolstoy.newcastle.edu.au/R/e2/help/06/10/2791.html I can't seem to get around the problem that was discussed in the thread. The following example should illustrate my problem. Sorry about the messy example but I am 1) trying to make it as close as possible
2009 Nov 26
3
barchart() {Lattice} help.
Hi R Users, I'm trying to plot a stacked barplot. Here is data: Sample Col1 Col2 Col3 Row1 -2 4 -1 Row2 3 -2 4 Row3 3 5 -2 Row4 4 1 -1 I'm using following R code: library(lattice) dta<-read.table("data.txt", header=TRUE, row.names="Sample") barchart(data.matrix(dta), horizontal=FALSE, stack=TRUE, col=2:4,
2023 May 03
1
[External] Error in percentage stacked barplot
Dear Richard,? Thank you very much for your reply. I went through the code and it worked. I was also able to change the colours.? I was wondering if I can change the legend position; instead of being in the bottom to be on the left side.? I tried the following but without any success strip = FALSE strip.right = TRUE likert(t(hellisheidi), ReferenceZero=.5, xlab="X-lab",
2023 Nov 18
1
combine barchart and xyplot in lattice
In below graph, I would like to add two vertical lines using panel.abline(). ?Is this possible? Thanks, Naresh mydf <- data.frame(hour = rep(6:20, 2), traffic = c(round(dnorm(6:20, 9, 3) * 10000), round(dnorm(6:20, 17, 4) * 10000)), direction = rep(c("inbound", "outbound"), c(15, 15))) vehicles <- data.frame(hour = 6:20, count = c(100, 120, 140, 125, 105, 80, 70, 75,
2023 Nov 18
1
combine barchart and xyplot in lattice
On Sat, 18 Nov 2023 at 06:44, Naresh Gurbuxani <naresh_gurbuxani at hotmail.com> wrote: > > In below graph, I would like to add two vertical lines using > panel.abline(). Is this possible? I assume you want the 'v' variable in panel.abline() to be interpreted in the context of your x-axis, which here represents a factor variable. Unless two factor variables have the same
2012 Oct 23
1
Understanding lattice barchart() display
I've a data frame with this structure: 'data.frame': 1987 obs. of 11 variables: $ site : Factor w/ 24 levels "B(W)","BC-1",..: 1 1 2 2 2 1 1 1 ... $ sampdate : Date, format: "2000-07-18" "2000-07-18" ... $ tclass : Factor w/ 8 levels "Annelida","Arachnida",..: 1 5 5 5 5 ... $ torder : Factor
2017 Sep 22
0
Lattice stacked barplot vertical bars
Hi Luigi will this do barchart( D ~ A|E, DF, groups = C, stack = TRUE, horizontal = F, main = "Comparison of test results", xlab = "Count", col = c("yellow", "orange"), par.settings = list( strip.background = list(col="light grey"), superpose.polygon=list(col= c("yellow",
2010 Jan 24
2
different x-axes in Lattice
I use lattice package and 'barchart' to build a chart. I have a problem with setting different x-axes. Some x categories are missing but they are display and I don't want. I use scales = list(y = "free",x="free") but it works only for y-axes. Simple example: package(lattice) barchart(yield ~ variety | site, data = barley, groups = year, layout = c(1,6),
2009 Sep 16
1
changing number of axis
Hi, I trying to produce a bar chart describing hits to specific bins by chromosome for a large data set (I am asking here because experimentation with options is precluded due to this - generating the figure takes about an hour): barchart(hits~bin|chromosome, data=hits, horizontal=FALSE, origin=0, lab=c(3,10), layout=c(1,5,5), strip=strip.custom(style=3, bg="grey90",