Displaying 20 results from an estimated 10000 matches similar to: "Breaks in y-axis of histogram using lattice"
2009 Feb 08
5
glmmBUGS: logistic regression on proportional data
Hello,
I am trying to run a logistic regression with random effects on
proportional data in glmmBUGS. I am a newcomer to this package, and
wondered if anyone could help me specify the model correctly.
I am trying to specify the response variable, /yseed/, as # of successes
out of total observations... but I suspect that given the error below,
that is not correct. Also, Newsect should be a
2011 Feb 10
2
Calling symbols from dataframe for xyplot
Hello,
I am trying to make a xyplot plot with points that are different symbols. I want to call the symbol type (pch) from a column in my dataframe. Here is a simplified example. In my real example I also have groups, which I have not included here. This example doesn't change the symbols or colors.
Any help you can provide would be appreciated.
Thanks,
John
x<-c(1:12)
2008 Jul 10
2
xYplot customizing y-axis scaling
Dear list,
using the packages Hmisc and lattice i produced some nice xYplots. However,
since the data range of the conditioning variable is very big, i need to
define more than one y-scale for the plot (in some panels you just see a
flat line of data points very close to the x-axis), e.g. different y-axis
scales for the different rows of the plot.
Is there a way to do so?
Thanks,
Henning
2004 Jul 01
2
y-axis of lattice panels not printing to paper
Greetings,
I am printing lattice plots from the R-interface to a printer, and although the y-axes of the left-most panels are visable on the screen, they are not present on the paper when there are multiple panels (ie, >1).
For example:
trellis.device(bg='white')
histogram(~dbh, data=diameter.df)
###print to a printer from the R-interface by clicking the print button on the
2007 Mar 08
2
Using logarithmic y-axis (density) in a histogram
Hi,
I am searching for a possibility to display a logarithimic y-axis in a histogram. With plot that's easy (e.g.
plot(1:10, log="y")
but for histograms this does not work the same way: I tried
hist(rnorm(1000), freq=FALSE, seq(-4, 4, .5), ylim=c(0.001, 0.5), log="y")
Which gives the expected histogram but also warnings for my log="y" command
2008 Oct 08
2
Histogram colours in lattice.
I am trying to do a histogram lattice plot and I would like the
histogram to be filled with a different colour in each panel.
Note: I want every bar in each histogram to be the same colour,
but that there should be different colours *between* histograms.
Can't seem to get this to work. I thought that something like
the following would be a goer:
set.seed(42)
X <- rnorm(200)
A <-
2009 May 12
1
lattice histogram for multiple variables : adjusting x axis
Hello all,
I have a large data frame and I want to look at the distribution of each variable very quickly by plotting an individual histogram for each variable.
I'd like to do so using lattice.
Here is a small example using the iris data set:
histogram(as.formula(paste("~",paste(colnames(iris[,!sapply(iris,is.factor)]),collapse="+"))),data=iris[,!sapply(iris,is.factor)])
2009 Apr 02
1
Histogram with lattice with two 'conditional' variables
Hello dear R-community,
I have been trying to figure out a way to generate histograms of a numeric variable observed in different entities ('individual' below). Each one of this entities is classified as "A" or "B" (according to the pseudo-code below):
variable<-sample(rep(1:10,10))
individual<-rep(1:10, length(variable))
2010 Aug 30
3
log y 'axis' of histogram
All,
I have been trying to get calls to hist(...) to be plotted
with the y-axis having a log scale.
I have tried: par(ylog=TRUE)
I have also looked at the histogram package.
Suggestions welcome.
--
Derek M. Jones tel: +44 (0) 1252 520 667
Knowledge Software Ltd mailto:derek at knosof.co.uk
Source code analysis http://www.knosof.co.uk
2008 Feb 11
1
Histogram in Lattice with 3 factors
Dear R-help list,
I am trying to construct a lattice histogram using 3 factors.
My dataframe looks like this: (simulating a waterbalance over
groundwater with different salinities)
s days model EC EC_max
0.4 1 "A" 10 9
0.42 2 "A" 10 9
0.44 3 "A" 10 9
: : : :
2007 Jun 22
1
Switching X-axis and Y-axis for histogram
Dear all,
I'm creating a histogram with the function hist(). But
right now what I get is column representation (as normal).
I'm wondering if I could switch X-axis and Y-axis and
get row-representation of frequencies?
One more question, can I define the step of each axises
for the histogram?
Thanks so much!
Donghui
2017 Aug 15
1
Lattice Histogram Scaling
My apologies, the data can now be found at:
url <- "http://www.econ.uiuc.edu/~roger/research/ebayes/velo.d"
x <- scan(url,skip = 1)
If I could get each of the histograms to mimic what is produced by
hist(x, 100, freq = FALSE)
I?ve experimented with xlim, ylim, without success so far...
url: www.econ.uiuc.edu/~roger Roger Koenker
email rkoenker at uiuc.edu
2011 Jun 09
1
histogram - density on y axis and restriction to interval [0, 1]
Hello,
To indicate probability densities instead of counts on a histogram, I
specify freq = FALSE.
However, I expect that summing all top y coordinates over all the
intervals of the histogram will provide 1.
1)
v <- c(0.2885, 0.2988, 0.3139, 0.2615, 0.3179, 0.3163, 0.2583, 0.3052,
0.2527, 0.3147, 0.3235, 0.2408, 0.2480, 0.3108, 0.3577, 0.2829, 0.2694,
0.3275, 0.3314, 0.2639, 0.3076,
2011 Mar 03
1
Ploting Histogram with Y axis is percentage of sample for each bin
I'm trying to do something very simple...
I wan to plot a histogram where the y axis represent the percentage of the
total sample that each bin represents.
I know how to plot a histogram with the counts and density... but can't find
anything that gives me perenct of sample on the y axis.
Any help is appriciated
Below is the script I'm working with
par(mfrow=c(1,2))
2011 Jul 27
1
How to adjust y-axis when using panel.densityplot within histogram function
Hi
I would like to superimpose group-specific densityplots on top of an overall
histogram using panel.histogram and panel.densityplot. Furthermore, I would
like to automatically adjust the range of the y-axis to take into account
the ranges of both histogram and densityplot. This last part is where I have
a problem. I believe using the prepanel argument of histogram is typically
the way to go,
2007 Jul 12
1
ggplot2 / histogram / y-axis
Is there a way in ggplot to make a histogram with the left-hand y-axis
label as frequency, and a right-hand y-axis label as percentage?
Thanks!
Pete
2008 Mar 03
2
How to make a break on y-axis of a histogram chart using R?
Attached is a histogram chart with a break on y-axis which my friend made
for me using phot shop. Do anyone know how to make such a break using R?
Thanks in advance.
(See attached file: 2007 age distribution.doc)
Hongsheng (Hank) Liao, Ph.D.
Lab Manager
Center for Quantitative Fisheries Ecology
800 West 46th Street
Old Dominion University
Norfolk, Virginia 23508
Phone:757.683.4571
2006 Nov 30
1
scaling y-axis to relative frequency in multiple histogram (multhist)
Hi,
I'm plotting a multiple histogram using the function multhist {package
plotrix}, something like:
library(plotrix)
mh <- list(rnorm(200, mean=200, sd=50), rnorm(200, mean=250, sd=50))
multhist(mh)
In this graph y-axis represents the frequency of observations.... but I
would like it to be scaled into relative frequencies,
does anybody know how to do this with multhist or similar
2011 Mar 19
1
lattice histogram function and groups
Hi,
>From the following code (tweaked from another user):
variable<-sample(rep(1:2,100))
individual<-rep(1:3, length(variable))
group<-rep(LETTERS[1:2],length(variable)/2)
mydata<-data.frame(variable,individual,group)
individual<-as.factor(individual)
group<-as.factor(group)
histogram(~variable|individual+group)
I get six panels, one for each of individuals
2009 Sep 02
2
Normalized Y-axis for Histogram Density Plot
I have the following data which I tried to draw
the probability density plot.
Here is the code I have:
x <- read.table("mydat.txt");
d <- rep(x$V2,times=x$V3);
hist(d,probability=T, xlab="FlowSignal");
But why the y-axis range from 0 to 6,
instead of 0 to 1? What's the correct way to plot it?
#id flowsignal frequency
1 0.67 1
1 0.70 1
1