similar to: two plots super-impose

Displaying 20 results from an estimated 10000 matches similar to: "two plots super-impose"

2006 Oct 13
1
side by side plot of Histogram and densityplot
Using "par" seems easily put a "hist" and a density side by side on the same output window. I would like to use some features in "histogram" from Lattice, but how can I put "histogram" and "densityplot" side by side on the same graph? Thank you par(mfrow=c(2,1)) hist(y) plot(density(y)) Jue Wang, Biostatistician Contracted Position for
2005 Jan 14
2
Help in Overlaying of 2 Plots on the same Device.
I'm trying to overlay a density plot on a previously plotted histogram. However, i need to use the same axis as of the 1st(histogram) plot to plot the second. My second plot is creating its own axis and causing my plot to extend the entire histogram instead of getting a subplot on a portion of the histogram. I tried 'fig' and 'new' parameters with no luck. Thanks in advance.
2007 Jan 14
4
Controlling size of boxplot when it is added in a plot
Greetings, I am trying to add a boxplot to the bottom of a histogram, right between the histogram bars and the x axis. Here is the code I am using at the moment (the par line is probably not relevant for our discussion): hs <- hist(x, breaks = 20, plot = F) par(mar = c(3,3,2,1)) hist(x, breaks = 20, main = NULL, ylim = c(-2, max(hs$counts))) boxplot(x, horizontal = T, axes = T, add =
2016 Mar 15
2
[FORGED] Different results based on the order of arguments to par
Paul, I was trying to make a minimal self contained example, but I guess I went too far on the minimizing. The original problem came from code more like: library(TeachingDemos) hist(rexp(1000), main='') abline( v=1, col='red') sp.par <- subplot(hist(rnorm(100), main=''), x='topright') op <- par(sp.par[c('usr', 'plt')]) abline(v=0,
2006 Oct 12
1
Arrange histogram
The data set has a number of variables each of which is classified into two groups. For each variable of each group, I need to create a histogram. All the histograms are to be lined up into a file that looks like group1 group2 Variable 1 Histogram histogram Variable 2 Histogram histogram ........................... Can you give me a hint as to what
2016 Mar 14
2
Different results based on the order of arguments to par
I ran into this issue when trying to modify a subplot (subplot function in the TeachingDemos package), but here is a more minimal example of the issue (I don't know that it is serious enough to call a bug): This code works how I expect: dev.new() hist(rexp(100)) par(plt=c(0.5,0.9,0.5,0.77), usr=c(0,1,0,1)) box() # show new plt region points(c(0,1), c(0,1), pch=16, col='red', cex=3)
2008 Mar 27
1
histogram for integer data
hi, library(lattice) x<-c(-1,-1,-1,0,0,0,0,1,1,2) rng<-range(x) histogram(x,endpoints=c(rng[1]-0.5,rng[2]+0.5),nint=length(unique(x))) instead of contiguous bins, i'd like spaces between them to indicate that the data is discrete, or even better, line segments positioned at integer values. i know how to do this with plot, but i need it with histogram, so that in more complicated
2006 Jan 05
4
Q: R 2.2.1: Memory Management Issues?
Dear Developers: I have a question about memory management in R 2.2.1 and am wondering if you would be kind enough to help me understand what is going on. (It has been a few years since I have done software development on Windows, so I apologize in advance if these are easy questions.) ------------- MY SYSTEM ------------- I am currently using R (version 2.2.1) on a PC running Windows 2000
2005 May 23
2
Trouble with drplot
Hi, I am a newbie with R, so I hope my question isn't too stupid. I am trying to generate dose-response curves using the "drfit" package. I have formatted my CSV files to the correct format, and have no trouble running drfit to get a summary of my data. The problem is that when I try to use "drplot" to graph my data I get an error. The message is: Error in
2006 Mar 08
5
data import problem
Dear All, I'm trying to read a text data file that contains several records separated by a blank line. Each record starts with a row that contains it's ID and the number of rows for the records (two columns), then the data table itself, e.g. 123 5 89.1791 1.1024 90.5735 1.1024 92.5666 1.1024 95.0725 1.1024 101.2070 1.1024 321 3 60.1601 1.1024 64.8023 1.1024 70.0593
2006 Sep 15
3
graphics and 'layout' question
Hello, I got stuck with a graphics question: I've 3 figures that I present on a single page (window) via 'layout'. The layout is layout(matrix(c(1,1,2,3), 2, 2, byrow=TRUE)); so that the frst plot spans the both columns in row one. Now I'd like to magnify the fist figure so that it takes 20% more vertical space (i.e. more space for the y-axis). How would I do this in R?
2006 Sep 29
3
if then else
What is the correct form to write statement meaning: if (a==1) {b=2; c=3}; else {b=0; c=0}; Thank you Jue Wang, Biostatistician Contracted Position for Preclinical & Research Biostatistics PrO Unlimited (908) 231-3022
2005 Jul 21
4
RandomForest question
Hello, I'm trying to find out the optimal number of splits (mtry parameter) for a randomForest classification. The classification is binary and there are 32 explanatory variables (mostly factors with each up to 4 levels but also some numeric variables) and 575 cases. I've seen that although there are only 32 explanatory variables the best classification performance is reached when
2007 Jul 13
1
Subplot.
Hello All, I wanted to do many plots (in my case, wanted to get 6 histograms) on the same figure. Is there a method in R that analogous to 'subplot' in MATLAB? Any help will be very much appreciated. thanks, Suman [[alternative HTML version deleted]]
2010 Nov 23
2
overlay histograms on map at map coordinates
Hi all, I'm trying to visualize animal movement data characteristics spatiotemporally by overlaying many different histograms on a map. I want the histograms to be plotted at coordinates in the map that matches a region they describe. If I was just doing this once, I'd fiddle in Illustrator after R and avoid the headache. But I'll be doing it many many times so it seems
2006 Nov 01
4
splitting very long character string
Hello, I've a very long character array (>500k characters) that need to split by '\n' resulting in an array of about 60k numbers. The help on strsplit says to use perl=TRUE to get better formance, but still it takes several minutes to split this string. The massive string is the return value of a call to xmlElementsByTagName from the XML library and looks like this: ... 12345
2005 Mar 31
2
pictex graphics device and color
Is the pictex graphics device known not to support color? In R 2.0.1 Patched (2004-11-17), it produced very pretty output: ## pictex(file = "modern-metatheonomy.tex", bg = "transparent"); ## plotData(data); ## dev.off() ... but it appears to have ignored all color information. __________ Steve Rowley <steve.rowley at sanofi-aventis.com> Cambridge, MA: (617) 768-4054
2007 Sep 05
1
question: randomization t-test function already defined in R?
Dear R Users, I am hoping you can help me. I have received code from a colleague who uses Matlab. I need to translate it into R. I am wondering if there is a randomization t-test (from non-parametric statistics) function already defined in R. (In Matlab the function is randtest.m.) ************************************************************************ ********** QUESTION: Is anyone
2010 Sep 21
5
Combined plot: Scatter + density plot
Hi, in order to save space for a publication, it would be nice to have a combined scatter and density plot similar to what is shows on http://addictedtor.free.fr/graphiques/RGraphGallery.php?graph=78 I wonder if anybody perhaps has already developed code for this and is willing to share. This is the reproducible code for the histogram version obtained from the site: def.par <-
2007 Nov 02
2
add histograms or distributions on regression line
hello, does anyone know how to add histograms or distributions on regression like just like quantiles regression in RGraphGallery below, a very delicate codes. Thanks alot. http://addictedtor.free.fr/graphiques/RGraphGallery.php?graph=109