similar to: Graphics - plotting two graphs

Displaying 20 results from an estimated 20000 matches similar to: "Graphics - plotting two graphs"

2013 Feb 25
3
How to plot 2 continous variables on double y-axis with 2 factors: ggplot2, gplot, lattice, sciplot?
Hi, I have a data set with two continous variables that I want to plot MEANS (I am not intrerested in median values) on a double-y graph. I also have 2 factors. I want the factor combinations plotted in different panes. Dummy dataset: mydata <- data.frame(factor1 = factor(rep(LETTERS[1:3], each = 40)), factor2 = factor(rep(c(1:4), each = 10)), y1 =
2008 Jul 08
1
shading an area in a edf
Hi, I've got the following edf: *** x = c(1.6,1.8,2.4,2.7,2.9,3.3,3.4,3.4,4,5.2) F2.5 <- ecdf(x) plot(F2.5, verticals= TRUE, do.p = TRUE, lwd=3, ylab = "", xlab = "", xlim = c(1,5.5)) abline(h= (0:5)*0.2) #mean abline(v=mean(x), lwd=2) mtext(text=expression(bar(x) == 3.07), side=1, adj=0.462, padj=3, cex=1) *** Now I would like to
2018 Jan 09
1
barplot_add=TRUE
Dear Gerrit Thanks a lot. "rbind" seems to be the right function. Unfortunately there is a shift in the x-axis (see pdf). There are 52 trapcatch values each, m and w, but m$trapcatch and w$trapcatch are shifted up to x-value 60. The follow-up lines for temp and humidity are fine. Thanks Sibylle setwd("~/Desktop/DatenLogger2017") # am Mac sks trap =
2011 Dec 13
1
plotting 2 Y-axes, aligning the 0 value
Hi, Being a novice to R, I would like to create a graph in R with 2 axes. One of the 2 only has positive values, the other one also has negative values. The part I'm struggling with is how to align the 2. Rather than starting to plot the data from the x axis, I would like to start plotting the positive values on the right axis only as of the 0 value on the left axis. Using a simple example
2007 Mar 22
1
Labelling a second y-axis
Hi, I am using the following code as an example function to create multiple y-axes on one plot. I have it working fine however, I can't seem to add a label on the second (right) axis. I have tried adding ylab="y2" in the axis call but, that didn't work; any ideas? Thanks, Jesse Code: function() { par(las=1,xaxs="r",mai=c(1,0.75,1,1)) x<-1:10 y1<-x
2018 Jan 09
3
barplot_add=TRUE
Dear R users aim Barplot of insect trap catches (y variable trapcatch) at one specific station (variable FiBL_Hecke) from week 1-52 ( x variable week). It works well using the function tapply (sum trapcatch per week, males and females not separated), however, I intend to separate the y variable trapcatch in males and females (variable m_w: m and w) problem I used the function "add" to
2002 Jun 11
5
Different y-axes
Hi All, I have checked everything I could find abot graphics, but still cannot solve the problem. Are there any ways to make a graph that plots two lines and two different y-axes, each of them has a scale that is related to the respective line. For example, y1 has a range 1:50 and y1 ranges 0:1. The x-axe is the same for both. Thank you in advance. --- Gregor Gawron
2006 Oct 26
1
Adding shading to background of Time series plot
Hello All, Thank you in advance. I have looked up and down in the archives to see if I could find some help on moving the polygons to the background of a ts.plot. I've tried panel.first in the gpars(...) arguments and trellis.focus, but I get errors. Am I missing something easy here? Here is my script: ts.plot(tsdjia, tstenyield, gpars = list(xlab = " ", ylab = " ",
2006 Oct 09
2
lines at margin?
Hi list, I want to add some lines at margin area of one figure. mtext could add text to these margins, can I add lines with different lty parameters? Thanks, mike [[alternative HTML version deleted]]
2000 Sep 07
3
plot with two y axes
I'm trying to make a transition from S-plus under Windows to R under Linux. My immediate aim is to produce a scatter plot with two y-axes with different scales. That can be done in S-plus with a command of the following form: guiPlot( PlotType="Scatter", DataSet="execon", Columns="years,hstart,ship", AxisType="Multiple Y" ), where years, hstart, and
2010 Jun 10
2
points marking
Hi, How to mark points on x axis of a graph keeping x axis as constant and changing y from y1 to y2 respectively. I want to highlight the area from y1 to y2. Any suggestions Thank you Jeet [[alternative HTML version deleted]]
2018 Jan 09
0
barplot_add=TRUE
Hi, Sibylle, since you write '"mathematically" add', does barplot(rbind(m$trapcatch, w$trapcatch)) do what you want (modulo layout details)? Hth -- Gerrit --------------------------------------------------------------------- Dr. Gerrit Eichner Mathematical Institute, Room 212 gerrit.eichner at math.uni-giessen.de Justus-Liebig-University Giessen Tel:
2003 Jan 20
3
Plotting w/multiple y-axes?
How do I plot using multiple(2) y-axes? I have two series that use the same x-data, but have very different scales. Appreciate any feedback, Per Bak
2010 Jul 22
5
legend in R plot
Hi all, I am have some difficulty with the legend function. I need to add a legend to describe the different line types in a plot. The legend box is small. It did not include sufficient length of each line type to help distinguish the differnt line types. Is there a way to fix this. Thank you Hannah [[alternative HTML version deleted]]
2008 Feb 27
4
plot y1 and y2 on one graph
Dear all I have a code like x<-1:10 y1<-x+runif(10)*2 y2<-seq(0,50,length.out=10)+rnorm(10)*10 par(mfrow=c(1,2)) plot(y1~x) plot(y2~x) Now I would like to plot y1 and y2 on the same graph, with its two scales (y1 on left and y2 on rigth side). Any help are welcome. Kind regards Miltinho Brazil [[alternative HTML version deleted]]
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 May 05
3
documenation for arrows() is backwards (PR#7839)
Full_Name: Michael Hoffman Version: 2.1.0 OS: Linux (Fedora Core 3, kernel 2.6.11-1.14_FC3) Submission from: (NULL) (193.62.199.8) help(arrows) says: """ arrows(x0, y0, x1, y1, length = 0.25, angle = 30, code = 2, col = par("fg"), lty = NULL, lwd = par("lwd"), xpd = NULL) ... If 'code=2' an arrowhead is drawn at
2003 Sep 29
5
colours in dotchart (PR#4343)
Problem: neither fg or bg nor color work properly in dotchart. version: R-1.7.1 for windows code which shows the errors: x <- matrix(rnorm(16),ncol=2,dimnames=list(paste("a",1:8,sep=""),c("before","afte r"))) dotchart(x,fg="blue",bg="lightgrey") dotchart(x,color=c("red","blue")) Dr Ian J Wilson Lecturer in
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,
2009 Apr 26
7
Bumps chart in R
Hi there, I would like to make a 'bumps chart' like the ones described e.g. here: http://junkcharts.typepad.com/junk_charts/bumps_chart/ Purpose: I'd like to plot the proportion of people in select countries living for less then one USD pr day in 1994 and 2004 respectively. I have already constructed a barplot - but I think a bumps chart would be better # The barplot and data