similar to: Histograms: Lines and boxes

Displaying 20 results from an estimated 5000 matches similar to: "Histograms: Lines and boxes"

2009 Jan 14
1
Histograms: Boxes and lines
Hi folks! I'm trying to get a histogram legend to give me a filled box and a line. The problem is I keep getting both filled boxes and a line. How can I get rid of the second box from the code below? x<-rnorm(1000,mean=0,sd=1) hist(x, breaks = 50, main="Histogram of x",freq=FALSE, xlab=" x", ylab="Density",col="lightblue",
2011 Mar 22
1
Problem with plot histogram
Hi R-users, I'm trying to built a plot of two series of data, but thees series result "superimposed". The R-code is like this: goal <- c(125, 143, 81, 26, 2, 3) numgoal <- 0:5 lambda <- sum(goal*numgoal)/sum(goal) plot(numgoal, goal, type="h") x <- 0:5 y<-dpois(x, lambda) att<-y*380 lines(x,att, type="h", col="red")
2007 Jun 16
1
Lines connecting the boxes in a boxplot
Hello, I'm currently using a boxplot to visualize data for three different models. As I have three models, I'm plotting three parallel boxplots for each factor. This works fine - what I need now is a line connecting the medians of each boxplot of each model. I want to do this in order to visualize the trend that one of the models exhibit. Basically, I want to plot a curve for each model
2006 May 10
2
Legend titles in log plots broken? (ver. 2.2.1)
Legend titles work in linear plots: curve(1/x, xlim = c(0, 1)) legend(x = 'topright', inset = 0.04, legend = '1/x', lty = 1, title = 'Legend Title') But when you change to a log plot on either dimension things get screwy: curve(1/x, xlim = c(0, 1), log = 'y') legend(x = 'topright', inset = 0.04, legend = '1/x', lty = 1,
2014 Mar 19
3
Leyenda gráficos
Hola, ¿hay alguna forma de colocar la leyenda de un gráfico sin que se superponga con las barras de mi gráfico? Os dejo mi ejemplo para que me entendáis: ## dado_1<-sample(1:6,1200,replace=T)dado_2<-sample(1:6,1200,replace=T)dado_3<-sample(1:6,1200,replace=T) dados<-matrix(c(table(dado_1),table(dado_2),table(dado_3)),6) barplot(t(dados),beside=TRUE,ylab="Frecuencias
2013 May 27
1
Plot histograms in a loop
Hi, Try either: set.seed(28) stats1<- as.data.frame(matrix(rnorm(5*10000),ncol=5)) pdf(paste("test",1,".pdf",sep="")) par(mfrow=c(2,1)) lst1<- lapply(names(stats1),function(i) {hist(stats1[,i],100,col="lightblue",main=paste0("Histogram of ",i),xlab=i );qqnorm(stats1[,i])}) dev.off() #or
2008 Jul 02
1
Multiple time series plots
Hi all: I'm trying to plot two time series created in Rmetrics and label the x-axis with dates. I tried the following: dates <- as.Date(seriesPositions(x.agg)) r <- as.Date(range(dates)) ts.plot(x.agg@Data[,c(1,5)],gpars=list(ylab="Volume", lty=c(1:2),xaxt="n",main="Plot of Volume")) axis.Date(1, at=seq(r[1], r[2], length.out=10),
2012 Feb 24
1
Telling plot() the max y value to expect when plotting one distribution and then using lines() to add more distributions
I am plotting three Pearson Type IV distributions. It looks like I have to plot the distribution with the highest value of y and then use lines() to add the two distributions that are shorter / have lower max values of y. The following code figures out which distribution has the max y value, plots it first and then uses lines for the other two distributions with a series of three if statements.
2012 Feb 16
2
Legend vanishes when placed outside the graph
Hello everyone, i’ve got a problem with my diagram’s legend. I know i should be able to figure it out by reading the ‘plot’ and ‘legend’ reference. However nothing works so it would be kind if anyone could point me to the necessary parameters. The problem is that i’m moving the legend using the ‘inset’-parameter so it does not overlap with the graph. However it vanishes outside the graph, so
2011 Nov 24
1
Legend
Hi everyone. I have a linear regression where I retrieve the R2 like this: r2 = sprintf('%4.2f %s',(summary(reg1)$r.squared)) In my figure I have a legend where I would like to add that R2 value to the legend text. Something like: My text R^2 = r2 legend('topright', inset = .05, title='light ratios', pch = c(21), c(paste('Green/Red', R^2, '=', r2)),
2008 Dec 05
1
Trouble with gridBase and inset plots
Dear All, I ma having a trouble in generating a figure containing 3 insets with the gridBase package. I always get an error message of the kind: Error in gridPLT() : Figure region too small and/or viewport too large No matter which parameters I choose. The plots works nicely with two insets only, but when I try adding the third one, my troubles begin. I am probably doing something wrong in the
2008 Mar 20
4
little subplot in corner
I want to draw a little subplot ("overview") into my detailed plot. It should be placed in say the top right corner and have the size of some legend (like legend(x="topright", inset=0.03, ...) #main plot plot(rnorm(100)) #give little density in corner plot(seq(-2,2,length=300),dnorm(seq(-2,2,length=300)),type="l") I don't want something like par(mfrow=c(1,2)) as
2010 Jan 13
3
Ask for histogram
Hi, I use a vector of data to draw the histogram, but it is different from the graph by SAS. Can you check it for me please? b is a column vector of 4332 hist(b,probability=T,breaks=30,col='lightblue',ylim=c(0,1)) rug(b) When I used rug, I find the records are smaller than 4332. I don't know where I did wrong. Thanks. -- Yi Du [[alternative HTML version deleted]]
2011 Jun 15
1
Error bars
Hi, Can anyone help with plotting vertical error bars on a bar graph. I have tried following examples online and in the big R book and writing my own function but I have been unsuccessful and don’t really have an understanding of what it is I am doing. I have calculated my standard errors so basically just need to draw the bars on the graph but just don’t have a clue!!! I don’t even know what
2008 Jun 18
1
Histogram inset into another histogram
Dear R users and helpers, I'm trying to find an example of a histogram plot as an inset (upper right or left corner) of another histogram. Anyone has an example of that? Thanks for your help, V?ctor. -- ----------------------------------------------------------------------- V?ctor Homar Santaner Grup de Meteorologia Edif. Mateu Orfila Tel: +34 971 17 1376
2018 Apr 06
1
Fast tau-estimator line does not appear on the plot
R-experts, I have fitted many different lines. The fast-tau estimator (yellow line) seems strange to me?because this yellow line is not at all in agreement with the other lines (reverse slope, I mean the yellow line has a positive slope and the other ones have negative slope). Is there something wrong in my R code ? Is it because the Y variable is 1 vector and should be a matrix ? Here is the
2018 Apr 07
0
Fast tau-estimator line does not appear on the plot
You need to pay attention to the documentation more closely. If you don't know what something means, that is usually a signal that you need to study more... in this case about the difference between an input variable and a design (model) matrix. This is a concept from the standard linear algebra formulation for regression equations. (Note that I have never used RobPer, nor do I regularly
2012 Mar 25
1
Accessing more than two coefficients in a plot
I've successfully plotted (in the plot and abline code below) a simple regression of Lambda1_2 on VV1_2. I then successfully regressed Lambda1_2 on VV1_2, VV1_22 and VV1_212 producing lm2.l. When I go to plot lm2.l using abline I get the warning: "1: In abline(lm2.l, col = "brown", lty = "dotted", lwd = 2) : only using the first two of 4 regression coefficients"
2009 May 06
1
Positioning a legend via X and Y coordinates
Dear R Users, I'm able to display a legend using the following code: > legend("topright", c("Simulation", "Observation"), fill=2:3, bty="n") However, this causes the legend to be positioned too close to the bars in my barplot. I'd like to move the legend up slightly. I have been trying to determine the necessary values by trial and error to do
2012 Feb 16
2
Multiple line-plot
Ein eingebundener Text mit undefiniertem Zeichensatz wurde abgetrennt. Name: nicht verf?gbar URL: <https://stat.ethz.ch/pipermail/r-help/attachments/20120216/6192b6e7/attachment.pl>