search for: barp

Displaying 20 results from an estimated 75 matches for "barp".

Did you mean: bar
2011 Jan 18
2
Barplot and line x-axis positions
Hello all, Hoping that there is a fairly simple solution to my query... I'm trying to overlay a line plot of some data onto a barplot of different data. The y-axes are different for each set of data but the x-axes are the same (1:12, corresponding with 12 months of observations). The problem I'm having is that the centre of the bars and the points on line don't match up, which is making the whole thing look untidy. I...
2007 Sep 25
2
Adjust barplot to the left
Hello, I have the following problem: I created an ecdf and a barplot. Unfortunatly, the bars are not where I would like them to be (please see picture below). http://www.nabble.com/file/p12877530/problem.gif That's my code: #------------------------ par(mfrow=c(2,1), mar=c(2,3,3,2)) #ECDF x = c(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2) F...
2003 Apr 16
2
barplot2
Hello, I get a nice looking barplot using the barplot2 function in the gregmisc package: body2 <- barplot2(hh3, beside = TRUE, col = c("mistyrose", "lightcyan"), .... cex.names = 1.0, plot.ci = TRUE, ci.l = cil, ci.u = ciu, plot.grid = TRUE) box() However, obviously...
2016 Apr 26
1
ylim in barplot()
Thank you David, That's a nice workaround using plotrix::barp(), but that doesn't explain why ylim doesn't work as intended (or at least, as I expect it to work), or why xpd has no influence when using devEMF::emf()... The problem with saving directly in RStudio is that it requires to manually save the plot, and this becomes troublesome when there...
2016 Apr 25
0
ylim in barplot()
If you are using a Windows system, you can Export the plot from RStudio and save it as a metafile without using package devEMF and it will crop the bars with xpd=FALSE. When I used devEMF on a Windows machine, the bars were not cropped with barplot() as you indicated, but when I switched to plotrix::barp() they were cropped. The arguments are a bit different, but I did not need xpd=FALSE: emf("TestPlot.emf") barp(t(mydata), col=c("orange", "green", "yellow", "purple"), ylim=c(50,70), lege...
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 wit...
2008 May 26
1
X-Axis Problem with Multhist Plot
I am creating a side-by-side histogram using "multhist" of PLOTRIX. However, I can't seem to control the X-axis. It yields the following X points in the axis: 1 3 5 7 9 13 17 21 25 29 33 with uneven spacing between x-ticks (see attached file). Especially I want to create a bar for every x-axis (1,2,3,4...36), now not every x-axis has a bar. Is there a way to alter my following
2016 Apr 25
2
ylim in barplot()
Dear useRs, I'm having troubles with using ylim in barplot(): even though I reduce the y-scale using ylim, the bars still extend down to 0into the x-labels. The sample data is below, and here is the code. #This works fine but I would like to plot only from 50 to 70: barplot(t(mydata), beside=TRUE, col=c("orange", "green", "yel...
2012 Mar 06
1
Help with plot Grouped Bar Plot by using R
...4 0.00% 85 0 0.00% 1160 0.00% 86 0 0.00% 3891 0.00% 87 0 0.00% 1643 0.00% 88 0 0.00% 390 0.00% 89 0 0.00% 100 0.00% [/code] Desired output image [code] http://r.789695.n4.nabble.com/file/n4448762/ScreenHunter_01_Mar._06_12.42.jpg [/code] Only the first, second, and forth column is used to plot the barplot Code that I try: [code] read.table("data.stats.txt", header=TRUE, sep="\t") data <- read.table("data.stats.txt", header=TRUE) data[,1] data[,2] data[,4] [/code] Thanks for any advice -- View this message in context: http://r.789695.n4.nabble.com/Help-with-plot-G...
2010 May 14
2
multhist,labels and percentages
Hi All, I am in the annoying position of having to present some data to someone who seems to be somewhat less than numerate. I need to label the y-axes of a multhist with the y-axis labeled not as counts but as percentage of a population. Plotting the standard histogram is in a way fine, all I need is to: -- have a left-handside y-axis labels for pop 1 and a right-handside y-axis labels for pop2
2011 Jan 20
1
Scale of 2nd y-axis
...different y-axes. I have produced the following code which addresses my previous issue (aligning the centre of each bar and the points of the line plot); my problem now relates to the 2nd y-axis (which is being used for the burnMeans data): library(plotrix) par(oma=c(1,1,1,1))par(las=1) xvals <- barp(wetMeans, xlab="", ylab="", main="TEST", col="grey", names.arg=c("Jan","Feb","Mar","Apr","May", "Jun","Jul","Aug","Sep","Oct","Nov","Dec&quot...
2008 Nov 14
1
how to plot a variable's histogram in the levels of a second variable(1)
Goodmorning to everyone, I am trying to create a clustered barplot for the following 2 variables who have more cases but as an example i am giving you 10 items: sex聽 socio-economic status 1聽聽聽聽 1 2聽聽聽聽 2 2聽聽聽聽 2 2聽聽聽聽 3 2聽聽聽聽 2 1聽聽聽聽 4 1聽聽聽聽 1 1聽聽聽聽 1 2聽聽聽聽 3 2聽聽聽聽 1 where sex: 1:man, 2:woman 聽聽聽聽聽聽聽聽聽聽 socio-economic status:1:Low, 2:Medium, 3:High, 4:Very Hi...
2018 Feb 05
0
help with the plot overlay
Hi Ace, You can do it with plotrix: library(plotrix) barpos<-barp(c(1,5,38),width=0.5,col=c("white","lightgray","darkgray"),ylim=c(0,70)) ehplot(c(1,0.8,0.9,0.8,1.1,1,4,3,5,14,3,2,32,27,33,30,50,61), c(1,1,1,1,1,1,2,2,2,2,2,2,3,3,3,3,3,3),median=FALSE,add=TRUE,cex=2, pch=21,bg="white") dispersion(barpos$x,barpo...
2010 Sep 16
3
Help with customizing a histogram figure
Hi all, Please consider the following code: require(plotrix) l <- list(rnorm(50),rnorm(50,sd=2),rnorm(50,mean=3)) multhist(l) I have two things I need help with: (1) In the output, there are empty spaces on the x-axis. How would I eliminate these spaces? I want a nice, smooth, empty-spaceless x-axis. (2) How could I add tracing lines to each histogram? I am undoubtedly using the wrong
2012 Feb 23
1
multhist weird behavior/ xlabels wrong
Hi, I found some weird behavior of the function multhist in the plotrix package and I would like to ask you about it: so, it works well to put two histograms next to each other, but I don't understand the breaks… so for example, library(plotrix) mh <- list(rnorm(200, mean=100, sd=10), rnorm(200, mean=100, sd=10)) multhist(mh) #produces a plot with
2012 May 11
1
plot: many bars with wide bars
...mes=F) dat1<-t(as.matrix(dat[,2:3],nrow=2)) colnames(dat1)<-dat[,1] zehn<-seq(10,10000000,10) xmax<-max(dat1) ind<-min(which(zehn>=xmax)) zehnind<-zehn[ind] ticks<-seq(0,zehnind,10) par(las=1) par(mar=c(5,4.5+0.3529412*(max(nchar(colnames(dat1)))-1),1,1)) barplot(dat1,width=0.59,horiz=T,col=c("steelblue4","lightsteelblue3"),border="NA",axes=F,beside=T,xlim=c(0,zehnind),cex.names=1.2,ylim=c(0,10)) par(xpd=TRUE) abline(v = seq(10, zehnind, by = 10), col = "white") par(xpd=F) aa <- skala if(aa == "pr...
2018 Feb 04
2
help with the plot overlay
Dear R Community, I recently read an article and found a plot as attached. It has scatterplot, barplot, and error bar. Could anyone help me to figure out what package I can use in R to generate such plot? Thank you very much for any inputs! Kind regards, Ace -------------- next part -------------- A non-text attachment was scrubbed... Name: Screen Shot 2018-02-04 at 6.38.14 AM.png Type: image/pn...
2011 Sep 22
2
How to adjust the y-axis range in barplot properly
Hello R-Users, it might be a rather simple problem I have, but I couldn't find any solution online. Thus, here is my problem: I would like to adjust the y-axis range in a barplot, since all my values are >70. Therefore I would like to only visualize the y-axis from 60-100 (example 1). The problem is, the range of the y-axis is adjusted, but the barsize stays the same and vanishes from the plot area. How can I "cut" the y-axis and the bars in a proper way....
2010 Apr 24
2
barplot - offsetting individual bars
Hello, I'm trying currently using barplot to summarize precipitation data. So far I've compiled total annual snow and rain accumulation in a table (attached). I've been successful at plotting it using the following code: fig=barplot(t(Annual_Precip_table), horiz=TRUE, space=0, col=c("grey70", "white"), axe...
2011 Apr 29
4
plot several histograms with same y-axes scaling using hist()
Dear all Problem: hist()-function, scale = ?percent? I want to generate histograms for changing underlying data. In order to make them comparable, I want to fix the y-axis (vertical-axis) to, e.g., 0%, 10%, 20%, 30% as well as to fix the spaces, too. So the y-axis in each histogram should be identical. Currently, I have 100 histograms and the y-axis scales changes in each. Here is my code: