Re: [R] Over lay 2 scale in same plot

2010-09-11 Thread Jim Lemon
On 09/10/2010 10:43 PM, mamunbabu2001 wrote: Hi Josh, Thanks for your reply. I gave a reply yesterday but found that it was not posted. I managed to plot the bar pot and overlay points. The problem I am facing now is the spread of Y scale. The values I am plotting in Y scale are very close. so

Re: [R] Over lay 2 scale in same plot

2010-09-10 Thread Joshua Wiley
Hi Mamum, You can look at the ylim argument to plot(). It lets you control the limits; however, in your example graph, part of the issue is that the bars have a much higher value, so you could not change ylim too much (looks like in your example graph you could set it to something like ylim = c(0

Re: [R] Over lay 2 scale in same plot

2010-09-10 Thread mamunbabu2001
Hi Josh, Thanks for your reply. I gave a reply yesterday but found that it was not posted. I managed to plot the bar pot and overlay points. The problem I am facing now is the spread of Y scale. The values I am plotting in Y scale are very close. so they look pretty flat. (lowest value 7.5 and h

Re: [R] Over lay 2 scale in same plot

2010-09-08 Thread Joshua Wiley
Hi Mamum, The co-ordinates appear shifted because the bars are not centered at 1, 2, 3, etc. To give an example: # Create a barplot # of the numbers 1 through 10 barplot(1:10) # Now look at the x axis coordinates of these actual bars barplot(1:10, plot = FALSE) # One way to get these coordinat

Re: [R] Over lay 2 scale in same plot

2010-09-08 Thread mamunbabu2001
Hi Peng, Thanks for your reply. I have tried it and it does work fine apart from one problem. Even though the second data set has same length as the first one, the point function seems to shit all the points towards left side. So the points are not in concordat co-ordinates as the bars. Any idea

Re: [R] Over lay 2 scale in same plot

2010-09-07 Thread Peng, C
Modified from Josh's code: Is this you want to see? > barplot(-50:50) > # add points into the existing plot at the coordinates set by x and y > # and use a line to connect them > points(x = 1:101, y = seq(from = 30, to = -20, length.out = 101), type = > "l") > # add right hand side axis

Re: [R] Over lay 2 scale in same plot

2010-09-07 Thread Jim Lemon
On 09/07/2010 02:57 AM, mamunbabu2001 wrote: Hi Everyone, I have two different data set in 2 different scale. I want to plot these two data in the same plot in their respective scale. So the plot will have 2 different scale. I have added an image below to show how it should look. does any bode h

Re: [R] Over lay 2 scale in same plot

2010-09-06 Thread Joshua Wiley
Hi, Looking at the picture, I think you are just talking about plotting two datasets. Here is an example I made up, that looks sort of like your picture: # make a barplot barplot(-50:50) # add points into the existing plot at the coordinates set by x and y # and use a line to connect them points

[R] Over lay 2 scale in same plot

2010-09-06 Thread mamunbabu2001
Hi Everyone, I have two different data set in 2 different scale. I want to plot these two data in the same plot in their respective scale. So the plot will have 2 different scale. I have added an image below to show how it should look. does any bode has any idea how this can be done. 2 differen