similar to: Barplot and line x-axis positions

Displaying 20 results from an estimated 2000 matches similar to: "Barplot and line x-axis positions"

2011 Jan 20
1
Scale of 2nd y-axis
Dear list, My query follows on from a question I posted a few days ago. I have the following 2 sets of data: wetMeans[1] 9.904762[2] 6.344828[3] 6.346154[4] 6.855769[5] 9.074324[6] 9.953988[7] 13.482966[8] 14.546053[9] 10.841584[10] 9.752033[11] 6.739336[12] 8.955056burnMeans[1] 0.06214286[2] 0.05396552[3] 0.04096154[4] 0.05302885[5] 0.05831081[6] 0.07392638[7] 0.29969940[8] 0.25596217[9]
2008 Apr 10
6
two graphs in one figure?
Dear all, how can I plot a line graph and a bar graph in one single figure? I tried to combine "barplot" and "plot". Even though they both have the same x-values (1 to 55),  it just doesnt look as if they match in their scale (the barplot is much wider than the "plot"....even though I tried to put limits on the x-axis). Here is an example of what I did:
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 are a lot of plot commands in a
2011 Jul 26
1
adjusting x-axis labels
I am trying to tweak how my categorical x-axis labels are formatted in my bar graph. Specifically, I would like to a) decrease the spacing between lines (e.g. spacing between Dialium and guianensis) b) right justify the text and c) have each species name align with the center of the corresponding bar graph. A simplified version of my code thus far is as follows. I am using RStudio v.
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:
2018 Jan 09
3
barplot_add=TRUE
Dear R users aim Barplot of insect trap catches (y variable trapcatch) at one specific station (variable FiBL_Hecke) from week 1-52 ( x variable week). It works well using the function tapply (sum trapcatch per week, males and females not separated), however, I intend to separate the y variable trapcatch in males and females (variable m_w: m and w) problem I used the function "add" to
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,barpos$y,c(0.1,1,5),lwd=2,arrow.cap=0.03)
2013 Nov 27
1
Conditional error bars
How can I condition any error bar function that use the arrows() function, such as 'CI.plot' (see example below) or 'error.bars', to draw only upper error bar (upper CI) if the bar value (mean) is positive and the lower error bar (lower CI) if bar value is negative? CI.plot <- function(mean, se,length, ylim=c(-5, max(CI.H)), ...) { CI.H <- mean+se CI.L <- mean-se
2006 Mar 27
2
A plotting question - how to get error bars?
Dear R list, Can anyone help with a plotting question? I'm trying to display some data on a plot and I've almost got the format I need (see code below), but 2 things I can't get: 1. How to get "Jan","Feb","Mar" on the x=axis instead of 1:3? 2. How to get "T"s on the end of my error bars like you have in standard scientific plots? Any comments
2007 Oct 23
1
How to avoid the NaN errors in dnbinom?
Hi, The code below is giving me this error message: Error in while (err > eps) { : missing value where TRUE/FALSE needed In addition: Warning messages: 1: In dnbinom(x, size, prob, log) : NaNs produced 2: In dnbinom(x, size, prob, log) : NaNs produced I know from the help files that for dnbinom "Invalid size or prob will result in return value NaN, with a warning", but I am not able
2008 May 02
1
Cant resolve Error Message
Hi, Im having trouble creating the following graph. Here is my code: library(plotrix) library(prettyR) female_improvement <-read.table("C://project/graphs/gender/breakdown/gender-improvement/female-improvement.csv", sep=",", header=TRUE) barp(rbind(rep(length(female_improvement$gender),2),freq(female_improvement$reason)[[1]]), ylab="22 Males participated in the
2004 Dec 03
1
How to wrap or split labels on plot
Dear R gurus, I want to wrap labels that are too long for a plot. I have looked at strsplit(), substr(), nchar(), and strwrap(). I think it's some combination but I'm having difficulty trying to figure out the right combo. I think I need to create some new matrix containing the labels already split, though I'm not sure if maybe there is a quick and dirty way to address this
2020 Jun 30
4
R-devel internal errors during check produce?
>>>>> Kurt Hornik >>>>> on Tue, 30 Jun 2020 06:20:57 +0200 writes: >>>>> Jan Gorecki writes: >> Thank you both, You are absolutely correct that example >> should be minimal, so here it is. >> l = list(a=new.env(), b=new.env()) unique(l) >> Just for completeness, env_list during check that raises
2003 Jul 12
2
help with bivariate density plot question
Dear R users: I have a dataset with two variables (>20000 observations, two samples from same subject) and I used "kernSur" from library(Genkern) to get a estimated bivariate density and corresponding plots as follows: new.data.normal<-data.normal[!is.na(data.normal[,2]),] x<-new.data.normal[,2] y<-new.data.normal[,3] op <- KernSur(x,y, xgridsize=50, ygridsize=50,
2000 Dec 15
1
resolution of windows metafiles
I am having trouble getting smooth-appearing curves in figures produced as windows metafiles using R (R-1.1.1 on Windows 98). When I import them into a word processor (either MS Word 97, or WordPerfect 9.0), the figures appear only slightly bumpy on screen, but when printed, there is a clear jaggedness reminiscent of aliasing. Is there a fix for this (if the answer is "upgrade to 1.2",
2008 Jan 04
7
best way to modify spec (the command-line tool)?
Hi all, where I work we''ve cooked up a kind of ghetto profiler for our specs. It basically just does this: time = Time.now # run the spec puts "woah! dude. long spec." if time > 1.second I''m simplifying here. I think the threshold is actually 0.1 seconds, and we use more precise language, and highlight the spec in red via terminal colors, etc. But the way it works
2008 Feb 15
3
lineplot.CI problem
Hi List, I have a problem plotting data using the lineplot.CI command in the sciplot package. I want to plot the data of 2 experimental cases using different lines (traces). Time is on the X-axis. The tricky thing is that the data collection in the second case started later than for the first case. This is to say: the first n data points for the second case are missing. So far so good. However,
2005 Jan 14
2
Help in Overlaying of 2 Plots on the same Device.
I'm trying to overlay a density plot on a previously plotted histogram. However, i need to use the same axis as of the 1st(histogram) plot to plot the second. My second plot is creating its own axis and causing my plot to extend the entire histogram instead of getting a subplot on a portion of the histogram. I tried 'fig' and 'new' parameters with no luck. Thanks in advance.
2011 Apr 03
3
kernel density plot
I am using the following commands for plotting kernel density for three kinds of crops density(s22$Net_income_Total.1, bw="nrd0",adjust=1, kernel=c("gaussian"))->t plot(t, xlim=c(-30000,40000), main="Net Income Distribution", axes=F, ylim=c(0,0.00035). xlab="Value in Rupees") par(new=T) density(s33$Net_income_Total.1, bw="nrd0",adjust=1,
2011 Jun 21
2
par code help
I am making a barplot using barplot2 from gplots where each bar represents a specific tree species. I have formatted the species names on the x-axis so that the genus name is above the species name and have then rotated the labels 45 degrees to save room. This is my code: >columncolor<-c("grey20", "grey20", "grey20", "grey70",