Displaying 20 results from an estimated 10000 matches similar to: "plotting barplot in log scale"
2002 Sep 19
0
Barplot() with log axis scaling and other features
To all,
Recently I created a version of barplot() to include some new features
as follows:
1. Plot confidence intervals for each bar: The user can pass lower
(ci.l) and upper (ci.u) bounds in the same vector/matrix format as
"height". The CI boundary lines will vary in width per bar, if a
varying "width" argument is specified. CI line width, type and color can
be
2008 May 02
2
barplot with log base 2 scale or shift the x-axis
Hi,
I have data that is on a log base 2 scale. It goes from negative factors of
2 to positive ones. I am using barplot. However, I don't want the data
centered at 0 - I want the min of the yaxis to be just below the lowest
value in the data. The plots are kind of deceptive switching between
positive and negative. I see that barplot has a log option, but that
doesn't seem to be
2007 Jun 12
2
barplot and map overlay
Hi,
I wonder if it is possible with the graphics package to overlay one or several plots
(barplots, for example) over a map. Data for the map is in a data frame with the
latitude and longitude coordinates, and then:
> plot(map$long, map$lat, type ="l")
produces the map. I want to put each barplot in specific locations on the map, namely
at the center of "statistical
2010 Jan 07
1
Barplot + plot same scale
Hello,
I would like to plot :
barplot(c(10,12,18))
and
plot(c(0,2,3), t="l")
and many other plots...
in a same scale. With par(new=T) it's not align, points are not in the
middle of the bar of barplot. Is there an easely solution to align that ?
Thank for you help,
G
[[alternative HTML version deleted]]
2008 Jun 20
5
Plotting barplot and scatterplot on same device - x-axis problem
Hi R-users
I'm a relative newbie and uses R mostly for graphical purpose. I have a
layout problem when plotting a scatterplot and a barplot using
par(new=TRUE). The baseline of the x-axis is not positioned equal for the
two plotting functions (see picture) and I have been unable to find out how
this is changed.
http://www.nabble.com/file/p18025066/pic.jpeg
I have added the script if this
2010 Feb 28
3
Change the scale on a barplot's y axis
I have grades data. I read them from a csv in letter-grade format. I
then converted them to levels
levels(grades$grade)=c('A+','A','A-','B+','B','B-','C+','C','C-','D+','D','D-')
And then to numbers
grades$gp=grades$grade
levels(grades$gp)=c(4.3,4.0,3.7, 3.3,3.0,2.7, 2.3,2.0,1.7, 1.3,1.0,0.7)
2002 Mar 15
2
cutting barplots at e.g. 50%
hi,
i want to plot percentage values using barplot. everything works fine so
far. giving a chance level of 50% i want to plot only the area above 50
percent.
i can of course cut using ylim=c(50,100) but this does not work
properly since i also see some of the area below 50%.
thanks for suggestions,
jan
-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
r-help
2012 Mar 12
2
barplot and NA
Am I wrong that barplot is supposed to just skip NAs, and continue with the rest of the data in a matrix column? That's how I read various posts on the subject.
But that's not what happens for me with R64.app (on a Mac, obviously). For example:
d0 <- as.matrix(c(2,3,4))
d1 <- as.matrix(c(2,3,NA))
d2 <- as.matrix(c(2,NA,4))
d3 <- as.matrix(c(NA,3,4))
barplot(d0)
barplot(d1)
2010 Aug 05
3
Plotting range of values in barplot()
Hello,
I am attempting to create a bar plot that contains a range of possible
response values on the x-axis of 1 to 5 and contains barplots for the number
of responses even in the event that there are 0 responses. For example, I
have a data set that contains values of 2, 3, 4, and 5 but I would also like
my graph to show that there are no 1's.
I have attached the resulting graph. The
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.
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
2012 Aug 26
3
Aligning barplot
All, Consider:
BagA <- c(-1000,10,10,10,10,10,10,
10,20,20,20,20,20,20,30,
30,40,40,50,60)
BagB <- c(10,20,30,30,40,40,50,50,
50,50,50,50,60,60,60,60,
60,60,60,1000)
layout(c(2,1))
barplot(table(BagB))
barplot(table(BagA))
At this point, I'd like to arrange the plots so that the 10-bars are
aligned, the 20-bars are aligned, etc. So, I started
2008 Dec 06
2
Barplot label
Dear all,
I am trying to make barplot from matrix with "beside=FALSE". I have 165 labels in my bar plot. When i plot the label horizontally below the barplot, then all labels are not appear in the plot due to lack of space. I used the following function:
barplot(t(bar), main="Barplot based on LCMS", ylab="RF membership Probability",
2009 Feb 12
2
barplot() x axes are not updated after removal of categories from the dataframe
Hi all,
I'd be grateful for your help. I am a new user struggling with a barplot
issue.
I am plotting categories (X axis) and their mean count (Y axies) with
barplot().
The first call to barplot works fine.
I remove records from the dataframe using final=[!final$varname == "some
value",]
I echo the dataframe and the records are no longer in the dataframe.
When I call plot again
2007 Nov 04
2
Fw: Creating a barplot--advice needed
Subject: Creating a barplot--advice needed
> Advice needed: I am preparing a computer program to do a barchart. Advice
> needed: Should I learn the lattice package, or try to? As a
> non-statistician, much of the terminology is unfamiliar to me. "grouping
> variable," "object of class trellis," etc. Or, is there a more easily
> learned way to do it? It is a
2011 Jul 01
1
Reverse legend label order in barplot
Hi list,
I've thus far not found a solution to my problem and hope someone can help.
I have a data matrix and wish to plot a stacked bar plot using barplot().
This is simple enough, but I have a problem with the legend labels being in
the reverse order from what I want. The default appears to have labels
ascending bottom-to-top reflecting bottom-to-top sub-bars, but I would like
the
2011 Aug 25
1
How to vary the distance between the pairs of a side-by-side barplot?
Hello,
for my project I wanted to create a side-by-side barplot. For each of 143 treatments there are always two measurement. This two measurements (a pair) are represented by a red resp. a yellow bar. I was able to write the code for the side-by-side barplot. Unfortunately however I am not able to vary the distance between the measurement pairs ( the distance from one red-yellow bar pair to the
2007 May 15
1
stacked barplot with positive and negatvie values
Hello I'm trying to create a barplot with a couple of stacked positive
values and with one negative value for each group.
example:
trees<-c(20,30,10)
shrubs<-c(12,23,9)
veg<-c(2,3,4)
soil<-c(-100,-123,-89)
example1<-t(cbind(trees,shrubs,veg))
barplot(example1)
#this works so far
#but now:
example2<-t(cbind(trees,shrubs,veg,soil))
barplot(example2)
This shows no more
2007 Jul 03
1
Plotting very skewed data in barplot
Dear R'ers,
I would like to use barplot or a similar function to plot data
demonstrating the distribution of the length of a kind of conservation in
about 25000 DNA sequences. My data look like this:
#Total sequences: 23873
0 19936
1 218
2 391
3 477
4 360
5 431
6 294
7 215
8 320
9 209
10 160
(.....)
99 0
100 1
101 0
102 0
103 1
104 0
105 0
106 0
107 0
108 0
109 1
Therefore, I would like
2009 Mar 03
2
preparing data for barplot()
What is the best way to produce a barplot from my data? I would like
the barplot to show each person with the values stacked
val1+val2+val3, so there is one bar for each person When I use
barplot(data.matrix(realdata)), it shows one bar for each value
instead.
To post here, I created an artificical data set, but it works fine.
fakedata <- as.data.frame(list(LETTERS[1:3]))
colnames(fakedata)