Displaying 20 results from an estimated 10000 matches similar to: "histogram like x labels in barplot"
How to count from larger value to smaller value in ecdf (Empirical Cumulative Distribution Function)
2008 Feb 19
1
How to count from larger value to smaller value in ecdf (Empirical Cumulative Distribution Function)
Hi, all
ecdf function (Empirical Cumulative Distribution Function) in "stats"
package counts from smaller values to larger values.
However, I want to draw it by counting from larger value to smaller values
and I couldn't find options for this purpose.
How can I draw ecdf or ecdf like graph by counting from larger values to
smaller values.
Thank you in advance.
Hyunchul Kim
2008 Feb 19
4
How to join path with arguments
Hi, all
How to format and join strings ?
For example, like following short python examples.
*********
name1 = 'sample-plot'
filename = '%s.png' % name1
inputdir = '/path/to/dir'
os.path.join(inputdir, filename)
**********
Best,
Hyunchul Kim
[[alternative HTML version deleted]]
2010 Apr 03
2
histogram-like barplot? (or reverse?)
Hi,
I have a simple task I can't figure out. I'd like to take
some measurements I made, e.g.:
year (y-axis)
1
2
3
4
5
6
counts (x-axis)
10
10
20
30
40
50
And then, make a barplot with the x-axis ticks (representing
the borders between years) between the bars.
However, barplot seems to force you to make the x-axis
arbitrary categories. I want it to be continuous (as in a
2010 Jan 29
1
Barplot/Histogram (lattice)
Dear Rxperts..
what settings in barplot and histogram do I use, to show bars in an
monotonously increasing or decreasing order of the frequency of a
categorical variable?
an example is provided below..
histogram(~factor(sample(letters,200,rep=T)))
I was able to get it in 3 - 4 steps.. l
a1 <- sample(letter,200,rep=T)
a2 <- table(a1)
barplot(a2); barplot(sort(a2)) # all variables are not
2009 Jan 27
1
3-axis Barplots (plus qplot like staked histogram capability)
Searched my R reference docs*, and the Rseek, but evidently I've overlooked this capabilty.
Is it possible to produce a 3d Barplot using R?
For example would like to have a three axis bar plot - \
x-axis = location(discrete),
y-axis = data value,
z-axis = frequency of value occurance (of location and value)
Would also if could also do something like what "qplot" allows,
2011 Nov 04
3
barplot as histogram
Hello:
I'm dealing with an issue currently that I'm not sure the best way to
approach. I've got a very large (10G+) dataset that I'm trying to create
a histogram for. I don't seem to be able to use hist directly as I can
not create an R vector of size greater than 2.2G. I considered
condensing the data previous to loading it into R and just plotting
the frequencies as a
2011 Apr 04
2
gap.barplot doesn't support data arrays?
I am trying to make a barplot with a broken axis using gap.barplot (in the
indispensable plotrix package). This works well when the data is a vector:
> twogrp<-c(rnorm(10)+4,rnorm(10)+20)
> gap.barplot(twogrp,gap=c(8,16),xlab="Index",ytics=c(3,6,17,20),ylab="Group
values",main="Barplot with gap")
But when the data is an array (for a bar plot with multiple
2011 Jul 14
2
Problem with x labels of barplot
Hello everyone,
i am currently creating a barplot.
This barplot takes a vector of ~200 datapoints.
Each datapoint represents one bar.
http://img96.imageshack.us/i/human1w.png/
(Ok as you see, it is not only one barplot, but a series of barplots).
Now, these barplots represent a human chromosome. This means they are
ordered. For instance bar number 50, means position 50 in the human
chromosome.
2008 Mar 03
1
Barplot with grouping x axis and count data
Hello,
I am trying to make a barplot with nested count data which is build like
this: first there are several birds (n)laying 3 clutches composed of 2 eggs
half of the second and third clutch received treatment and this treatment
was tested to influence sex of offspring. I want a barplot showing counts
for male and female for every egg of every clutch. can someone tell me what
to do? I drew a
2006 Feb 21
2
rotated labels in barplot with beside=T and multiple groups
I have a data set that I display using barplot. I don't know what you
call it, but when I look at it, it looks like this:
> lsu
(0,0.1] (0.1,0.2] (0.2,0.3] (0.3,0.4] (0.4,0.5] (0.5,0.6]
A 0.052631579 0.000000000 0.000000000 0.000000000 0.000000000 0.000000000
B 0.000000000 0.000000000 0.001007049 0.003021148 0.000000000 0.000000000
E 0.200000000 0.000000000
2008 Oct 24
3
Barplot Labels Problem
Hi everybody,
well I'm trying to use barplot for the first time. I get a suitable graphic but I'm having a weird problem.
My graphic is generated from a matrix with several species (rowNames) and two abundance columns.
So each species will have two bars, and the species name should appear at left. Until now everything is Ok, but when a I plot it the species names (my labels) are cut by
2012 Mar 02
2
Spacing of text does not match spacing of bars in barplot
I have a very standard barplot. My labels are too long to be printed
horizontally under each bar, so I am using text to put the labels on a 45
degree slant.
However, the labels are spaced more narrowly than the bars, so on an 8
vertical bar plot, the end of the eighth label is lined up with the seventh
bar.
Preferably I don't want to do every text label separately (I'm having this
2007 Oct 25
4
ploting labels on barplot
Again me.
I want to plot the numbers on the bars of a barplot.
This can be done using hist function when setting the label argument true
(i.e.
data <- c(1,2,3,4)
hist(data, labels=T)
When I try this using barplot I get an error:
> barplot(summary(data), labels=T)
Error in axis(if (horiz) 2 else 1, at = at.l, labels = names.arg, lty =
axis.lty, :
formal
2003 Nov 07
1
barplot(names.arg) versus axis(labels)
Should I be able to use axis() on a barplot? i have a data.frame, the first
3 values of which are:
> c[1:3,]
median mean
A1 56.5 58.50000
A61 73.0 73.00000
A62 63.0 63.00000
> str(c)
`data.frame': 19 obs. of 2 variables:
$ median: num 56.5 73 63 161 51 55 44.5 22 54 49 ...
$ mean : num 58.5 73.0 63.0 161.0 47.5 ...
if I do barplot(median) and then try
2010 Jul 08
1
x-axis labels for barplot of zoo object
Hi
Let's assume, I have a dataset of 1000 datapoints, which represent daily
recordings of a measurement.
They are stored as a ts object (see example below)
Now I want to represent them as a barplot. I found the barplot in the zoo
package, but I have one problem: the x-axis labels. I would like to have the
x-axis labels as either years only (located at the beginning of the year),
or
2012 Sep 06
2
No room for labels in barplot
All,
I have:
sales <- c(2300,900,155,102,42,10)
names(sales) <- c("Christmas","Valentine's Day",
"Mother's Day","Father's Day",
"Thanksgiving","New Year's Day")
barplot(sales,ylim=c(0,2500))
But it doesn't place all of the name labels on the plot. So I tried:
sales <-
2010 May 07
2
smooth line overlap with histogram
Hi r-users,
I would like to overlap a smooth line on the histogram. I tried using spline but it does not work.
sq <- seq(0,900,by=50)
sq.50 <- as.character(sq)
datobs <- sum_pos
## first, plot histogram
histo <- hist(datobs,breaks=sq,freq=F)
## extract counts from histogram and calculate the probability in
## each specified interval. Also check the length of the interval is
2011 Apr 01
1
controlling the labels width of a barplot
Dear all,
I am trying the barplot command but some of the labels are disappearing as there is not enough place on the graph to put them all.
Here is an example of code that doesn't show all the labels:
barplot(sort(runif(9,0,0.2),decreasing=TRUE),xlim=c(0,20),width=2,names.arg=c("first name","second name","third name","fourth name","fifth
2003 Jul 21
1
help on barplot
Hello,
I am trying to compare two histograms using barplot. the idea is to plot
the histograms as pairs of columns side by side for each x value. I was
able to do it using barplot before but I can't remember now for the life
of me now how I did it in the past:
> d
[,1] [,2]
-37.5 0.0000000000 2.789396e-05
-32.5 0.0001394700 5.578801e-05
-27.5 0.0019804742
2010 Mar 22
3
add information above bars of a barplot()
hi,
I have a barplot with six clusters of four bars each.
Now I would like to add the exact value of each bar as a number above the bar.
I hoped to get some tips here.
I could simply add text at the different positions, but I don't understand how the margins on the x-axis are calculated
(how can I get / calculate the x-ticks of a barplot?).
Also I would like to code this flexible enough so