similar to: RColorBrewer

Displaying 20 results from an estimated 10000 matches similar to: "RColorBrewer"

2008 Jul 02
2
position legend below x-axis title
Dear helpers, I'm using a R script on several different datasets, which makes that axis scales may vary quite a lot from dataset to dataset. So what I'm looking for now, is how to automagically find out how to position the legend (horizontal) in the space below the x-axis title, and how to make sure that the legend is within the limits of the lower inner or outer margin? I'm aware of
2004 Apr 19
1
barplot fill patterns
Dear R-helpers, I will like to know if there is a way to generate a stacked column graph using both patterns and colors to fill the bars. I have many categories for the number of color available in R, so I will like R to start with solid colors and then use patterns an colors. I have been using barplot and some code that I found in the archives, but I am still having bars with the
2016 Oct 25
2
Colores en names.arg de un barplot()
Gracias, Javier. Está muy bueno el post, pero en efecto refiere a legend y no a los names.arg Adjunto un archivo para poder correr el gráfico. Creo que eso ayuda a precisar el problema. Las etiquetas que aparecen al costado izquierdo de las barras son las que quiere pintar de negro y azul. También va a necesitar este objeto para que la sintaxis corra sin errores: library(RColorBrewer) #Para
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 Oct 03
5
error bars on line plot with error bars using ggplot
I'm new to this and struggling away with ggplot. I need to plot some line graphs for about 4 series. I have the values to plot and also the value of the standard error of the value. Is it possible to plot the standard error bars when the value are already calculated as opposed to letting R do the analysis to calculate the SE bars? Any simple example would be most appreciated. Thanks J
2016 Oct 25
2
Colores en names.arg de un barplot()
Hola. Tengo un gráfico que tiene muchos names.arg (demasiados...), de modo tal que le vendría bien al lector usar colores intercalados, tal que el primero sea azul, el segundo negro, el tercero azul, cuarto negro, y así. Es decir, definir un vector "similar" a este: rep(c("black", "blue"), length(barras[,1]/2) que permita pintar uno y uno en este gráfico:
2010 Aug 30
3
Putting legend *outside* plotting area
Is there a simple way to put a legend outside the plot area for a simple plot? I found... (at http://www.harding.edu/fmccown/R/) # Expand right side of clipping rect to make room for the legend *par(xpd=T, mar=par()$mar+c(0,0,0,4))* # Graph autos (transposing the matrix) using heat colors, # put 10% of the space between each bar, and make labels # smaller with horizontal y-axis labels
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
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
2009 Nov 30
1
Plotting color.legend() outside of plot region
Dear List, I am trying to plot a color.legend() in the right outer margin of my device region. I have read multiple threads on the subject and still can't get it right. I have stolen an example from one of the threads to demonstrate my problem. I have extended the outer margin using par(oma()), and have used par(xpd=NA) to tell it to plot in the device region. I can get the legend to plot
2016 Apr 25
2
ylim in barplot()
Dear useRs, I'm having troubles with using ylim in barplot(): even though I reduce the y-scale using ylim, the bars still extend down to 0into the x-labels. The sample data is below, and here is the code. #This works fine but I would like to plot only from 50 to 70: barplot(t(mydata), beside=TRUE, col=c("orange", "green", "yellow", "purple"),
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,
2010 Jan 20
2
legend in multiple plot
Dear R users, I'm making multiple plots within the same pdf page (par(mfcol = c(5,1)), and want a legend for this at the bottom of all the plots. From previous mails it has been suggested to use par(xpd=TRUE), increase the margin at the last plot, and then draw the legend. However, when I do this, the last plot gets smaller with the same amount I increase the margin with. The problem seems to
2009 Jul 29
1
Drawing lines in margins
Hi all, Quick question: What function can I use to draw a line in the margin of a plot? segments() and lines() both stop at the margin. In case the answer depends on exactly what I'm trying to do, see below. I'm using R v. 2.8.1 on Windows XP. Cheers, Alan I'm trying to make a horizontal barplot with a column of numbers on the right side. I'd like to put a line between the
2010 Jan 12
1
barplot: border color when stacked
Dear R-users, I am using R version 2.10.1 under windows. In a barplot, I want to mark one of the bars with a special border color. For example: barplot(c(3, 7, 11), border = c(NA, "red", NA)) But how to do this when the bars are stacked? for example: barplot(matrix(1:6, ncol=3)) # border of second bar (i.e. the one with total height = 7) should be red again, I try: barplot(matrix(1:6,
2016 Apr 25
0
ylim in barplot()
If you are using a Windows system, you can Export the plot from RStudio and save it as a metafile without using package devEMF and it will crop the bars with xpd=FALSE. When I used devEMF on a Windows machine, the bars were not cropped with barplot() as you indicated, but when I switched to plotrix::barp() they were cropped. The arguments are a bit different, but I did not need xpd=FALSE:
2016 Apr 26
1
ylim in barplot()
Thank you David, That's a nice workaround using plotrix::barp(), but that doesn't explain why ylim doesn't work as intended (or at least, as I expect it to work), or why xpd has no influence when using devEMF::emf()... The problem with saving directly in RStudio is that it requires to manually save the plot, and this becomes troublesome when there are a lot of plot commands in a
2009 Dec 15
2
Diagonal Labels on "Beside" Bars in Barplot
My question is based on an example provided in the following: Referencing: Statistics with R Vincent Zoonekynd <zoonek at math.jussieu.fr> 6th January 2007 URL: http://zoonek2.free.fr/UNIX/48_R/all.html data(HairEyeColor) a <- as.table( apply(HairEyeColor, c(1,2), sum) ) # Provided Example barplot(a, beside = TRUE, legend.text = attr(a, "dimnames")$Hair) # I
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
2007 Aug 07
11
Positioning text in top left corner of plot
Simple question how can you position text in the top left hand corner of a plot? I am plotting multiple plots using par(mfrow=c(2,3)) and all I want to do is label these plots a), b), c) etc. I have been fiddling around with both text and mtext but without much luck. text is fine but each plot has a different scale on the axis and so this makes it problematic. What is the best way to do this?