similar to: R graphic help

Displaying 20 results from an estimated 4000 matches similar to: "R graphic help"

2012 Feb 03
1
incomplete final line found on <name of my sourced function file>
Dear R-ers, I hope there is a really simple solution to my problem. I've written a function that I saved in an .r file. I source this file in my code. For a while it worked fine. But then when I run the line: source("F mylineplot.r") I started getting a warning: In readLines(file) : incomplete final line found on 'F mylineplot.r' I have no idea why - I tried to check and
2013 May 18
3
bar plot with non-zero starting level
Hi, I want to plot grouped bars to compare 95% confidence interval estimates from two models. Each bar represents a 95% confidence interval estimate of a coefficient from one of the two models. Each group represents confidence interval estimates of the same coefficient from the two models. I think such a bar plot will nicely present whether 95% confidence interval estimates of the same
2010 Apr 04
4
ggplot2 geom_rect(): What am I missing here
Hi R fans, As a newbie following the five-hour rule (after hitting my head against the wall for five hours, post to this list), I am appealing for some help understanding geom_rect() in ggplot2. What I want to do is very simple. I want to generate a plot of rectangles. Each one represents a business cycle. The x-values will be pairs representing the start and end of each cycle. The y-values
2008 Jul 29
4
Graphics function question
Hello I have created a graph using the following commands: <<< startBReP3O1T <- diffs$BReP3O1T - diffs$diff_BReP3O1T endBReP3O1T <- diffs$BReP3O1T x <- seq(47,89, length = 10) ymin <- min(min(startBReP3O1T), min(endBReP3O1T)) ymax <- max(max(startBReP3O1T), max(endBReP3O1T)) y <- seq(ymin, ymax, length = 10) plot(x,y, type = 'n', xlab = 'Age', ylab =
2003 Sep 17
1
plot.hclust: dendrogram too large for window (PR#4197)
plot.hclust: Setting up a window for a dendrogram assumes the first link is the shortest and the last is the longest. This is not always the case when the clustering was done with hclust, method="median" or method="centroid", and the dendrogram sometimes doesn't fit within the window. I propose the fix listed below. src/main/ --- plot.c Wed Sep 17 01:03:39 2003 +++
2009 Aug 06
2
Ylim
Hello All: Can anybody tell me what is the problem with my program please. I have an error message as appears below. My program is: ifn <- "Jul08_09.LM" data <- read.table(ifn) ofn <- "Jul.png" bitmap(ofn, type = "png256", width = 30, height = 30, pointsize = 30, bg = "white",res=50) par(mar=c(5, 5, 3, 2),lwd=5)
2010 Nov 04
5
ggplot output
Dear All, I have this script: dat <- data.frame(Month = hstat$Date,C_avg = hstat$C.avg,C_stdev = hstat$C.stdev) ggplot(data = dat, aes(x = Month, y = C_avg, ymin = C_avg - C_stdev, ymax = C_avg + C_stdev)) + geom_point() + geom_line() + geom_errorbar() dat <- data.frame(Month = hstat$Date,K_avg = hstat$K.avg,K_stdev = hstat$K.stdev) ggplot(data = dat, aes(x = Month, y = K_avg,
2008 Jul 30
1
read XML
I have a xml exported by Manifold GIS but I'm not being able to import it into R using XLM package. The file have this structure: <?xml version="1.0" encoding="UTF-8" ?> - <layout> <name>Layout 2</name> <pagesByX>1</pagesByX> <pagesByY>1</pagesByY> - <elements> <legend
2012 Jul 26
2
Error Bars ggplot2
Hello, I'm attempting to plot error bars side by side rather than stacked on top of each other with ggplot2. Here is the sample code I am using: #Code #Data spd<-c("s","f","f","s","f","s","s","s","f","f","s","f") r<-c(4.9,3.2,2.1,.2,3.8,6.4,7.5,1.7,3.4,4.1,2.2,5)
2001 Feb 28
1
Spider diagrams
Hi, I am trying to create what are called "spider diagrams" in the geochemical literature using R. A spider diagram is basically a plot of the atomic number versus the concentration on a log scale. Lines are drawn from each atomic number for each sample. Right now, my data frame looks like: SAMPLE SITE V3 LA.NASC LAATNUM CE.NASC CEATMNUM 1 1A:001
2013 Feb 03
1
ggplot2 plotting errorbars.
Hi, i'm using this lines of code: dodge <-position_dodge(width=0.9) ggplot(dfm,aes(x = X,y = value)) + geom_bar(aes(fill = variable), position=dodge, stat="identity") + geom_errorbar(aes(ymin=value-er, ymax=value+er),width=0.25, position=dodge,stat="identity") to plot this data frame X variable value er 1 A X4 58.74 9.44 2 B X4
2011 Jan 24
1
ggplot2 - ribbon
Dear List, I am having trouble setting the transparency of a ribbon in ggplot2 and was wondering if anybody had any suggestions so far i have a plot exactly as i want it and i want to add a ribbon connecting the ymax and ymin, whci i do with the following command m10 + stat_summary(geom="ribbon", fun.ymin="min", fun.ymax="max") However the ribbon is a dark grey
2011 Jul 01
1
highlighting clusters in a heatmap
I would like to draw horizontal or vertical lines on a heatmap to highlight the clusters at some specified cut depth of the dendrogram. As a hacked example, the following code would work if I could set the coordinates of the top and bottom of the false color image correctly (ymin and ymax), but the correct values seem to depend on the output device and its size. I realize that heatmaps use a 2x2
2010 Jun 15
2
Unspecified [upper] xlim/ylim?
Greetings! I would like to be able to specify a fixed (say) lower limit for plotting, while leaving the upper limit "floating, when plotting. The context is that the maximum in the data to be plotted is unpredictable, being the consequence of a simulation, whereas I know that it cannot be less than (say) 0; and I want to fix the lower limit at 0 in any plot, leaving the upper limit to be
2023 Aug 12
2
geom_smooth
Colleagues, Here is my reproducible code for a graph using geom_smooth set.seed(55) scatter_data <- tibble(x_var = runif(100, min = 0, max = 25) ?????????????????????? ,y_var = log2(x_var) + rnorm(100)) library(ggplot2) library(cowplot) ggplot(scatter_data,aes(x=x_var,y=y_var))+ ? geom_point()+ ? geom_smooth(se=TRUE,fill="blue",color="black",linetype="dashed")+
2010 May 30
2
geom_ribbon removes missing values
Hi everyone, it looks like geom_ribbon removes missing values and plots a single ribbon over the whole interval of x values. However, I'd rather want it to act like geom_line, that is, interrupt the ribbon for the interval of missing values and continue once there are new values. Here's an example: library(ggplot2) df <- data.frame( date = seq(from = as.Date("2010-05-15"),
2013 May 14
1
Tamaño plots y calidad en grafico ggplot
Hola a tod en s, bueno, un poco al hilo de un mensaje anterior, reformulo la pregunta y pongo código completamente reproducible, a ver si hay más suerte. Estoy con un informe y hay que hacer algunos gráficos con datos diferentes con ggplot2, y hay que poner el mismo tamaño para todos ellos. El problema es que R cambia automáticamente el tamaño del área de trazado y el margen en función de
2013 Mar 06
6
Ggplot2: Moving legend, change fill and removal of space between plots when using grid.arrange() possible use of facet_grid?
Hi, # For publications, I am not allowed to repeat the axes. I have tried to remove the axes using: # yaxt="n", but it did not work. I have not understood how to do this in ggplot2. Can you help me? # I also do not want loads of space between the graphs (see below script with Dummy Data). # If I could make it look like the examples on the (nice) examples page: #
2009 Oct 09
2
plot the same types of graphics on the same R graphic device
Hi, How to plot the same types of graphics on the same R graphic device? Suppose that we want to plot a vector y against x (using plot for instance). How is it possible to plot y against x for different values of these two vectors on the same device so that the plots could be compared? Cheers, Carol [[alternative HTML version deleted]]
2020 Oct 23
2
How to shade area between lines in ggplot2
Thank you, but this split the area into two and distorts the shape of the plot. (compared to ``` p + geom_abline(slope = slope_1, intercept = intercept_1 - 1/w[2], linetype = "dashed", col = "royalblue") + geom_abline(slope = slope_1, intercept = intercept_1 + 1/w[2], linetype = "dashed", col = "royalblue") ``` Why there