similar to: legends in barplots of factors

Displaying 20 results from an estimated 20000 matches similar to: "legends in barplots of factors"

2002 Nov 12
4
trouble positioning legends on barplot written to a file
I'm trying to generate some plots for print publication and I'm having trouble getting them the way I want. I get a plot with a legend that overlaps the bars and looks bad. Also, I'm saving this as PDF file (whatever happened to the "png" function to save as PNG format, in r 1.4.1?) I've tried a number of things, which produce a number of questions. 1) it seems that the
2003 Nov 16
1
Legend position in barplots
Hello! Is there a way to change the position of the legend created in a barplot from the right side of the plot to the left side or somewhere else? Thanks Dipl.-Kfm. Andreas Lackner Universität Göttingen Institut für Wirtschaftsinformatik, Abtl. I Prof. Dr. Jörg Biethahn Platz der Göttinger Sieben 5 37073 Göttingen Zimmer: 1709, Spr.-Std: Di. 10-11 Tel:
2011 Jul 01
1
Reverse legend label order in barplot
Hi list, I've thus far not found a solution to my problem and hope someone can help. I have a data matrix and wish to plot a stacked bar plot using barplot(). This is simple enough, but I have a problem with the legend labels being in the reverse order from what I want. The default appears to have labels ascending bottom-to-top reflecting bottom-to-top sub-bars, but I would like the
2005 Jul 04
1
Rotate legends or other approaches to nice legend placement?
I'm sure this general sort of question has been asked many times before - I would _like_ automatic and sensible legend placement in barplots so data is not overwritten... but since there doesn't seem to be one, one of the following would be useful: One approach for this would be to place the legend to the right of the graph, and rotate it by 90 degrees. Is there a sensible way to do
2006 Oct 13
3
Barplot legend position
Dear useRs, I'm trying to create a barplot like so: x=matrix(1:10,2,5) barplot(x,leg=c("left","right"),besid=T) The legend is placed in default position topright, however the data are plotted there too. I tried controlling the legend position by adding x="topleft" but this results in an error that x matches multiple formal arguments. Leaving out the legend
2013 Jan 31
2
Help with multiple barplots
Hello: I need to create a six barplots from data that looks pretty close to what appears below. There are two grouping variables (age and gender) and three dependent variables for each grouping variables. I'm not really familiar with trellis graphics, perhaps there is something that can do what I need there, i don't know. The thing is: I *need* these to appear on one row, with some way
2004 Nov 03
4
Legend placement in barplot?
This has been asked before, but all the answers are hidiously complex. The legend.text=TRUE option of barplot is almost exactly what I need, except I need a legend.placement='tl' (top left) option. This option would be in contrast to the default placement which we could call 'tr' (top right). Anyone know how to edit the barplot code to make this change? Could someone like me
2011 Mar 20
1
legend position in "barplot"
Hi, R users, I there a way that I can control the position of the legend while using "barplot" function? For example: a<-matrix(c(0,0,0.5,0.8,0.9,0.9),2,3) colnames(a)<-c("X","Y","Z") rownames(a)<-c("A","B") a barplot(a,width = 0.2,legend = TRUE,axes=FALSE,col=c("coral3","steelblue3"),beside=TRUE) In this
2005 Apr 18
3
Barplot and colors for legend
Hi all! One quick question: How do I get the standard colors used by barplot? I have some stacked bars and would like to add a horizontal legend via legend() but I don't know how to find the colors for the fills of the legend points. Thanks! Werner
2003 Mar 21
1
barplot legend size
Dear R-people, are there any way to change the size of legend in barplot? I have tried various versions of cex, both as par(cex.*= ) and barplot(..., cex.*= ). So long without success. Sincerely, Ott > version _ platform i686-pc-linux-gnu arch i686 os linux-gnu system i686, linux-gnu status major 1
2010 Mar 10
2
Placing the legend 'dynamically'
Hello, does anybody know which command to consider when I'm trying to plot a stacked barplot with a legend at the most empty portion of the graphic? I've searched for it, and somebody stated to use the labcurve-command, but I don't know how to produce stacked barplots with it. Is there any possibility to plot a legend box "dynamically" (= in an empty region) with the
2005 Aug 24
2
Remove NAs from Barplot
Dear List: I'm creating a series of barplots using Sweave that must assume a standard format. This is student achievement data and the x-axis must include all grades 3 to 8. In some cases, the data for a grade (or more than one grade) are missing in the vector math.bar, but are never missing for the vector apmxpmeet. The following sample code illustrates the issue. Using the code below to
2012 Jul 30
2
barplot question
Dear r-help members. I would like to: a) control the margin around my legend box. Unfortunately I did not find an appropriate command under "?legend". The margin around the actual legend is way too wide. There is a lot of unnecessary "empty space" on the right side. b) increase the width of the individual barplots. I saw that this can be obtained with the command
2012 Jun 13
2
adjust space between horizontal legend text in a barplot
Hi All, I produced a barplot and made a horizontal legend below the graph. Because the results are from a survey, there are three levels, namely strongly disagree/disagree, neutral and strongly agree/agree. > rownames(survey)[1] "Strongly disagree/disagree" "Neutral" "Strongly agree/agree" As in the output above, there is a large space
2006 Dec 01
3
Make many barplot into one plot
Dear all, ## I have 4 tables like this: satu <- array(c(5,15,20,68,29,54,84,119), dim=c(2,4), dimnames=list(c("Negative", "Positive"), c("Black", "Brown", "Red", "Blond"))) dua <- array(c(50,105,30,8,29,25,84,9), dim=c(2,4), dimnames=list(c("Negative", "Positive"),
2002 Feb 19
1
Smoothed lines over barplots
Greetings. I'd like to generate a graph that displays two distributions as side-by-side bar graphs, then plots a smoothed line of the distribution on top. The idea is to be able to visually compare the distributions. I've done the following, but the axes don't line up. Any suggestions? barplot(table(hcd.df$datecat, hcd.df$auth.sum), beside=TRUE,
2005 Aug 29
1
ylim for graphic
Dear list: I have some data for which I am generating a series of barplots for percentages. One issue that I am dealing with is that I am trying to get the legend to print in a fixed location for each chart generated by the data. Because these charts are being created in a loop, with different data, my code searches the data to identify the maximum value in the data and then print the data values
2008 Dec 19
1
diagonal lines in legends of ggplot2
Hi, I have the following problem with ggplot2: When I specify black contours for bars in a barplot, ggplot automatically shows diagonal lines in the legend boxes. Is there a way, to remove these diagonal lines? Here's a simple example: library(ggplot2) df<-data.frame(x=gl(6,1),y=rnorm(6,100,50)) ggplot(df,aes(y=y,x=x,fill=x))+geom_bar(aes(group=x),colour='black',size=1)+
2010 Sep 01
2
Legend with fill = gray ?
Hi, I am facing a problem with the legend, I don?t know how to use the fill option in the legend in order to achieve the same standard gray levels that are plotted. Sorry for this easy one, but I really did not find anything so far. It works fine with color: ###### C O L O R mat <- matrix(2,3,rep(2,6)) rownames(mat)<-c("A","B","C") par(xpd=T,
2017 Nov 20
0
Σχετ: change colour in barplot
On 20/11/2017 7:09 AM, Maria Lathouri wrote: > Dear all, > > I am really sorry for this. I have attached the script and a .csv file > with an example. The problem is that you have dat as a matrix with only one row. barplot() applies the colours to the rows of dat; since you have only one row, everything ends up blue. You can fix this by creating dat as a vector using